Skip to content

Commit 5b14351

Browse files
minsiifacebook-github-bot
authored andcommitted
fix hipified source path (#331)
Summary: Pull Request resolved: #331 At OSS gloo build time, all cu files are hipified by cmake for AMD build. The hipified source files are in cmake build directory which can be different from the original source path. Thus, we should always use HIPIFY_OUTPUT_DIR rather than CMAKE_CURRENT_SOURCE_DIR to include these files. HIPIFY_OUTPUT_DIR is defined by Hipify.cmake. This diff fixes failure captured by OSS pytorch when trying to update gloo commit hash: https://github.com/pytorch/pytorch/runs/6379162434?check_suite_focus=true Particular error: ``` *** No rule to make target '../third_party/gloo/gloo/nccl/nccl.hip', needed by 'third_party/gloo/gloo/CMakeFiles/gloo_hip.dir/nccl/gloo_hip_generated_nccl.hip.o'. Stop. ``` Reviewed By: jiayisuse Differential Revision: D36457504 fbshipit-source-id: b39a171353a247c8847e4cbed3cb2f4a152bc8af
1 parent efdd8de commit 5b14351

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

gloo/nccl/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@ endif()
1515

1616
if(USE_ROCM)
1717
set(GLOO_NCCL_SRCS
18-
"${CMAKE_CURRENT_SOURCE_DIR}/nccl.hip"
18+
"${HIPIFY_OUTPUT_DIR}/nccl/nccl.hip"
1919
)
2020

2121
set(GLOO_NCCL_HDRS
22-
"${CMAKE_CURRENT_SOURCE_DIR}/nccl.h"
22+
"${HIPIFY_OUTPUT_DIR}/nccl/nccl.h"
2323
)
2424

2525
list(APPEND GLOO_HIP_SRCS ${GLOO_NCCL_SRCS})

0 commit comments

Comments
 (0)