Skip to content

Commit

Permalink
[ROCm] fix build failure when nccl is enabled (#19900)
Browse files Browse the repository at this point in the history
Building onnxruntime ROCm EP with --enable_nccl --use_mpi fails due to
inclusion of MOE source files but MOE is not supported. The error
observed is

`error: contrib_ops/rocm/moe/ft_moe/moe_kernel.h: No such file or
directory`

The fix is to exclude collective/sharded_moe.* files when nccl is
requested.
  • Loading branch information
jeffdaily committed Mar 14, 2024
1 parent 9c3242a commit 9443366
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions cmake/onnxruntime_rocm_hipify.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,10 @@ if (NOT onnxruntime_USE_NCCL)
list(APPEND contrib_ops_excluded_files "collective/distributed_reduce.cc")
list(APPEND contrib_ops_excluded_files "collective/distributed_unsqueeze.cc")
list(APPEND contrib_ops_excluded_files "collective/distributed_squeeze.cc")
else()
# moe not supported for ROCm EP
list(APPEND contrib_ops_excluded_files "collective/sharded_moe.h")
list(APPEND contrib_ops_excluded_files "collective/sharded_moe.cc")
endif()

set(provider_excluded_files
Expand Down

0 comments on commit 9443366

Please sign in to comment.