Skip to content

Commit

Permalink
Treat zstd as stable in nvcomp releases 2.3.2 and later (#11226)
Browse files Browse the repository at this point in the history
Based on our testing of nvcomp zstd decompression with the spark-rapids plugin, we believe that ZSTD should be treated as stable starting with nvcomp release 2.3.2.

Specifically, one should no longer need to specify LIBCUDF_NVCOMP_POLICY=ALWAYS to use ZSTD in cuDF.  Note that currently cuDF is still using nvcomp-2.3.0, which should still be treated as experimental.

Authors:
  - Jim Brennan (https://github.com/jbrennan333)

Approvers:
  - Yunsong Wang (https://github.com/PointKernel)
  - Nghia Truong (https://github.com/ttnghia)

URL: #11226
  • Loading branch information
jbrennan333 authored Jul 11, 2022
1 parent 99eaaef commit f7f8dbc
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions cpp/src/io/comp/nvcomp_adapter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,14 @@
#define NVCOMP_HAS_TEMPSIZE_EX 0
#endif

// ZSTD is stable for nvcomp 2.3.2 or newer
#if NVCOMP_MAJOR_VERSION > 2 or (NVCOMP_MAJOR_VERSION == 2 and NVCOMP_MINOR_VERSION > 3) or \
(NVCOMP_MAJOR_VERSION == 2 and NVCOMP_MINOR_VERSION == 3 and NVCOMP_PATCH_VERSION >= 2)
#define NVCOMP_ZSTD_IS_EXPERIMENTAL 0
#else
#define NVCOMP_ZSTD_IS_EXPERIMENTAL 1
#endif

namespace cudf::io::nvcomp {

// Dispatcher for nvcompBatched<format>DecompressGetTempSizeEx
Expand Down Expand Up @@ -146,9 +154,11 @@ void batched_decompress(compression_type compression,
// TODO Consolidate config use to a common location
if (compression == compression_type::ZSTD) {
#if NVCOMP_HAS_ZSTD
#if NVCOMP_ZSTD_IS_EXPERIMENTAL
CUDF_EXPECTS(cudf::io::detail::nvcomp_integration::is_all_enabled(),
"Zstandard compression is experimental, you can enable it through "
"`LIBCUDF_NVCOMP_POLICY` environment variable.");
#endif
#else
CUDF_FAIL("nvCOMP 2.3 or newer is required for Zstandard compression");
#endif
Expand Down

0 comments on commit f7f8dbc

Please sign in to comment.