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

Этот коммит содержится в:
Bertan Dogancay
2025-06-21 22:18:20 -04:00
коммит произвёл GitHub
родитель 0c1795c64b
Коммит 675b495a00
+5 -6
Просмотреть файл
@@ -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));