[NPKit] Create dump dir regardless of default or user provided path (#1757)

Tento commit je obsažen v:
Bertan Dogancay authored and GitHub committed 2025-06-21 21:18:20 -05:00
1 rodič 0c1795c64b
revize 675b495a00
1 file changed
+5 -6
+5 -6
Zobrazit soubor
@@ -2576,12 +2576,11 @@ static ncclResult_t commCleanup(ncclComm_t comm) {
if (npkitDumpDir == nullptr) {
npkitDumpDir = "./npkit_dump";
INFO(NCCL_INIT, "NPKIT_DUMP_DIR is not set, using default directory: %s", npkitDumpDir);
struct stat st;
if (stat(npkitDumpDir, &st) != 0) {
if (mkdir(npkitDumpDir, 0755) != 0) {
WARN("Failed to create NPKIT_DUMP_DIR directory: %s", npkitDumpDir);
}
}
struct stat st;
if (stat(npkitDumpDir, &st) != 0) {
if (mkdir(npkitDumpDir, 0755) != 0) {
WARN("Failed to create NPKIT_DUMP_DIR directory: %s", npkitDumpDir);
}
}
NCCLCHECK(NpKit::Dump(npkitDumpDir));