mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 21:14:14 +08:00
[ROCm][Windows] Fix offload gpu arch list in tests (#155212)
Added fix to get ROCM_PROPERTY_ARCH_LIST value in set_target_properties in c10/cuda and caffe2 tests Pull Request resolved: https://github.com/pytorch/pytorch/pull/155212 Approved by: https://github.com/malfet
This commit is contained in:
committed by
PyTorch MergeBot
parent
9a42f01586
commit
a85ad55525
@ -18,7 +18,7 @@ if(BUILD_TEST)
|
|||||||
set_source_files_properties(${test_src} PROPERTIES HIP_SOURCE_PROPERTY_FORMAT 1)
|
set_source_files_properties(${test_src} PROPERTIES HIP_SOURCE_PROPERTY_FORMAT 1)
|
||||||
hip_add_executable(${test_name} "${test_src}")
|
hip_add_executable(${test_name} "${test_src}")
|
||||||
list(JOIN PYTORCH_ROCM_ARCH " " ROCM_PROPERTY_ARCH_LIST)
|
list(JOIN PYTORCH_ROCM_ARCH " " ROCM_PROPERTY_ARCH_LIST)
|
||||||
set_target_properties(${test_name} PROPERTIES LINKER_LANGUAGE CXX HIP_ARCHITECTURES ROCM_PROPERTY_ARCH_LIST)
|
set_target_properties(${test_name} PROPERTIES LINKER_LANGUAGE CXX HIP_ARCHITECTURES ${ROCM_PROPERTY_ARCH_LIST})
|
||||||
else()
|
else()
|
||||||
add_executable(${test_name} "${test_src}")
|
add_executable(${test_name} "${test_src}")
|
||||||
endif()
|
endif()
|
||||||
|
@ -1949,7 +1949,7 @@ if(BUILD_TEST)
|
|||||||
set_source_files_properties(${test_src} PROPERTIES HIP_SOURCE_PROPERTY_FORMAT 1)
|
set_source_files_properties(${test_src} PROPERTIES HIP_SOURCE_PROPERTY_FORMAT 1)
|
||||||
hip_add_executable(${test_name} "${test_src}")
|
hip_add_executable(${test_name} "${test_src}")
|
||||||
list(JOIN PYTORCH_ROCM_ARCH " " ROCM_PROPERTY_ARCH_LIST)
|
list(JOIN PYTORCH_ROCM_ARCH " " ROCM_PROPERTY_ARCH_LIST)
|
||||||
set_target_properties(${test_name} PROPERTIES HIP_ARCHITECTURES ROCM_PROPERTY_ARCH_LIST)
|
set_target_properties(${test_name} PROPERTIES HIP_ARCHITECTURES ${ROCM_PROPERTY_ARCH_LIST})
|
||||||
else()
|
else()
|
||||||
add_executable(${test_name} "${test_src}")
|
add_executable(${test_name} "${test_src}")
|
||||||
endif()
|
endif()
|
||||||
|
Reference in New Issue
Block a user