Skip to content

Commit

Permalink
Benchmark: Revision - Fix -O2 option passing in gpu_copy ROCm build (#…
Browse files Browse the repository at this point in the history
…589)

**Description**
`add_compile_options` will not work for ROCm build, change it to setting
`CMAKE_CXX_FLAGS`.
  • Loading branch information
yzygitzh authored Dec 11, 2023
1 parent 719a427 commit 2c2096e
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ else()

# link hip device lib
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)
else()
message(FATAL_ERROR "No CUDA or ROCm environment found.")
Expand Down

0 comments on commit 2c2096e

Please sign in to comment.