2
0
Ficheiros
rocm-systems/projects/rccl/src/include/shm.h
T

38 linhas
809 B
C
Em bruto Vista normal Histórico

2018-09-24 16:06:59 -07:00
#ifndef NCCL_SHM_H_
#define NCCL_SHM_H_
2024-09-10 05:57:10 -07:00
#include "comm.h"
2018-09-24 16:06:59 -07:00
2024-09-10 05:57:10 -07:00
struct shmLegacyIpc {
char shmSuffix[7];
ncclShmHandle_t handle;
size_t shmSize;
};
2022-11-29 04:27:46 -08:00
2024-09-10 05:57:10 -07:00
struct shmCuIpc {
union {
CUmemFabricHandle handle;
CUmemGenericAllocationHandle data;
};
int tpProxyRank;
void *ptr;
size_t size;
2023-09-26 05:47:28 -07:00
};
2024-09-10 05:57:10 -07:00
struct shmIpcDesc {
union
{
struct shmLegacyIpc shmli;
struct shmCuIpc shmci;
};
bool legacy;
};
typedef struct shmIpcDesc ncclShmIpcDesc_t;
ncclResult_t ncclShmAllocateShareableBuffer(int tpProxyRank, size_t size, bool legacy, ncclShmIpcDesc_t *descOut, void **hptr, void **dptr);
ncclResult_t ncclShmImportShareableBuffer(struct ncclComm *comm, ncclShmIpcDesc_t *desc, void **hptr, void **dptr, ncclShmIpcDesc_t *descOut);
ncclResult_t ncclShmIpcClose(ncclShmIpcDesc_t *desc);
2023-09-26 05:47:28 -07:00
2018-09-24 16:06:59 -07:00
#endif