Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Build] thrust::unary_function eprecated in cuda 12.8 #23499

Open
smuzaffar opened this issue Jan 27, 2025 · 0 comments
Open

[Build] thrust::unary_function eprecated in cuda 12.8 #23499

smuzaffar opened this issue Jan 27, 2025 · 0 comments
Assignees
Labels
build build issues; typically submitted using template ep:CUDA issues related to the CUDA execution provider

Comments

@smuzaffar
Copy link
Contributor

Describe the issue

Building onnxruntime 1.20.1 with cuda 12.8.0 for almalinux 8 failed due to use of deprecated cuda function

I think I can move forward with adding -Wno-error=deprecated-declarations build flag but it would be nice if onnxruntime can drop the use of this deprecated finction

Urgency

No response

Target platform

linux

Build script

using normal cmake build recipe with cuda enabled

Error / output

onnxruntime-1.20.1/onnxruntime/core/providers/cuda/tensor/compress_impl.cu:26:75: error: 'template<class Argument, class Result> struct t
hrust::THRUST_200700_600_700_750_800_890_NS::unary_function' is deprecated [-Werror=deprecated-declarations]
   26 | struct CastToInt32 : public thrust::unary_function<int8_t, int32_t> {
      |                                                                           ^
cuda/12.8.0-15bfa86985d46d842bb5ecc3aca6c676/include/thrust/functional.h:85:23: note: declared here
   85 | struct THRUST_DEPRECATED unary_function
      |                       ^~~~~~~~~~~~~~
cc1plus: all warnings being treated as errors

Visual Studio Version

No response

GCC / Compiler Version

12.4

@smuzaffar smuzaffar added the build build issues; typically submitted using template label Jan 27, 2025
@github-actions github-actions bot added the ep:CUDA issues related to the CUDA execution provider label Jan 27, 2025
@yuslepukhin yuslepukhin self-assigned this Jan 27, 2025
yuslepukhin added a commit that referenced this issue Jan 28, 2025
### Description
<!-- Describe your changes. -->
Remove thrust::unary_function which is deprecated in later versions of
CUDA.

### Motivation and Context
Addresses issue: #23499
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build build issues; typically submitted using template ep:CUDA issues related to the CUDA execution provider
Projects
None yet
Development

No branches or pull requests

2 participants