Skip to content

Commit ded8730

Browse files
authored
Remove thrust::unary_function (#23506)
### Description <!-- Describe your changes. --> Remove thrust::unary_function which is deprecated in later versions of CUDA. ### Motivation and Context Addresses issue: #23499
1 parent 8db97a6 commit ded8730

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

onnxruntime/core/providers/cuda/tensor/compress_impl.cu

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313

1414
#include "core/providers/cuda/tensor/compress_impl.h"
1515

16-
#include <thrust/functional.h>
1716
#include <thrust/iterator/transform_iterator.h>
1817

1918
namespace onnxruntime {
@@ -23,7 +22,7 @@ namespace cuda {
2322
// in InclusiveSum(). By default, the accumulator type matches the input, but for int8_t
2423
// the sum overflows quickly, so we want the source type to match the output (int32_t).
2524
// see https://github.com/NVIDIA/cub/issues/384
26-
struct CastToInt32 : public thrust::unary_function<int8_t, int32_t> {
25+
struct CastToInt32 {
2726
__host__ __device__ int32_t operator()(int8_t v) const {
2827
return static_cast<int32_t>(v);
2928
}

0 commit comments

Comments
 (0)