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] #22767

Closed
Bahar-BM opened this issue Nov 7, 2024 · 3 comments
Closed

[Build] #22767

Bahar-BM opened this issue Nov 7, 2024 · 3 comments
Labels
build build issues; typically submitted using template

Comments

@Bahar-BM
Copy link

Bahar-BM commented Nov 7, 2024

Describe the issue

Hello,

I’ve successfully built ONNX Runtime 1.19.2 for CUDA 11.8 on an aarch64 architecture. However, when I try to run my application, I encounter the following runtime error:

CUDA failure 222: the provided PTX was compiled with an unsupported toolchain

Upon investigating this issue further, I discovered that the .target sm_52 specified in build/Linux/Release/CMakeFiles/3.26.0/CompilerIdCUDA/tmp/CMakeCUDACompilerId.ptx is incorrect. The compute capability of my device is actually 8.7.

My question is: does the build system use a default compute capability? If so, how can I change it to match my device’s compute capability?

Urgency

No response

Target platform

tegra-ubuntu aarch64

Build script

I'm using build.sh with the following args
./build.sh --config Release --build --build_shared_lib --use_cuda --cuda_home /path/to/cuda-11.8 --cudnn_home /usr/lib/aarch64-linux-gnu

Error / output

'std::runtime_error'
what(): /mnt/ssd_drive/repos/onnxruntime/onnxruntime/core/providers/cuda/cuda_call.cc:123 std::conditional_t<THRW, void, onnxruntime::common::Status> onnxruntime::CudaCall(ERRTYPE, const char*, const char*, ERRTYPE, const char*, const char*, int) [with ERRTYPE = cudaError; bool THRW = true; std::conditional_t<THRW, void, common::Status> = void] /mnt/ssd_drive/repos/onnxruntime/onnxruntime/core/providers/cuda/cuda_call.cc:116 std::conditional_t<THRW, void, onnxruntime::common::Status> onnxruntime::CudaCall(ERRTYPE, const char*, const char*, ERRTYPE, const char*, const char*, int) [with ERRTYPE = cudaError; bool THRW = true; std::conditional_t<THRW, void, common::Status> = void] CUDA failure 222: the provided PTX was compiled with an unsupported toolchain. ; GPU=0 ; hostname=tegra-ubuntu ; file=/mnt/ssd_drive/repos/onnxruntime/onnxruntime/core/providers/cuda/cuda_execution_provider.cc ; line=283 ; expr=cudaDeviceSynchronize();

Aborted

Visual Studio Version

No response

GCC / Compiler Version

10

@Bahar-BM Bahar-BM added the build build issues; typically submitted using template label Nov 7, 2024
@snnn
Copy link
Member

snnn commented Nov 7, 2024

Please add "--cmake_extra_defines CMAKE_CUDA_ARCHITECTURES=87" to your build command.

See https://github.com/microsoft/onnxruntime/blob/main/tools/ci_build/github/linux/build_cuda_ci.sh for an example.

@snnn snnn closed this as not planned Won't fix, can't repro, duplicate, stale Nov 7, 2024
@tianleiwu
Copy link
Contributor

If "--cmake_extra_defines CMAKE_CUDA_ARCHITECTURES=87" does not work, you will need upgrade your cuda driver. User has reported similar issue (#22212) due to cuda driver not up to date.

@Bahar-BM
Copy link
Author

Bahar-BM commented Nov 8, 2024

Hello,

The --cmake_extra_defines CMAKE_CUDA_ARCHITECTURES=87 option did not work. I even tried to force the CMake build process to pick 87 during the configuration phase by hardcoding set(CMAKE_CUDA_ARCHITECTURES 87). However, it did not work.

As you mentioned, there is a high chance the issue is related to the CUDA drivers.

Thanks!

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
Projects
None yet
Development

No branches or pull requests

3 participants