mirror of
https://github.com/ROCm/composable_kernel.git
synced 2026-05-13 17:55:48 +00:00
ROCm 6.0 replaces all __HIP_PLATFORM_HCC__ with __HIP_PLATFORM_AMD__ (#1106)
* ROCm 6.0 replaces all __HIP_PLATFORM_HCC__ with __HIP_PLATFORM_AMD__
* make it backward compatible
* Update .clang-tidy
* Update ClangTidy.cmake
[ROCm/composable_kernel commit: 3ab1838fb0]
This commit is contained in:
@@ -1,3 +1,3 @@
|
||||
CheckOptions:
|
||||
- key: bugprone-reserved-identifier.AllowedIdentifiers
|
||||
value: '__HIP_PLATFORM_HCC__;__HIP_ROCclr__'
|
||||
value: '__HIP_PLATFORM_HCC__;__HIP_PLATFORM_AMD__;__HIP_ROCclr__'
|
||||
|
||||
@@ -244,7 +244,11 @@ if( DEFINED CK_OVERRIDE_HIP_VERSION_PATCH )
|
||||
endif()
|
||||
message(STATUS "Build with HIP ${HIP_VERSION}")
|
||||
link_libraries(hip::device)
|
||||
add_compile_definitions(__HIP_PLATFORM_HCC__=1)
|
||||
if(CK_hip_VERSION VERSION_GREATER_EQUAL 6.0.23494)
|
||||
add_compile_definitions(__HIP_PLATFORM_AMD__=1)
|
||||
else()
|
||||
add_compile_definitions(__HIP_PLATFORM_HCC__=1)
|
||||
endif()
|
||||
|
||||
## tidy
|
||||
include(EnableCompilerWarnings)
|
||||
|
||||
@@ -149,7 +149,7 @@ function(clang_tidy_check TARGET)
|
||||
add_custom_target(${tidy_target}
|
||||
# for some targets clang-tidy not able to get information from .clang-tidy
|
||||
DEPENDS ${SOURCE}
|
||||
COMMAND ${CLANG_TIDY_COMMAND} "-config=\{CheckOptions: \[\{key: bugprone-reserved-identifier.AllowedIdentifiers,value: __HIP_PLATFORM_HCC__\; __HIP_ROCclr__\}\]\}" ${SOURCE} "-export-fixes=${CLANG_TIDY_FIXIT_DIR}/${TARGET}-${tidy_file}.yaml"
|
||||
COMMAND ${CLANG_TIDY_COMMAND} "-config=\{CheckOptions: \[\{key: bugprone-reserved-identifier.AllowedIdentifiers,value: __HIP_PLATFORM_HCC__\; __HIP_PLATFORM_AMD__\; __HIP_ROCclr__\}\]\}" ${SOURCE} "-export-fixes=${CLANG_TIDY_FIXIT_DIR}/${TARGET}-${tidy_file}.yaml"
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
|
||||
COMMENT "clang-tidy: Running clang-tidy on target ${SOURCE}..."
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user