We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f2c684d commit 78338deCopy full SHA for 78338de
torchvision/csrc/io/image/cuda/encode_jpegs_cuda.cpp
@@ -94,12 +94,12 @@ std::vector<torch::Tensor> encode_jpegs_cuda(
94
95
cudaJpegEncoder->set_quality(quality);
96
std::vector<torch::Tensor> encoded_images;
97
- at::cuda::CUDAEvent event;
98
- event.record(cudaJpegEncoder->stream);
99
for (const auto& image : contig_images) {
100
auto encoded_image = cudaJpegEncoder->encode_jpeg(image);
101
encoded_images.push_back(encoded_image);
102
}
+ at::cuda::CUDAEvent event;
+ event.record(cudaJpegEncoder->stream);
103
104
// We use a dedicated stream to do the encoding and even though the results
105
// may be ready on that stream we cannot assume that they are also available
0 commit comments