Skip to content

Commit 0511df0

Browse files
hongxiayangpytorchmergebot
authored andcommitted
[ROCM] enable skipped test_api cpp tests (pytorch#109817)
[ROCM] enable skipped test_api cpp tests Pull Request resolved: pytorch#109817 Approved by: https://github.com/jithunnair-amd, https://github.com/malfet
1 parent 063d257 commit 0511df0

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

test/cpp/api/CMakeLists.txt

+3-6
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ set(TORCH_API_TEST_SOURCES
88
${TORCH_API_TEST_DIR}/expanding-array.cpp
99
${TORCH_API_TEST_DIR}/fft.cpp
1010
${TORCH_API_TEST_DIR}/functional.cpp
11+
${TORCH_API_TEST_DIR}/init.cpp
12+
${TORCH_API_TEST_DIR}/integration.cpp
1113
${TORCH_API_TEST_DIR}/jit.cpp
1214
${TORCH_API_TEST_DIR}/memory.cpp
1315
${TORCH_API_TEST_DIR}/meta_tensor.cpp
@@ -40,15 +42,10 @@ set(TORCH_API_TEST_SOURCES
4042
${TORCH_API_TEST_DIR}/grad_mode.cpp
4143
${TORCH_API_TEST_DIR}/operations.cpp
4244
)
43-
if(USE_CUDA)
45+
if(USE_CUDA OR USE_ROCM)
4446
list(APPEND TORCH_API_TEST_SOURCES ${TORCH_API_TEST_DIR}/parallel.cpp)
4547
endif()
4648

47-
if(NOT USE_ROCM)
48-
list(APPEND TORCH_API_TEST_SOURCES ${TORCH_API_TEST_DIR}/init.cpp)
49-
list(APPEND TORCH_API_TEST_SOURCES ${TORCH_API_TEST_DIR}/integration.cpp)
50-
endif()
51-
5249
add_executable(test_api ${TORCH_API_TEST_SOURCES})
5350
target_include_directories(test_api PRIVATE ${ATen_CPU_INCLUDE})
5451
target_link_libraries(test_api PRIVATE torch gtest)

0 commit comments

Comments
 (0)