You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We currently provide CPU image decoding functions for PNG and JPEG. It could be interesting to consider using nvjpeg to perform decoding directly on the GPU, as it could benefit certain workloads.
Motivation
With CUDA 10.0, nvjpeg is part of the CUDA toolkit, which means that it would be easily accessible for us to use it.
The API for the decoding function is not yet clear to me, and would require some digging
Ideally, passing a CUDA tensor for decode_jpeg should do the decoding on the GPU, although I'm not sure if that's how nvjpeg works internally.
The text was updated successfully, but these errors were encountered:
It looks like it requires a host pointer and does some preprocessing on the cpu
Parameter
Input / Output
Memory
Description
const unsigned char *data
Input
Host
Pointer to the encoded data.
nvjpegImage_t *destination
Input/Output
Host/ Device
Pointer to the structure that describes the output destination. This structure should be on the host (CPU), but the pointers in this structure should be pointing to the device (i.e., GPU) memory. See nvjpegImage_t.
Yes, that was my understanding as well. We would need to see what potential speed benefits single-image decoding could bring compared to say turbo-jpeg, and if the speed improvements are there what would be a good API for using it. Passing a device flag to decode_jpeg?
jamt9000
added a commit
to jamt9000/vision
that referenced
this issue
Oct 10, 2020
🚀 Feature
We currently provide CPU image decoding functions for PNG and JPEG. It could be interesting to consider using nvjpeg to perform decoding directly on the GPU, as it could benefit certain workloads.
Motivation
With CUDA 10.0, nvjpeg is part of the CUDA toolkit, which means that it would be easily accessible for us to use it.
The API for the decoding function is not yet clear to me, and would require some digging
Ideally, passing a CUDA tensor for
decode_jpeg
should do the decoding on the GPU, although I'm not sure if that's how nvjpeg works internally.The text was updated successfully, but these errors were encountered: