Size up IPC buffers to multiples of 2MB

Avoid potential CUDA error in concurrent communicator initialization
이 커밋은 다음에 포함됨:
Ke Wen
2019-07-12 08:30:05 -07:00
부모 0b192d2299
커밋 c8c68fb5f7
2개의 변경된 파일5개의 추가작업 그리고 3개의 파일을 삭제
+1 -1
파일 보기
@@ -23,7 +23,7 @@ struct cudaLaunchParams {
#define CACHE_LINE_SIZE 128
#define MEM_ALIGN 4096
#define CUDA_IPC_MIN 2097152UL /* 2MiB - not currently used */
#define CUDA_IPC_MIN 2097152UL
struct ncclSendMem {
union {
+4 -2
파일 보기
@@ -468,7 +468,8 @@ ncclResult_t p2pSendSetup(struct ncclPeerInfo* myInfo, struct ncclPeerInfo* peer
struct p2pSendResources* resources;
NCCLCHECK(ncclCalloc(&resources, 1));
send->transportResources = resources;
const int sendSize = sizeof(struct ncclSendMem);
int sendSize = sizeof(struct ncclSendMem);
ALIGN_SIZE(sendSize, CUDA_IPC_MIN);
NCCLCHECK(ncclCudaCalloc((char**)&resources->devMem, sendSize));
struct p2pConnectInfo info;
@@ -517,7 +518,8 @@ ncclResult_t p2pRecvSetup(struct ncclPeerInfo* myInfo, struct ncclPeerInfo* peer
struct p2pRecvResources* resources;
NCCLCHECK(ncclCalloc(&resources, 1));
recv->transportResources = resources;
const int recvSize = offsetof(struct ncclRecvMem, buff)+buffSize;
int recvSize = offsetof(struct ncclRecvMem, buff)+buffSize;
ALIGN_SIZE(recvSize, CUDA_IPC_MIN);
NCCLCHECK(ncclCudaCalloc((char**)&resources->devMem, recvSize));
struct p2pConnectInfo info;