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] CUDA_R_8F_E5M2 was not declared in this scope #23093

Closed
Cookiee235 opened this issue Dec 12, 2024 · 2 comments
Closed

[Build] CUDA_R_8F_E5M2 was not declared in this scope #23093

Cookiee235 opened this issue Dec 12, 2024 · 2 comments
Labels
build build issues; typically submitted using template

Comments

@Cookiee235
Copy link

Describe the issue

I used the CUDA 12.4 to build the ONNXRuntime but failed.
After checking the source code, I found that only CUDA version >=11.8 is supported for this type.
Now that my cuda version meet the constraint, why the build crashed?

Image

Urgency

No response

Target platform

Linux Ubuntu 20.04

Build script

./build.sh --config Release --use_cuda --cuda_home /usr/local/cuda --cudnn_home /usr/lib/x86_64-linux-gnu/ --allow_running_as_root

Error / output

/software/onnxruntime-latest/onnxruntime/core/providers/cuda/cuda_common.cc: In function ?𻱣onst char* onnxruntime::cuda::CudaDataTypeToString(cudaDataType_t)?𼀺
/software/onnxruntime-latest/onnxruntime/core/providers/cuda/cuda_common.cc:27:10: error: ?𻱃UDA_R_8F_E4M3?𼀠was not declared in this scope
   27 |     case CUDA_R_8F_E4M3:
      |          ^~~~~~~~~~~~~~
/software/onnxruntime-latest/onnxruntime/core/providers/cuda/cuda_common.cc:29:10: error: ?𻱃UDA_R_8F_E5M2?𼀠was not declared in this scope
   29 |     case CUDA_R_8F_E5M2:
      |          ^~~~~~~~~~~~~~
/software/onnxruntime-latest/onnxruntime/core/providers/cuda/cuda_common.cc: In function ?𻱣udaDataType_t onnxruntime::cuda::ToCudaDataType(int32_t)?𼀺
/software/onnxruntime-latest/onnxruntime/core/providers/cuda/cuda_common.cc:109:14: error: ?𻱃UDA_R_8F_E4M3?𼀠was not declared in this scope
  109 |       return CUDA_R_8F_E4M3;
      |              ^~~~~~~~~~~~~~
/software/onnxruntime-latest/onnxruntime/core/providers/cuda/cuda_common.cc:111:14: error: ?𻱃UDA_R_8F_E5M2?𼀠was not declared in this scope
  111 |       return CUDA_R_8F_E5M2;
      |              ^~~~~~~~~~~~~~
make[2]: *** [CMakeFiles/onnxruntime_providers_cuda.dir/build.make:174: CMakeFiles/onnxruntime_providers_cuda.dir/software/onnxruntime-latest/onnxruntime/core/providers/cuda/cuda_common.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:2188: CMakeFiles/onnxruntime_providers_cuda.dir/all] Error 2
make: *** [Makefile:146: all] Error 2
Traceback (most recent call last):
  File "/software/onnxruntime-latest/tools/ci_build/build.py", line 2962, in <module>
    sys.exit(main())
             ^^^^^^
  File "/software/onnxruntime-latest/tools/ci_build/build.py", line 2860, in main
    build_targets(args, cmake_path, build_dir, configs, num_parallel_jobs, args.target)
  File "/software/onnxruntime-latest/tools/ci_build/build.py", line 1719, in build_targets
    run_subprocess(cmd_args, env=env)
  File "/software/onnxruntime-latest/tools/ci_build/build.py", line 867, in run_subprocess
    return run(*args, cwd=cwd, capture_stdout=capture_stdout, shell=shell, env=my_env)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/software/onnxruntime-latest/tools/python/util/run.py", line 49, in run
    completed_process = subprocess.run(
                        ^^^^^^^^^^^^^^^
  File "/root/miniconda3/lib/python3.12/subprocess.py", line 571, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['/software/cmake/bin/cmake', '--build', '/software/onnxruntime-latest/build/Linux/Release', '--config', 'Release']' returned non-zero exit status 2.

Visual Studio Version

No response

GCC / Compiler Version

gcc (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0

@Cookiee235 Cookiee235 added the build build issues; typically submitted using template label Dec 12, 2024
@RyanUnderhill
Copy link
Member

This symbol is defined in cuda's include\library_types.h file, be sure your compiler is finding the right one. It's possible it's still finding the old header.

@Cookiee235
Copy link
Author

@RyanUnderhill Thanks for your response. Issue solved!

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

2 participants