From a7935ee5a516bc9849374ad9545884843c3424fd Mon Sep 17 00:00:00 2001 From: Janusz Lisiecki Date: Wed, 22 Jul 2026 16:57:59 +0200 Subject: [PATCH 1/5] Bump up nvComp version to 5.3.0.16 Signed-off-by: Janusz Lisiecki --- cmake/Dependencies.common.cmake | 2 +- docker/Dockerfile.cuda129.aarch64.deps | 8 ++++---- docker/Dockerfile.cuda129.x86_64.deps | 8 ++++---- docker/Dockerfile.cuda133.aarch64.deps | 7 ++++--- docker/Dockerfile.cuda133.x86_64.deps | 7 ++++--- 5 files changed, 17 insertions(+), 15 deletions(-) diff --git a/cmake/Dependencies.common.cmake b/cmake/Dependencies.common.cmake index 207f3384c18..ac3697eb705 100644 --- a/cmake/Dependencies.common.cmake +++ b/cmake/Dependencies.common.cmake @@ -167,7 +167,7 @@ if(BUILD_NVCOMP) list(APPEND DALI_LIBS ${nvcomp_LIBS}) else() message(STATUS "Found nvCOMP: ${nvcomp_INCLUDE_DIR}.") - set(DALI_INSTALL_REQUIRES_NVCOMP "\'nvidia-libnvcomp-cu${CUDA_VERSION_MAJOR} == 5.2.0.13\',") + set(DALI_INSTALL_REQUIRES_NVCOMP "\'nvidia-libnvcomp-cu${CUDA_VERSION_MAJOR} == 5.3.0.16\',") message(STATUS "Adding nvComp requirement as: ${DALI_INSTALL_REQUIRES_NVCOMP}") endif() endif() diff --git a/docker/Dockerfile.cuda129.aarch64.deps b/docker/Dockerfile.cuda129.aarch64.deps index 09ef8311d14..cf97e4cb0b3 100644 --- a/docker/Dockerfile.cuda129.aarch64.deps +++ b/docker/Dockerfile.cuda129.aarch64.deps @@ -12,7 +12,7 @@ RUN curl -LO https://developer.download.nvidia.com/compute/cuda/12.9.1/local_ins rm -f cuda_*.run; RUN CUFILE_VERSION=1.14.1.1-1 && \ - NVCOMP_VERSION=4.2.0.11-1 && \ + NVCOMP_VERSION=5.3.0.16 && \ CUDA_VERSION_MAJOR=12 && \ CUDA_VERSION_MINOR=9 && \ apt-get update && \ @@ -22,9 +22,9 @@ RUN CUFILE_VERSION=1.14.1.1-1 && \ apt-get update && \ apt-get install libcufile-dev-${CUDA_VERSION_MAJOR}-${CUDA_VERSION_MINOR}=${CUFILE_VERSION} -y && \ mkdir /tmp/nvcomp && cd /tmp/nvcomp && \ - wget https://developer.download.nvidia.com/compute/nvcomp/redist/nvcomp/linux-sbsa/nvcomp-linux-sbsa-5.2.0.10_cuda12-archive.tar.xz && \ + wget https://developer.download.nvidia.com/compute/nvcomp/redist/nvcomp/linux-sbsa/nvcomp-linux-sbsa-${NVCOMP_VERSION}_cuda12-archive.tar.xz && \ tar -xf * && \ - cp -r nvcomp-linux-sbsa-5.2.0.10_cuda12-archive/include/* /usr/local/cuda/include/ && \ - cp -r nvcomp-linux-sbsa-5.2.0.10_cuda12-archive/lib/* /usr/local/cuda/lib64/ && \ + cp -r nvcomp-linux-sbsa-${NVCOMP_VERSION}_cuda12-archive/include/* /usr/local/cuda/include/ && \ + cp -r nvcomp-linux-sbsa-${NVCOMP_VERSION}_cuda12-archive/lib/* /usr/local/cuda/lib64/ && \ cd / && rm -rf /tmp/nvcomp && \ rm -rf /var/lib/apt/lists/* diff --git a/docker/Dockerfile.cuda129.x86_64.deps b/docker/Dockerfile.cuda129.x86_64.deps index 74daf537a62..12e237d08e3 100644 --- a/docker/Dockerfile.cuda129.x86_64.deps +++ b/docker/Dockerfile.cuda129.x86_64.deps @@ -12,7 +12,7 @@ RUN curl -LO https://developer.download.nvidia.com/compute/cuda/12.9.1/local_ins rm -f cuda_*.run; RUN CUFILE_VERSION=1.14.1.1-1 && \ - NVCOMP_VERSION=4.2.0.11-1 && \ + NVCOMP_VERSION=5.3.0.16 && \ CUDA_VERSION_MAJOR=12 && \ CUDA_VERSION_MINOR=9 && \ apt-get update && \ @@ -22,9 +22,9 @@ RUN CUFILE_VERSION=1.14.1.1-1 && \ apt-get update && \ apt-get install libcufile-dev-${CUDA_VERSION_MAJOR}-${CUDA_VERSION_MINOR}=${CUFILE_VERSION} -y && \ mkdir /tmp/nvcomp && cd /tmp/nvcomp && \ - wget https://developer.download.nvidia.com/compute/nvcomp/redist/nvcomp/linux-x86_64/nvcomp-linux-x86_64-5.2.0.10_cuda12-archive.tar.xz && \ + wget https://developer.download.nvidia.com/compute/nvcomp/redist/nvcomp/linux-x86_64/nvcomp-linux-x86_64-${NVCOMP_VERSION}_cuda12-archive.tar.xz && \ tar -xf * && \ - cp -r nvcomp-linux-x86_64-5.2.0.10_cuda12-archive/include/* /usr/local/cuda/include/ && \ - cp -r nvcomp-linux-x86_64-5.2.0.10_cuda12-archive/lib/* /usr/local/cuda/lib64/ && \ + cp -r nvcomp-linux-x86_64-${NVCOMP_VERSION}_cuda12-archive/include/* /usr/local/cuda/include/ && \ + cp -r nvcomp-linux-x86_64-${NVCOMP_VERSION}_cuda12-archive/lib/* /usr/local/cuda/lib64/ && \ cd / && rm -rf /tmp/nvcomp && \ rm -rf /var/lib/apt/lists/* diff --git a/docker/Dockerfile.cuda133.aarch64.deps b/docker/Dockerfile.cuda133.aarch64.deps index 06fc5b18e61..3590d57f1a3 100644 --- a/docker/Dockerfile.cuda133.aarch64.deps +++ b/docker/Dockerfile.cuda133.aarch64.deps @@ -8,6 +8,7 @@ RUN CUDA_SUBVERSION=13.3.1-1 && \ CUFILE_VERSION=1.18.1.6-1 && \ CUDA_VERSION_MAJOR=13 && \ CUDA_VERSION_MINOR=3 && \ + NVCOMP_VERSION=5.3.0.16 && \ apt-get update && \ apt-get install wget software-properties-common -y && \ apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/sbsa/3bf863cc.pub && \ @@ -29,10 +30,10 @@ RUN CUDA_SUBVERSION=13.3.1-1 && \ cuda-compat-${CUDA_VERSION_MAJOR}-${CUDA_VERSION_MINOR} \ libcufile-dev-${CUDA_VERSION_MAJOR}-${CUDA_VERSION_MINOR}=${CUFILE_VERSION} && \ mkdir /tmp/nvcomp && cd /tmp/nvcomp && \ - wget https://developer.download.nvidia.com/compute/nvcomp/redist/nvcomp/linux-sbsa/nvcomp-linux-sbsa-5.2.0.10_cuda13-archive.tar.xz && \ + wget https://developer.download.nvidia.com/compute/nvcomp/redist/nvcomp/linux-sbsa/nvcomp-linux-sbsa-${NVCOMP_VERSION}_cuda13-archive.tar.xz && \ tar -xf * && \ - cp -r nvcomp-linux-sbsa-5.2.0.10_cuda13-archive/include/* /usr/local/cuda/include/ && \ - cp -r nvcomp-linux-sbsa-5.2.0.10_cuda13-archive/lib/* /usr/local/cuda/lib64/ && \ + cp -r nvcomp-linux-sbsa-${NVCOMP_VERSION}_cuda13-archive/include/* /usr/local/cuda/include/ && \ + cp -r nvcomp-linux-sbsa-${NVCOMP_VERSION}_cuda13-archive/lib/* /usr/local/cuda/lib64/ && \ cd / && rm -rf /tmp/nvcomp && \ mv /usr/local/cuda/bin/fatbinary /usr/local/cuda/bin/fatbinary_org && \ # fatbinary removed one of the options while clang still uses it diff --git a/docker/Dockerfile.cuda133.x86_64.deps b/docker/Dockerfile.cuda133.x86_64.deps index 6c23fc5ad24..1013a8b9187 100644 --- a/docker/Dockerfile.cuda133.x86_64.deps +++ b/docker/Dockerfile.cuda133.x86_64.deps @@ -8,6 +8,7 @@ RUN CUDA_SUBVERSION=13.3.1-1 && \ CUFILE_VERSION=1.18.1.6-1 && \ CUDA_VERSION_MAJOR=13 && \ CUDA_VERSION_MINOR=3 && \ + NVCOMP_VERSION=5.3.0.16 && \ apt-get update && \ apt-get install wget software-properties-common -y && \ apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64/3bf863cc.pub && \ @@ -29,10 +30,10 @@ RUN CUDA_SUBVERSION=13.3.1-1 && \ cuda-compat-${CUDA_VERSION_MAJOR}-${CUDA_VERSION_MINOR} \ libcufile-dev-${CUDA_VERSION_MAJOR}-${CUDA_VERSION_MINOR}=${CUFILE_VERSION} && \ mkdir /tmp/nvcomp && cd /tmp/nvcomp && \ - wget https://developer.download.nvidia.com/compute/nvcomp/redist/nvcomp/linux-x86_64/nvcomp-linux-x86_64-5.2.0.10_cuda13-archive.tar.xz && \ + wget https://developer.download.nvidia.com/compute/nvcomp/redist/nvcomp/linux-x86_64/nvcomp-linux-x86_64-${NVCOMP_VERSION}_cuda13-archive.tar.xz && \ tar -xf * && \ - cp -r nvcomp-linux-x86_64-5.2.0.10_cuda13-archive/include/* /usr/local/cuda/include/ && \ - cp -r nvcomp-linux-x86_64-5.2.0.10_cuda13-archive/lib/* /usr/local/cuda/lib64/ && \ + cp -r nvcomp-linux-x86_64-${NVCOMP_VERSION}_cuda13-archive/include/* /usr/local/cuda/include/ && \ + cp -r nvcomp-linux-x86_64-${NVCOMP_VERSION}_cuda13-archive/lib/* /usr/local/cuda/lib64/ && \ cd / && rm -rf /tmp/nvcomp && \ mv /usr/local/cuda/bin/fatbinary /usr/local/cuda/bin/fatbinary_org && \ # fatbinary removed one of the options while clang still uses it From 6ed27c743bb54d3aece87d4bac684caf9fb91d75 Mon Sep 17 00:00:00 2001 From: Janusz Lisiecki Date: Thu, 23 Jul 2026 09:51:10 +0200 Subject: [PATCH 2/5] Guard inflate output buffers after nvCOMP update Signed-off-by: Janusz Lisiecki --- dali/operators/decoder/inflate/inflate.cc | 6 ++++++ dali/operators/decoder/inflate/inflate.h | 5 ++++- dali/operators/decoder/inflate/inflate_gpu.cc | 20 +++++++++++++++++++ .../decoder/inflate/inflate_params.h | 1 + dali/test/python/operator_1/test_inflate.py | 16 +++++++++++++++ .../python/test_dali_variable_batch_size.py | 2 +- 6 files changed, 48 insertions(+), 2 deletions(-) diff --git a/dali/operators/decoder/inflate/inflate.cc b/dali/operators/decoder/inflate/inflate.cc index 355f9239e10..f0e306d1a5d 100644 --- a/dali/operators/decoder/inflate/inflate.cc +++ b/dali/operators/decoder/inflate/inflate.cc @@ -54,6 +54,12 @@ concatenating compressed frames from the corresponding sequences.:: .NumOutput(1) .AddArg(inflate::shapeArgName, "The shape of the output (inflated) chunk.", DALI_INT_VEC, true) .AddOptionalTypeArg(inflate::dTypeArgName, "The output (inflated) data type.", DALI_UINT8) + .AddOptionalArg(inflate::checkOutputSizeArgName, + R"code(If True, validates before decompression that the requested output +buffers are large enough for the compressed data. + +This validation synchronizes the GPU stream and is disabled by default.)code", + false) .AddOptionalArg>(inflate::offsetArgName, R"code(A list of offsets within the input sample describing where the consecutive chunks begin. diff --git a/dali/operators/decoder/inflate/inflate.h b/dali/operators/decoder/inflate/inflate.h index 81fff407724..702c6da39a4 100644 --- a/dali/operators/decoder/inflate/inflate.h +++ b/dali/operators/decoder/inflate/inflate.h @@ -32,7 +32,9 @@ namespace inflate { template class InflateOpImplBase : public OpImplBase { public: - explicit InflateOpImplBase(const OpSpec &spec) : params_{spec} { + explicit InflateOpImplBase(const OpSpec &spec) + : check_output_size_{spec.GetArgument(inflate::checkOutputSizeArgName)}, + params_{spec} { dtype_ = spec.GetArgument(inflate::dTypeArgName); DALI_ENFORCE( IsFloatingPoint(dtype_) || IsIntegral(dtype_), @@ -64,6 +66,7 @@ class InflateOpImplBase : public OpImplBase { protected: DALIDataType dtype_; TypeInfo element_type_; + bool check_output_size_; inflate::ShapeParams params_; }; diff --git a/dali/operators/decoder/inflate/inflate_gpu.cc b/dali/operators/decoder/inflate/inflate_gpu.cc index a5f4f83b9c3..bf15aaa60a8 100644 --- a/dali/operators/decoder/inflate/inflate_gpu.cc +++ b/dali/operators/decoder/inflate/inflate_gpu.cc @@ -57,6 +57,26 @@ class InflateOpGpuLZ4Impl : public InflateOpImplBase { auto [in_sizes, in, out_sizes, out] = scratchpad.ToContiguousGPU( stream, params_.GetInChunkSizes(), input_ptrs_, inflated_sizes_, inflated_ptrs_); + if (check_output_size_) { + // Query the decoded sizes before decompression. nvCOMP's decompression API documents an + // insufficient output buffer as undefined behaviour for some backends, so relying on its + // per-chunk status is not safe here. + CUDA_CALL(nvcompBatchedLZ4GetDecompressSizeAsync(in, in_sizes, actual_out_sizes, + total_chunks_num, stream)); + std::vector decoded_sizes(total_chunks_num); + CUDA_CALL(cudaMemcpyAsync(decoded_sizes.data(), actual_out_sizes, + total_chunks_num * sizeof(size_t), cudaMemcpyDeviceToHost, stream)); + CUDA_CALL(cudaStreamSynchronize(stream)); + for (size_t chunk_idx = 0; chunk_idx < total_chunks_num; chunk_idx++) { + DALI_ENFORCE( + decoded_sizes[chunk_idx] <= inflated_sizes_[chunk_idx], + make_string("Output buffer for inflated chunk ", chunk_idx, " is too small: it has ", + inflated_sizes_[chunk_idx], " bytes, but the compressed input expands to ", + decoded_sizes[chunk_idx], + " bytes. Check the `shape` and `dtype` arguments.")); + } + } + size_t tempSize; CUDA_CALL(nvcompBatchedLZ4DecompressGetTempSizeAsync( total_chunks_num, diff --git a/dali/operators/decoder/inflate/inflate_params.h b/dali/operators/decoder/inflate/inflate_params.h index 2992272d466..1a2ff807db0 100644 --- a/dali/operators/decoder/inflate/inflate_params.h +++ b/dali/operators/decoder/inflate/inflate_params.h @@ -36,6 +36,7 @@ constexpr static const char *offsetArgName = "chunk_offsets"; constexpr static const char *sizeArgName = "chunk_sizes"; constexpr static const char *layoutArgName = "layout"; constexpr static const char *sequenceLayoutArgName = "sequence_axis_name"; +constexpr static const char *checkOutputSizeArgName = "check_output_size"; enum class InflateAlg { LZ4 diff --git a/dali/test/python/operator_1/test_inflate.py b/dali/test/python/operator_1/test_inflate.py index 5f1b4499a28..26a1c72d013 100644 --- a/dali/test/python/operator_1/test_inflate.py +++ b/dali/test/python/operator_1/test_inflate.py @@ -129,6 +129,22 @@ def test_sample_inflate(): seed += 1 +@has_operator("decoders.inflate") +@restrict_platform(min_compute_cap=6.0) +def test_rejects_insufficient_output_buffer(): + sample = np.full((13, 7), 42, dtype=np.int64) + deflated = sample_to_lz4(sample) + + @pipeline_def(batch_size=1, num_threads=4, device_id=0) + def pipeline(): + compressed = fn.external_source(source=lambda: deflated, batch=False) + # dtype defaults to uint8, which is too small for the int64 LZ4 payload. + return fn.decoders.inflate(compressed.gpu(), shape=sample.shape, check_output_size=True) + + with assert_raises(RuntimeError, glob="Output buffer for inflated chunk 0 is too small"): + pipeline().run() + + def _test_scalar_shape(dtype, shape, layout): def sample_source(sample_info): sample_size = np.prod(shape) diff --git a/dali/test/python/test_dali_variable_batch_size.py b/dali/test/python/test_dali_variable_batch_size.py index 5822356658e..7f3be360f11 100644 --- a/dali/test/python/test_dali_variable_batch_size.py +++ b/dali/test/python/test_dali_variable_batch_size.py @@ -1460,7 +1460,7 @@ def inflate_pipline(max_batch_size, inputs, device): def piepline(): defalted = fn.external_source(source=input_data) shape = fn.external_source(source=input_shape) - return fn.decoders.inflate(defalted.gpu(), shape=shape) + return fn.decoders.inflate(defalted.gpu(), shape=shape, dtype=types.INT64) return piepline(batch_size=max_batch_size, num_threads=4, device_id=0) From 901733d5edf23b8311947b6b8f4dc3e5ed97a9ce Mon Sep 17 00:00:00 2001 From: Janusz Lisiecki Date: Thu, 23 Jul 2026 10:23:34 +0200 Subject: [PATCH 3/5] Address inflate review feedback Signed-off-by: Janusz Lisiecki --- dali/operators/decoder/inflate/inflate.h | 5 +--- dali/operators/decoder/inflate/inflate_gpu.cc | 25 +++++++++++++------ dali/test/python/operator_1/test_inflate.py | 24 ++++++++++++++++-- 3 files changed, 40 insertions(+), 14 deletions(-) diff --git a/dali/operators/decoder/inflate/inflate.h b/dali/operators/decoder/inflate/inflate.h index 702c6da39a4..81fff407724 100644 --- a/dali/operators/decoder/inflate/inflate.h +++ b/dali/operators/decoder/inflate/inflate.h @@ -32,9 +32,7 @@ namespace inflate { template class InflateOpImplBase : public OpImplBase { public: - explicit InflateOpImplBase(const OpSpec &spec) - : check_output_size_{spec.GetArgument(inflate::checkOutputSizeArgName)}, - params_{spec} { + explicit InflateOpImplBase(const OpSpec &spec) : params_{spec} { dtype_ = spec.GetArgument(inflate::dTypeArgName); DALI_ENFORCE( IsFloatingPoint(dtype_) || IsIntegral(dtype_), @@ -66,7 +64,6 @@ class InflateOpImplBase : public OpImplBase { protected: DALIDataType dtype_; TypeInfo element_type_; - bool check_output_size_; inflate::ShapeParams params_; }; diff --git a/dali/operators/decoder/inflate/inflate_gpu.cc b/dali/operators/decoder/inflate/inflate_gpu.cc index bf15aaa60a8..2f0a929a691 100644 --- a/dali/operators/decoder/inflate/inflate_gpu.cc +++ b/dali/operators/decoder/inflate/inflate_gpu.cc @@ -35,7 +35,9 @@ namespace inflate { class InflateOpGpuLZ4Impl : public InflateOpImplBase { public: - explicit InflateOpGpuLZ4Impl(const OpSpec &spec) : InflateOpImplBase{spec} {} + explicit InflateOpGpuLZ4Impl(const OpSpec &spec) + : InflateOpImplBase{spec}, + check_output_size_{spec.GetArgument(inflate::checkOutputSizeArgName)} {} void RunImpl(Workspace &ws) override { const auto &input = ws.template Input(0); @@ -67,13 +69,19 @@ class InflateOpGpuLZ4Impl : public InflateOpImplBase { CUDA_CALL(cudaMemcpyAsync(decoded_sizes.data(), actual_out_sizes, total_chunks_num * sizeof(size_t), cudaMemcpyDeviceToHost, stream)); CUDA_CALL(cudaStreamSynchronize(stream)); - for (size_t chunk_idx = 0; chunk_idx < total_chunks_num; chunk_idx++) { - DALI_ENFORCE( - decoded_sizes[chunk_idx] <= inflated_sizes_[chunk_idx], - make_string("Output buffer for inflated chunk ", chunk_idx, " is too small: it has ", - inflated_sizes_[chunk_idx], " bytes, but the compressed input expands to ", - decoded_sizes[chunk_idx], - " bytes. Check the `shape` and `dtype` arguments.")); + size_t flat_chunk_idx = 0; + const auto &chunks_per_sample = params_.GetChunksNumPerSample(); + for (int sample_idx = 0; sample_idx < chunks_per_sample.num_samples(); sample_idx++) { + auto num_chunks = chunks_per_sample[sample_idx].num_elements(); + for (int chunk_idx = 0; chunk_idx < num_chunks; chunk_idx++, flat_chunk_idx++) { + DALI_ENFORCE( + decoded_sizes[flat_chunk_idx] <= inflated_sizes_[flat_chunk_idx], + make_string("Output buffer for inflated chunk ", chunk_idx, " in sample ", sample_idx, + " is too small: it has ", inflated_sizes_[flat_chunk_idx], + " bytes, but the compressed input expands to ", + decoded_sizes[flat_chunk_idx], + " bytes. Check the `shape` and `dtype` arguments.")); + } } } @@ -151,6 +159,7 @@ class InflateOpGpuLZ4Impl : public InflateOpImplBase { std::vector input_ptrs_; std::vector inflated_ptrs_; std::vector inflated_sizes_; + bool check_output_size_; }; } // namespace inflate diff --git a/dali/test/python/operator_1/test_inflate.py b/dali/test/python/operator_1/test_inflate.py index 26a1c72d013..87485508fd4 100644 --- a/dali/test/python/operator_1/test_inflate.py +++ b/dali/test/python/operator_1/test_inflate.py @@ -1,4 +1,4 @@ -# Copyright (c) 2022-2024, NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# Copyright (c) 2022-2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -141,10 +141,30 @@ def pipeline(): # dtype defaults to uint8, which is too small for the int64 LZ4 payload. return fn.decoders.inflate(compressed.gpu(), shape=sample.shape, check_output_size=True) - with assert_raises(RuntimeError, glob="Output buffer for inflated chunk 0 is too small"): + with assert_raises(RuntimeError, glob="Output buffer for inflated chunk 0 in sample 0 is too small"): pipeline().run() +@has_operator("decoders.inflate") +@restrict_platform(min_compute_cap=6.0) +def test_checks_sufficient_output_buffer(): + sample = np.full((13, 7), 42, dtype=np.int64) + deflated = sample_to_lz4(sample) + + @pipeline_def(batch_size=1, num_threads=4, device_id=0) + def pipeline(): + compressed = fn.external_source(source=lambda: deflated, batch=False) + return fn.decoders.inflate( + compressed.gpu(), + shape=sample.shape, + dtype=types.INT64, + check_output_size=True, + ) + + (inflated,) = pipeline().run() + check_batch(inflated, [sample], batch_size=1) + + def _test_scalar_shape(dtype, shape, layout): def sample_source(sample_info): sample_size = np.prod(shape) From 726cb376eddd53994bb51e8270196a410f94bf95 Mon Sep 17 00:00:00 2001 From: Janusz Lisiecki Date: Thu, 23 Jul 2026 10:34:59 +0200 Subject: [PATCH 4/5] Format inflate output size test Signed-off-by: Janusz Lisiecki --- dali/test/python/operator_1/test_inflate.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/dali/test/python/operator_1/test_inflate.py b/dali/test/python/operator_1/test_inflate.py index 87485508fd4..fd34e694fe9 100644 --- a/dali/test/python/operator_1/test_inflate.py +++ b/dali/test/python/operator_1/test_inflate.py @@ -141,7 +141,9 @@ def pipeline(): # dtype defaults to uint8, which is too small for the int64 LZ4 payload. return fn.decoders.inflate(compressed.gpu(), shape=sample.shape, check_output_size=True) - with assert_raises(RuntimeError, glob="Output buffer for inflated chunk 0 in sample 0 is too small"): + with assert_raises( + RuntimeError, glob="Output buffer for inflated chunk 0 in sample 0 is too small" + ): pipeline().run() From b23819759e133ad5373793b8e660f7c7be1522b7 Mon Sep 17 00:00:00 2001 From: Janusz Lisiecki Date: Thu, 23 Jul 2026 14:01:29 +0200 Subject: [PATCH 5/5] Add nvCOMP LZ4 decompression-size stub Expose nvcompBatchedLZ4GetDecompressSizeAsync through dynamic stub generation so Inflate can validate output capacities before decompression. Signed-off-by: Janusz Lisiecki --- internal_tools/stub_generator/nvcomp.json | 1 + 1 file changed, 1 insertion(+) diff --git a/internal_tools/stub_generator/nvcomp.json b/internal_tools/stub_generator/nvcomp.json index 924b7d51800..899e2ed567b 100644 --- a/internal_tools/stub_generator/nvcomp.json +++ b/internal_tools/stub_generator/nvcomp.json @@ -8,6 +8,7 @@ "functions": { "nvcompBatchedLZ4DecompressGetTempSizeAsync": {}, "nvcompBatchedLZ4DecompressAsync": {}, + "nvcompBatchedLZ4GetDecompressSizeAsync": {}, "nvcompGetStatusString": { "return_type":"const char*", "not_found_error":"\"(nvcompGetStatusString not available)\""