Skip to content

Commit 608d1cc

Browse files
Revert "Separate the buffers used by D/C and notify_dispatch to avoid conflic…" (#89)
This reverts commit 29aec86.
1 parent 93298de commit 608d1cc

File tree

3 files changed

+3
-7
lines changed

3 files changed

+3
-7
lines changed

csrc/deepep/ops/op_kernel/cam_moe_combine_normal.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
#include "kernel_tiling/kernel_tiling.h"
66
#include "moe_distribute_base.h"
77
#include "cam_moe_combine_normal_tiling.h"
8-
#include "comm_args.h"
98

109
namespace CamMoeCombineNormalImpl {
1110
constexpr uint32_t RANK_ID_OFFSET_IN_SRC_INFO = 0U;
@@ -64,7 +63,7 @@ class CamMoeCombineNormal
6463
} else {
6564
bufferAddr = (GM_ADDR)((HcclRankRelationResV2 *)epWinContext_->remoteRes[rankId].nextDevicePtr)->windowsIn;
6665
}
67-
return (GM_ADDR)(bufferAddr + winDataSizeOffset_ + Moe::NOTIFY_DISPATCH_BUFF_OFFSET);
66+
return (GM_ADDR)(bufferAddr + winDataSizeOffset_);
6867
}
6968

7069
__aicore__ GM_ADDR GetBufferAddrByRankId(const int32_t rankId)

csrc/deepep/ops/op_kernel/cam_moe_dispatch_normal.h

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
#include "kernel_tiling/kernel_tiling.h"
66
#include "moe_distribute_base.h"
77
#include "cam_moe_dispatch_normal_tiling.h"
8-
#include "comm_args.h"
98

109
namespace CamMoeDispatchNormalImpl {
1110
constexpr uint8_t BUFFER_NUM = 2;
@@ -60,11 +59,10 @@ class CamMoeDispatchNormal
6059
{
6160
uint32_t curRankId = ((ctxIdx == COMM_EP_IDX) ? epRankId : tpRankId);
6261
if (curRankId == rankId) {
63-
return (GM_ADDR)(winContext_[ctxIdx]->localWindowsIn) + winDataSizeOffset + COMBINE_STATE_WIN_OFFSET +
64-
Moe::NOTIFY_DISPATCH_BUFF_OFFSET;
62+
return (GM_ADDR)(winContext_[ctxIdx]->localWindowsIn) + winDataSizeOffset + COMBINE_STATE_WIN_OFFSET;
6563
}
6664
return (GM_ADDR)(((HcclRankRelationResV2 *)(winContext_[ctxIdx]->remoteRes[rankId].nextDevicePtr))->windowsIn) +
67-
winDataSizeOffset + COMBINE_STATE_WIN_OFFSET + Moe::NOTIFY_DISPATCH_BUFF_OFFSET;
65+
winDataSizeOffset + COMBINE_STATE_WIN_OFFSET;
6866
}
6967

7068
__aicore__ inline GM_ADDR GetWindStateAddrByRankId(uint8_t ctxIdx, const int32_t rankId)

csrc/deepep/ops/op_kernel/comm_args.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
namespace Moe {
99
constexpr int CAM_MAX_RANK_SIZE = 384; // Maximum number of NPU cards supported by the communication library
1010

11-
constexpr int64_t NOTIFY_DISPATCH_BUFF_OFFSET = 204UL * 1024UL * 1024UL;
1211
constexpr int64_t IPC_BUFF_MAX_SIZE = 100 * 1024 * 1024;
1312
constexpr int64_t IPC_DATA_OFFSET = 2 * 1024 * 1024; // First 2MB as flag, then 100MB as data storage
1413
constexpr int64_t PING_PONG_SIZE = 2;

0 commit comments

Comments
 (0)