We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 88aaf51 commit 6db54fbCopy full SHA for 6db54fb
torchvision/csrc/io/image/cuda/decode_jpeg_cuda.cpp
@@ -71,7 +71,7 @@ torch::Tensor decode_jpeg_cuda(
71
at::cuda::CUDAGuard device_guard(device);
72
73
// Create global nvJPEG handle
74
- std::once_flag nvjpeg_handle_creation_flag;
+ static std::once_flag nvjpeg_handle_creation_flag;
75
std::call_once(nvjpeg_handle_creation_flag, []() {
76
if (nvjpeg_handle == nullptr) {
77
nvjpegStatus_t create_status = nvjpegCreateSimple(&nvjpeg_handle);
0 commit comments