Skip to content

Commit

Permalink
[ROCm 5.7] HIP kernels may launch with non-uniform block size for bac…
Browse files Browse the repository at this point in the history
…kward compatibility
  • Loading branch information
junliume committed Aug 8, 2023
1 parent 331fc10 commit 1d07f0f
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,12 @@ math(EXPR MIOPEN_hip_VERSION_FLAT "(${MIOPEN_hip_VERSION_MAJOR} * 1000 + ${MIOPE
set_var_to_condition(MIOPEN_USE_HIPRTC_DEFAULT ${MIOPEN_USE_COMGR} AND (${MIOPEN_hip_VERSION_FLAT} GREATER 500000000))
option(MIOPEN_USE_HIPRTC "Use HIPRTC to build HIP kernels instead of COMGR" ${MIOPEN_USE_HIPRTC_DEFAULT})

# No assumption that HIP kernels are launched with uniform block size for backward compatibility
# SWDEV-413293 and https://reviews.llvm.org/D155213
if(${MIOPEN_hip_VERSION_FLAT} GREATER 500700000)
string(APPEND HIP_COMPILER_FLAGS " -fno-offload-uniform-block ")
endif()

message(STATUS "Hip compiler flags: ${HIP_COMPILER_FLAGS}")

add_definitions("-DHIP_COMPILER_FLAGS=${HIP_COMPILER_FLAGS}")
Expand Down

0 comments on commit 1d07f0f

Please sign in to comment.