     size_t batch_size,
     cudaStream_t stream)
 {
-  get_decompress_size_kernel<<<
-      roundUpDiv(batch_size, cascaded_decompress_threadblock_size),
-      cascaded_decompress_threadblock_size,
-      0,
-      stream>>>(
-      device_compressed_ptrs,
-      device_compressed_bytes,
-      device_uncompressed_bytes,
-      batch_size);
-  return nvcompSuccess;
-}
+  try {
+    get_decompress_size_kernel<<<
+        roundUpDiv(batch_size, cascaded_decompress_threadblock_size),
+        cascaded_decompress_threadblock_size,
+        0,
+        stream>>>(
+        device_compressed_ptrs,
+        device_compressed_bytes,
+        device_uncompressed_bytes,
+        batch_size);
+    CudaUtils::check_last_error();
+  } catch (const std::exception& e) {
+    return Check::exception_to_error(
+        e, "nvcompBatchedCascadedGetDecompressSizeAsync()");
+  }
+
+  return nvcompSuccess;
+}

using nvcomp::cascaded_decompress_threadblock_size;
using nvcomp::partition_metadata_size;
using nvcomp::compute_smem_size;

namespace
{

#include "nvcomp/cascaded.h"
#include "type_macros.h"
#include "CascadedKernels.cuh"
#include "Check.h"
#include "CudaUtils.h"

#include <cstdint>

