Skip to content

Commit a85ad55

Browse files
tvukovic-amdpytorchmergebot
authored andcommitted
[ROCm][Windows] Fix offload gpu arch list in tests (pytorch#155212)
Added fix to get ROCM_PROPERTY_ARCH_LIST value in set_target_properties in c10/cuda and caffe2 tests Pull Request resolved: pytorch#155212 Approved by: https://github.com/malfet
1 parent 9a42f01 commit a85ad55

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

c10/cuda/test/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ if(BUILD_TEST)
1818
set_source_files_properties(${test_src} PROPERTIES HIP_SOURCE_PROPERTY_FORMAT 1)
1919
hip_add_executable(${test_name} "${test_src}")
2020
list(JOIN PYTORCH_ROCM_ARCH " " ROCM_PROPERTY_ARCH_LIST)
21-
set_target_properties(${test_name} PROPERTIES LINKER_LANGUAGE CXX HIP_ARCHITECTURES ROCM_PROPERTY_ARCH_LIST)
21+
set_target_properties(${test_name} PROPERTIES LINKER_LANGUAGE CXX HIP_ARCHITECTURES ${ROCM_PROPERTY_ARCH_LIST})
2222
else()
2323
add_executable(${test_name} "${test_src}")
2424
endif()

caffe2/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1949,7 +1949,7 @@ if(BUILD_TEST)
19491949
set_source_files_properties(${test_src} PROPERTIES HIP_SOURCE_PROPERTY_FORMAT 1)
19501950
hip_add_executable(${test_name} "${test_src}")
19511951
list(JOIN PYTORCH_ROCM_ARCH " " ROCM_PROPERTY_ARCH_LIST)
1952-
set_target_properties(${test_name} PROPERTIES HIP_ARCHITECTURES ROCM_PROPERTY_ARCH_LIST)
1952+
set_target_properties(${test_name} PROPERTIES HIP_ARCHITECTURES ${ROCM_PROPERTY_ARCH_LIST})
19531953
else()
19541954
add_executable(${test_name} "${test_src}")
19551955
endif()

0 commit comments

Comments
 (0)