Skip to content

Commit e1f563b

Browse files
authored
Add an upper bound for the video decoder workaround (#3609)
- there is a bug when decoding video on non-default stream in selected driver leading to memory corruption. This PR adds a check for the last driver version that needs the workaround Signed-off-by: Janusz Lisiecki <jlisiecki@nvidia.com>
1 parent f2198c9 commit e1f563b

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

dali/operators/reader/nvdecoder/nvdecoder.cc

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,22 +59,21 @@ NvDecoder::NvDecoder(int device_id,
5959
"Check your library paths and if NVIDIA driver is installed correctly.");
6060

6161

62-
// This is a workaround for an issue with nvcuvid in drivers >460 where concurrent
62+
// This is a workaround for an issue with nvcuvid in drivers >460 and < 470.21 where concurrent
6363
// use on default context and non-default streams may lead to memory corruption.
64-
// TODO(michalz): add an upper bound when the problem is fixed
6564
bool use_default_stream = false;
6665
#if NVML_ENABLED
6766
{
6867
nvml::Init();
6968
static float driver_version = nvml::GetDriverVersion();
70-
if (driver_version > 460)
69+
if (driver_version > 460 && driver_version < 470.21)
7170
use_default_stream = true;
7271
}
7372
#else
7473
{
7574
int driver_cuda_version = 0;
7675
CUDA_CALL(cuDriverGetVersion(&driver_cuda_version));
77-
if (driver_cuda_version >= 11030)
76+
if (driver_cuda_version >= 11030 && driver_cuda_version < 11040)
7877
use_default_stream = true;
7978
}
8079
#endif

0 commit comments

Comments
 (0)