diff --git a/cub/cub/agent/agent_spmv_orig.cuh b/cub/cub/agent/agent_spmv_orig.cuh index 41c40bee28e..a3f985ad0fa 100644 --- a/cub/cub/agent/agent_spmv_orig.cuh +++ b/cub/cub/agent/agent_spmv_orig.cuh @@ -102,7 +102,7 @@ template -struct AgentSpmvPolicy +struct CCCL_DEPRECATED_BECAUSE("Use the cuSPARSE library instead") AgentSpmvPolicy { enum { @@ -148,7 +148,12 @@ struct AgentSpmvPolicy * Signed integer type for sequence offsets */ template -struct SpmvParams +struct +// with NVHPC, we get a deprecation warning in the implementation of cudaLaunchKernelEx, which we cannot suppress :/ +#if !_CCCL_COMPILER(NVHPC) + CCCL_DEPRECATED_BECAUSE("Use the cuSPARSE library instead") +#endif + SpmvParams { /// Pointer to the array of \p num_nonzeros values of the corresponding nonzero elements of matrix /// A. @@ -211,7 +216,7 @@ template -struct AgentSpmv +struct CCCL_DEPRECATED_BECAUSE("Use the cuSPARSE library instead") AgentSpmv { //--------------------------------------------------------------------- // Types and constants @@ -308,7 +313,9 @@ struct AgentSpmv /// Reference to temp_storage _TempStorage& temp_storage; + _CCCL_SUPPRESS_DEPRECATED_PUSH SpmvParams& spmv_params; + _CCCL_SUPPRESS_DEPRECATED_POP /// Wrapped pointer to the array of \p num_nonzeros values of the corresponding nonzero elements /// of matrix A. @@ -341,6 +348,7 @@ struct AgentSpmv * @param spmv_params * SpMV input parameter bundle */ + _CCCL_SUPPRESS_DEPRECATED_PUSH _CCCL_DEVICE _CCCL_FORCEINLINE AgentSpmv(TempStorage& temp_storage, SpmvParams& spmv_params) : temp_storage(temp_storage.Alias()) , spmv_params(spmv_params) @@ -350,6 +358,7 @@ struct AgentSpmv , wd_vector_x(spmv_params.d_vector_x) , wd_vector_y(spmv_params.d_vector_y) {} + _CCCL_SUPPRESS_DEPRECATED_POP /** * @brief Consume a merge tile, specialized for direct-load of nonzeros diff --git a/cub/cub/device/device_spmv.cuh b/cub/cub/device/device_spmv.cuh index 5a751181842..241af8cd1d1 100644 --- a/cub/cub/device/device_spmv.cuh +++ b/cub/cub/device/device_spmv.cuh @@ -78,7 +78,7 @@ CUB_NAMESPACE_BEGIN //! @cdp_class{DeviceSpmv} //! //! @endrst -struct DeviceSpmv +struct CCCL_DEPRECATED_BECAUSE("Use the cuSPARSE library instead") DeviceSpmv { //! @name CSR matrix operations //! @{ @@ -177,18 +177,19 @@ struct DeviceSpmv //! **[optional]** CUDA stream to launch kernels within. Default is stream\ :sub:`0`. //! @endrst template - CUB_RUNTIME_FUNCTION static cudaError_t CsrMV( - void* d_temp_storage, - size_t& temp_storage_bytes, - const ValueT* d_values, - const int* d_row_offsets, - const int* d_column_indices, - const ValueT* d_vector_x, - ValueT* d_vector_y, - int num_rows, - int num_cols, - int num_nonzeros, - cudaStream_t stream = 0) + CCCL_DEPRECATED_BECAUSE("Use the cuSPARSE library instead") + CUB_RUNTIME_FUNCTION static cudaError_t + CsrMV(void* d_temp_storage, + size_t& temp_storage_bytes, + const ValueT* d_values, + const int* d_row_offsets, + const int* d_column_indices, + const ValueT* d_vector_x, + ValueT* d_vector_y, + int num_rows, + int num_cols, + int num_nonzeros, + cudaStream_t stream = 0) { CUB_DETAIL_NVTX_RANGE_SCOPE_IF(d_temp_storage, "cub::DeviceSpmv::CsrMV"); @@ -204,7 +205,9 @@ struct DeviceSpmv spmv_params.alpha = ValueT{1}; spmv_params.beta = ValueT{0}; + _CCCL_SUPPRESS_DEPRECATED_PUSH return DispatchSpmv::Dispatch(d_temp_storage, temp_storage_bytes, spmv_params, stream); + _CCCL_SUPPRESS_DEPRECATED_POP } //! @} end member group diff --git a/cub/cub/device/dispatch/dispatch_spmv_orig.cuh b/cub/cub/device/dispatch/dispatch_spmv_orig.cuh index 6dc4f44aeca..d659afa0ce9 100644 --- a/cub/cub/device/dispatch/dispatch_spmv_orig.cuh +++ b/cub/cub/device/dispatch/dispatch_spmv_orig.cuh @@ -83,8 +83,11 @@ CUB_NAMESPACE_BEGIN * @param[in] spmv_params * SpMV input parameter bundle */ +_CCCL_SUPPRESS_DEPRECATED_PUSH template -CUB_DETAIL_KERNEL_ATTRIBUTES void DeviceSpmv1ColKernel(SpmvParams spmv_params) +CCCL_DEPRECATED_BECAUSE("Use the cuSPARSE library instead") +CUB_DETAIL_KERNEL_ATTRIBUTES void DeviceSpmv1ColKernel(SpmvParams spmv_params) // + _CCCL_SUPPRESS_DEPRECATED_POP { using VectorValueIteratorT = CacheModifiedInputIterator; @@ -132,8 +135,9 @@ CUB_DETAIL_KERNEL_ATTRIBUTES void DeviceSpmv1ColKernel(SpmvParams -CUB_DETAIL_KERNEL_ATTRIBUTES void -DeviceSpmvSearchKernel(int num_merge_tiles, CoordinateT* d_tile_coordinates, SpmvParamsT spmv_params) +CCCL_DEPRECATED_BECAUSE("Use the cuSPARSE library instead") +CUB_DETAIL_KERNEL_ATTRIBUTES void DeviceSpmvSearchKernel( + int num_merge_tiles, CoordinateT* d_tile_coordinates, SpmvParamsT spmv_params) { /// Constants enum @@ -217,6 +221,7 @@ template +CCCL_DEPRECATED_BECAUSE("Use the cuSPARSE library instead") __launch_bounds__(int(SpmvPolicyT::BLOCK_THREADS)) CUB_DETAIL_KERNEL_ATTRIBUTES void DeviceSpmvKernel( SpmvParams spmv_params, CoordinateT* d_tile_coordinates, @@ -226,7 +231,9 @@ __launch_bounds__(int(SpmvPolicyT::BLOCK_THREADS)) CUB_DETAIL_KERNEL_ATTRIBUTES int num_segment_fixup_tiles) { // Spmv agent type specialization + _CCCL_SUPPRESS_DEPRECATED_PUSH using AgentSpmvT = AgentSpmv; + _CCCL_SUPPRESS_DEPRECATED_POP // Shared memory for AgentSpmv __shared__ typename AgentSpmvT::TempStorage temp_storage; @@ -248,6 +255,7 @@ __launch_bounds__(int(SpmvPolicyT::BLOCK_THREADS)) CUB_DETAIL_KERNEL_ATTRIBUTES * Whether the input parameter Beta is 0 */ template +CCCL_DEPRECATED_BECAUSE("Use the cuSPARSE library instead") CUB_DETAIL_KERNEL_ATTRIBUTES void DeviceSpmvEmptyMatrixKernel(SpmvParams spmv_params) { const int row = static_cast(threadIdx.x + blockIdx.x * blockDim.x); @@ -298,18 +306,21 @@ CUB_DETAIL_KERNEL_ATTRIBUTES void DeviceSpmvEmptyMatrixKernel(SpmvParams +CCCL_DEPRECATED_BECAUSE("Use the cuSPARSE library instead") __launch_bounds__(int(AgentSegmentFixupPolicyT::BLOCK_THREADS)) CUB_DETAIL_KERNEL_ATTRIBUTES void DeviceSegmentFixupKernel( PairsInputIteratorT d_pairs_in, AggregatesOutputIteratorT d_aggregates_out, OffsetT num_items, int num_tiles, - ScanTileStateT tile_state) + ScanTileStateT tile_state) // + _CCCL_SUPPRESS_DEPRECATED_POP { // Thread block type for reducing tiles of value segments using AgentSegmentFixupT = @@ -342,7 +353,7 @@ __launch_bounds__(int(AgentSegmentFixupPolicyT::BLOCK_THREADS)) * Signed integer type for global offsets */ template -struct DispatchSpmv +struct CCCL_DEPRECATED_BECAUSE("Use the cuSPARSE library instead") DispatchSpmv { //--------------------------------------------------------------------- // Constants and Types diff --git a/cub/test/test_device_spmv.cu b/cub/test/test_device_spmv.cu index 5a120e56e96..13dba77a594 100644 --- a/cub/test/test_device_spmv.cu +++ b/cub/test/test_device_spmv.cu @@ -47,6 +47,8 @@ #include #include +_CCCL_SUPPRESS_DEPRECATED_PUSH + bool g_verbose = false; //============================================================================== @@ -605,3 +607,5 @@ int main(int argc, char** argv) test_types(); } + +_CCCL_SUPPRESS_DEPRECATED_POP