Unverified Commit 2c2096ed authored by Ziyue Yang's avatar Ziyue Yang Committed by GitHub
Browse files

Benchmark: Revision - Fix -O2 option passing in gpu_copy ROCm build (#589)

**Description**
`add_compile_options` will not work for ROCm build, change it to setting
`CMAKE_CXX_FLAGS`.
parent 719a427f
...@@ -27,7 +27,7 @@ else() ...@@ -27,7 +27,7 @@ else()
# link hip device lib # link hip device lib
add_executable(gpu_copy gpu_copy.cpp) add_executable(gpu_copy gpu_copy.cpp)
add_compile_options(-O2) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O2")
target_link_libraries(gpu_copy numa hip::device) target_link_libraries(gpu_copy numa hip::device)
else() else()
message(FATAL_ERROR "No CUDA or ROCm environment found.") message(FATAL_ERROR "No CUDA or ROCm environment found.")
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment