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

[ROCm/rccl commit: 675b495a00]
This commit is contained in:
Bertan Dogancay
2025-06-21 22:18:20 -04:00
committad av GitHub
förälder 1e42d866da
incheckning eaa770a017
+5 -6
Visa fil
@@ -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));