Optimize MSCCL all-gather algorithms for gfx942 (#964)

이 커밋은 다음에 포함됨:
Ziyue Yang 작성하고 GitHub가 2023-11-15 08:18:59 -08:00를 커밋함
1 부모 df128879a6
커밋 7ae95db5b8
6 파일이 변경됨
+4477 -3

검색과 일치하는 파일 없음

+9 -3
파일 보기
@@ -3,6 +3,7 @@
* Licensed under the MIT License.
************************************************************************/
#include "channel.h"
#include "checks.h"
#include "collectives.h"
#include "proxy.h"
@@ -89,11 +90,16 @@ ncclResult_t mscclSetupSyncFlags(hipStream_t stream) {
ncclResult_t mscclSetupConnections(struct mscclAlgo* hostAlgo, ncclComm_t comm) {
mscclStatus& status = mscclGetStatus();
// Check whether there is enough channels
if (hostAlgo->nChannels > comm->nChannels) {
WARN("MSCCL: number of channels available (%d) less than required (%d)", comm->nChannels, hostAlgo->nChannels);
// Check whether there are enough channels
if (hostAlgo->nChannels > MAXCHANNELS) {
WARN("MSCCL: max number of channels available (%d) less than required (%d)", MAXCHANNELS, hostAlgo->nChannels);
return ncclInvalidUsage;
}
if (hostAlgo->nChannels > comm->nChannels) {
for (int channelId = comm->nChannels; channelId < hostAlgo->nChannels; channelId++) {
NCCLCHECK(initChannel(comm, channelId));
}
}
// Flag MSCCL connections
for (int i = 0; i < hostAlgo->nChannels; i++) {