[MIGraphX EP/ ROCm EP] add gfx1200, gfx1201 to CMAKE_HIP_ARCHITECTURES (#22348)
### Description Add additonal gfx targets for AMD GPU support ### Motivation and Context Required to integrate mainline onnxruntime support for AMD GPUs --------- Co-authored-by: Stefan Sokolovic <stsokolo@amd.com> Co-authored-by: Jeff Daily <jeff.daily@amd.com>
This commit is contained in:
Родитель
d7367653ab
Коммит
572e43c5d7
|
@ -294,7 +294,7 @@ if (onnxruntime_USE_ROCM)
|
|||
endif()
|
||||
|
||||
if (NOT CMAKE_HIP_ARCHITECTURES)
|
||||
set(CMAKE_HIP_ARCHITECTURES "gfx906;gfx908;gfx90a;gfx1030;gfx1100;gfx1101")
|
||||
set(CMAKE_HIP_ARCHITECTURES "gfx908;gfx90a;gfx1030;gfx1100;gfx1101;gfx940;gfx941;gfx942;gfx1200;gfx1201")
|
||||
endif()
|
||||
|
||||
file(GLOB rocm_cmake_components ${onnxruntime_ROCM_HOME}/lib/cmake/*)
|
||||
|
|
|
@ -1,10 +1,12 @@
|
|||
set(PATCH ${PROJECT_SOURCE_DIR}/patches/composable_kernel/Fix_Clang_Build.patch)
|
||||
set(PATCH_CLANG ${PROJECT_SOURCE_DIR}/patches/composable_kernel/Fix_Clang_Build.patch)
|
||||
set(PATCH_GFX12X ${PROJECT_SOURCE_DIR}/patches/composable_kernel/Add_gfx12x_support.patch)
|
||||
|
||||
include(FetchContent)
|
||||
FetchContent_Declare(composable_kernel
|
||||
URL ${DEP_URL_composable_kernel}
|
||||
URL_HASH SHA1=${DEP_SHA1_composable_kernel}
|
||||
PATCH_COMMAND ${Patch_EXECUTABLE} --binary --ignore-whitespace -p1 < ${PATCH}
|
||||
PATCH_COMMAND ${Patch_EXECUTABLE} --binary --ignore-whitespace -p1 < ${PATCH_CLANG} &&
|
||||
${Patch_EXECUTABLE} --binary --ignore-whitespace -p1 < ${PATCH_GFX12X}
|
||||
)
|
||||
|
||||
FetchContent_GetProperties(composable_kernel)
|
||||
|
|
|
@ -0,0 +1,7 @@
|
|||
SECTIONS {
|
||||
.hipFatBinSegment : { *(.hipFatBinSegment) }
|
||||
} INSERT AFTER .bss
|
||||
|
||||
SECTIONS {
|
||||
.hip_fatbin : { *(.hip_fatbin) }
|
||||
} INSERT AFTER .hipFatBinSegment
|
|
@ -116,6 +116,7 @@
|
|||
auto_set_source_files_hip_language(${onnxruntime_providers_rocm_src})
|
||||
onnxruntime_add_shared_library_module(onnxruntime_providers_rocm ${onnxruntime_providers_rocm_src})
|
||||
target_compile_options(onnxruntime_providers_rocm PRIVATE -D__HIP_PLATFORM_AMD__=1 -D__HIP_PLATFORM_HCC__=1)
|
||||
target_link_options(onnxruntime_providers_rocm PRIVATE -T ${REPO_ROOT}/cmake/hip_fatbin_insert)
|
||||
|
||||
if(NOT MSVC)
|
||||
target_compile_options(onnxruntime_providers_rocm PRIVATE -Wno-sign-compare)
|
||||
|
|
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
Загрузка…
Ссылка в новой задаче