From 6bf678a8d9f5314bea92f0114331d50e05a4e3ce Mon Sep 17 00:00:00 2001 From: yf711 <109183385+yf711@users.noreply.github.com> Date: Thu, 6 Feb 2025 15:22:55 -0800 Subject: [PATCH] fix for ep_perf --- cmake/CMakeLists.txt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt index 0103ec89db..09c8f7522c 100644 --- a/cmake/CMakeLists.txt +++ b/cmake/CMakeLists.txt @@ -1513,9 +1513,11 @@ if (onnxruntime_USE_CUDA) find_package(CUDAToolkit REQUIRED) # test config - set(CMAKE_CUDA_FLAGS "${CMAKE_CUDA_FLAGS} -gencode=arch=compute_80,code=[lto_80,sm_80]") # A series + set(CMAKE_CUDA_FLAGS "${CMAKE_CUDA_FLAGS} -gencode=arch=compute_80,code=[lto_75,sm_75]") # A series set(CMAKE_CUDA_FLAGS "${CMAKE_CUDA_FLAGS} --relocatable-device-code=true") - add_compile_options("$<$:SHELL:-Xcompiler /wd4505>") + if (msvc) + add_compile_options("$<$:SHELL:-Xcompiler /wd4505>") + endif() set(CMAKE_CUDA_SEPARABLE_COMPILATION ON) set(CMAKE_CUDA_FLAGS "${CMAKE_CUDA_FLAGS} --expt-relaxed-constexpr")