From 628c857c3d1d7108f3210d76e6350f5eb705961b Mon Sep 17 00:00:00 2001 From: Vukasin Milovanovic Date: Thu, 29 Sep 2022 12:44:27 -0700 Subject: [PATCH] Disable nvCOMP DEFLATE integration (#11811) ## Description Disable the use of nvCOMP DEFLATE because of issues with nvCOMP 2.4. Also fix a Python test (did not block CI because the comparison in the test is only done with `LIBCUDF_NVCOMP_POLICY="ALWAYS"`. ## Checklist - [x] I am familiar with the [Contributing Guidelines](https://github.com/rapidsai/cudf/blob/HEAD/CONTRIBUTING.md). - [x] New or existing tests cover these changes. - [x] The documentation is up to date with these changes. Authors: - Vukasin Milovanovic (https://github.com/vuule) Approvers: - Nghia Truong (https://github.com/ttnghia) - Jim Brennan (https://github.com/jbrennan333) - GALI PREM SAGAR (https://github.com/galipremsagar) - Robert Maynard (https://github.com/robertmaynard) - Vyas Ramasubramani (https://github.com/vyasr) --- cpp/src/io/comp/nvcomp_adapter.cpp | 3 ++- cpp/src/io/orc/reader_impl.cu | 3 ++- python/cudf/cudf/tests/test_orc.py | 6 ++++-- python/cudf/cudf/utils/ioutils.py | 2 +- 4 files changed, 9 insertions(+), 5 deletions(-) diff --git a/cpp/src/io/comp/nvcomp_adapter.cpp b/cpp/src/io/comp/nvcomp_adapter.cpp index 9fa442f3d08..4da618615e1 100644 --- a/cpp/src/io/comp/nvcomp_adapter.cpp +++ b/cpp/src/io/comp/nvcomp_adapter.cpp @@ -378,7 +378,8 @@ bool is_compression_enabled(compression_type compression) { switch (compression) { case compression_type::DEFLATE: - return NVCOMP_HAS_DEFLATE and detail::nvcomp_integration::is_all_enabled(); + // See https://github.com/rapidsai/cudf/issues/11812 + return false; case compression_type::SNAPPY: return detail::nvcomp_integration::is_stable_enabled(); case compression_type::ZSTD: return NVCOMP_HAS_ZSTD_COMP and detail::nvcomp_integration::is_all_enabled(); diff --git a/cpp/src/io/orc/reader_impl.cu b/cpp/src/io/orc/reader_impl.cu index 7ff3ee85939..7fb83b2a24e 100644 --- a/cpp/src/io/orc/reader_impl.cu +++ b/cpp/src/io/orc/reader_impl.cu @@ -379,7 +379,8 @@ rmm::device_buffer reader::impl::decompress_stripe_data( device_span> inflate_out_view{inflate_out.data(), num_compressed_blocks}; switch (decompressor.compression()) { case compression_type::ZLIB: - if (nvcomp_integration::is_all_enabled()) { + // See https://github.com/rapidsai/cudf/issues/11812 + if (false) { nvcomp::batched_decompress(nvcomp::compression_type::DEFLATE, inflate_in_view, inflate_out_view, diff --git a/python/cudf/cudf/tests/test_orc.py b/python/cudf/cudf/tests/test_orc.py index c6bf17110c2..e45a1bd9c2f 100644 --- a/python/cudf/cudf/tests/test_orc.py +++ b/python/cudf/cudf/tests/test_orc.py @@ -1746,8 +1746,10 @@ def test_writer_protobuf_large_rowindexentry(): @pytest.mark.parametrize("compression", ["ZLIB", "ZSTD"]) -def test_orc_writer_nvcomp(list_struct_buff, compression): - expected = cudf.read_orc(list_struct_buff) +def test_orc_writer_nvcomp(compression): + expected = cudf.datasets.randomdata( + nrows=12345, dtypes={"a": int, "b": str, "c": float}, seed=1 + ) buff = BytesIO() try: diff --git a/python/cudf/cudf/utils/ioutils.py b/python/cudf/cudf/utils/ioutils.py index af7d3a275d9..aa25acd9281 100644 --- a/python/cudf/cudf/utils/ioutils.py +++ b/python/cudf/cudf/utils/ioutils.py @@ -429,7 +429,7 @@ ---------- fname : str File path or object where the ORC dataset will be stored. -compression : {{ 'snappy', 'ZLIB', 'ZSTD', None }}, default 'snappy' +compression : {{ 'snappy', 'ZSTD', None }}, default 'snappy' Name of the compression to use. Use None for no compression. enable_statistics: boolean, default True Enable writing column statistics.