From 2a8f203f89d22af60275db1953b4d9d991890e59 Mon Sep 17 00:00:00 2001 From: "Mads R. B. Kristensen" Date: Thu, 27 Feb 2025 11:55:02 +0100 Subject: [PATCH] remoce user_stream and device_id arguments --- python/kvikio/kvikio/_lib/libnvcomp.pyx | 25 +++++--------------- python/kvikio/kvikio/_lib/nvcomp_cxx_api.pxd | 14 +---------- 2 files changed, 7 insertions(+), 32 deletions(-) diff --git a/python/kvikio/kvikio/_lib/libnvcomp.pyx b/python/kvikio/kvikio/_lib/libnvcomp.pyx index 73508a7777..ddb890a943 100644 --- a/python/kvikio/kvikio/_lib/libnvcomp.pyx +++ b/python/kvikio/kvikio/_lib/libnvcomp.pyx @@ -38,7 +38,6 @@ from kvikio._lib.nvcomp_cxx_api cimport ( LZ4Manager, SnappyManager, create_manager, - cudaStream_t, nvcompBatchedANSDefaultOpts, nvcompBatchedANSOpts_t, nvcompBatchedBitcompFormatOpts, @@ -156,9 +155,7 @@ cdef class _ANSManager(_nvcompManager): ): self._impl = new ANSManager( uncomp_chunk_size, - nvcompBatchedANSDefaultOpts, # TODO - 0, # TODO - device_id + nvcompBatchedANSDefaultOpts ) @@ -174,9 +171,7 @@ cdef class _BitcompManager(_nvcompManager): cdef opts = nvcompBatchedBitcompFormatOpts(bitcomp_algo, data_type) self._impl = new BitcompManager( uncomp_chunk_size, - opts, - 0, # TODO - device_id + opts ) @@ -189,9 +184,7 @@ cdef class _CascadedManager(_nvcompManager): ): self._impl = new CascadedManager( _options["chunk_size"], - nvcompBatchedCascadedDefaultOpts, # TODO - 0, # TODO - device_id, + nvcompBatchedCascadedDefaultOpts ) @@ -206,9 +199,7 @@ cdef class _GdeflateManager(_nvcompManager): cdef opts = nvcompBatchedGdeflateOpts_t(algo) self._impl = new GdeflateManager( uncomp_chunk_size, - opts, - 0, # TODO - device_id + opts ) @@ -227,9 +218,7 @@ cdef class _LZ4Manager(_nvcompManager): cdef opts = nvcompBatchedLZ4Opts_t(data_type) self._impl = new LZ4Manager( uncomp_chunk_size, - opts, - 0, # TODO - device_id + opts ) @@ -245,9 +234,7 @@ cdef class _SnappyManager(_nvcompManager): # everything else works. self._impl = new SnappyManager( uncomp_chunk_size, - nvcompBatchedSnappyDefaultOpts, - 0, # TODO - device_id + nvcompBatchedSnappyDefaultOpts ) diff --git a/python/kvikio/kvikio/_lib/nvcomp_cxx_api.pxd b/python/kvikio/kvikio/_lib/nvcomp_cxx_api.pxd index b6e90ed41a..b86797a93f 100644 --- a/python/kvikio/kvikio/_lib/nvcomp_cxx_api.pxd +++ b/python/kvikio/kvikio/_lib/nvcomp_cxx_api.pxd @@ -1,7 +1,7 @@ # Copyright (c) 2022 Carson Swope # Use, modification, and distribution is subject to the MIT License # https://github.com/carsonswope/py-nvcomp/blob/main/LICENSE) -# SPDX-FileCopyrightText: Copyright (c) 2022-2023, NVIDIA CORPORATION & AFFILIATES. +# SPDX-FileCopyrightText: Copyright (c) 2022-2025, NVIDIA CORPORATION & AFFILIATES. # All rights reserved. # SPDX-License-Identifier: MIT # Permission is hereby granted, free of charge, to any person obtaining a @@ -139,8 +139,6 @@ cdef extern from "nvcomp/ans.hpp": ANSManager( size_t uncomp_chunk_size, const nvcompBatchedANSOpts_t& format_opts, - cudaStream_t user_stream, - const int device_id ) except + # C++ Concrete Bitcomp Manager @@ -155,8 +153,6 @@ cdef extern from "nvcomp/bitcomp.hpp": BitcompManager( size_t uncomp_chunk_size, const nvcompBatchedBitcompFormatOpts& format_opts, - cudaStream_t user_stream, - const int device_id ) except + # C++ Concrete Cascaded Manager @@ -174,8 +170,6 @@ cdef extern from "nvcomp/cascaded.hpp" nogil: CascadedManager( size_t uncomp_chunk_size, const nvcompBatchedCascadedOpts_t& options, - cudaStream_t user_stream, - int device_id ) # C++ Concrete Gdeflate Manager @@ -189,8 +183,6 @@ cdef extern from "nvcomp/gdeflate.hpp": GdeflateManager( int uncomp_chunk_size, const nvcompBatchedGdeflateOpts_t& format_opts, - cudaStream_t user_stream, - const int device_id ) except + # C++ Concrete LZ4 Manager @@ -204,8 +196,6 @@ cdef extern from "nvcomp/lz4.hpp": LZ4Manager( size_t uncomp_chunk_size, const nvcompBatchedLZ4Opts_t& format_opts, - cudaStream_t user_stream, - const int device_id ) except + # C++ Concrete Snappy Manager @@ -219,6 +209,4 @@ cdef extern from "nvcomp/snappy.hpp": SnappyManager( size_t uncomp_chunk_size, const nvcompBatchedSnappyOpts_t& format_opts, - cudaStream_t user_stream, - const int device_id ) except +