Fix gfx940 CPX mode (#1290)

This commit is contained in:
Wenkai Du
2024-08-16 08:46:06 +08:00
committed by GitHub
parent eff56735b0
commit d3171b51b7
4 changed files with 10 additions and 5 deletions
+2 -1
View File
@@ -626,7 +626,8 @@ ncclResult_t ncclTopoPostset(struct ncclComm* comm, int* firstRanks, int* treePa
// Only use full MAXCHANNELS for gfx94x
int maxChannels = IsArchMatch(comm->topo->nodes[GPU].nodes[0].gpu.gcn, "gfx94") ?
(comm->topo->nodes[GPU].nodes[0].gpu.cu == 80 ? 80 : MAXCHANNELS) : 2*CHANNEL_LIMIT;
((comm->topo->nodes[GPU].nodes[0].gpu.cu == 80 || comm->topo->nodes[GPU].nodes[0].gpu.cu == 20)
? comm->topo->nodes[GPU].nodes[0].gpu.cu : MAXCHANNELS) : 2*CHANNEL_LIMIT;
if (graphs[NCCL_ALGO_RING]->nIntraChannels > 0 || comm->nNodes > 1) {
maxChannels = std::min(64, maxChannels);
+3 -1
View File
@@ -347,7 +347,9 @@ static void memcpylower(char* dst, const char* src, const size_t size) {
static ncclResult_t getPciPath(const char* busId, char** path) {
char busPath[] = "/sys/class/pci_bus/0000:00/../../0000:00:00.0";
memcpylower(busPath+sizeof("/sys/class/pci_bus/")-1, busId, BUSID_REDUCED_SIZE-1);
memcpylower(busPath+sizeof("/sys/class/pci_bus/0000:00/../../")-1, busId, BUSID_SIZE-1);
memcpylower(busPath+sizeof("/sys/class/pci_bus/0000:00/../../")-1, busId, BUSID_SIZE-2);
// override PCIe device function ID in CPX mode
busPath[sizeof("/sys/class/pci_bus/0000:00/../../")+BUSID_SIZE-3] = '0';
*path = realpath(busPath, NULL);
if (*path == NULL) {
WARN("Could not find real path of %s", busPath);
+1 -1
View File
@@ -18,7 +18,7 @@
#define MAX_STR_LEN 255
#define MAX_ATTR_COUNT 16
#define MAX_SUBS 64 //Changed the value from 32 to 64 for CPX mode
#define MAX_NODES 1024
#define MAX_NODES 4096 //Changed the value from 1024 to 4096 for CPX mode
#define NODE_TYPE_NONE 0
#define NODE_TYPE_OPEN 1