Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion makefiles/version.mk
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
NCCL_MAJOR := 2
NCCL_MINOR := 21
NCCL_PATCH := 5
NCCL_SUFFIX := -T3
NCCL_SUFFIX := -T4
PKG_REVISION := 1
13 changes: 7 additions & 6 deletions src/debug.cc
Original file line number Diff line number Diff line change
Expand Up @@ -175,17 +175,18 @@ void ncclDebugLog(ncclDebugLogLevel level, unsigned long flags, const char *file

char buffer[1024];
size_t len = 0;

auto delta = std::chrono::steady_clock::now() - ncclEpoch;
double timestamp = std::chrono::duration_cast<std::chrono::duration<double>>(delta).count()*1000;
if (level == NCCL_LOG_WARN) {
len = snprintf(buffer, sizeof(buffer), "\n%s:%d:%d [%d] %s:%d NCCL WARN ",
hostname, pid, tid, cudaDev, filefunc, line);
len = snprintf(buffer, sizeof(buffer), "\n%s:%d:%d [%d] %f %s:%d NCCL WARN ",
hostname, pid, tid, cudaDev, timestamp, filefunc, line);
if (ncclParamWarnSetDebugInfo()) ncclDebugLevel = NCCL_LOG_INFO;
} else if (level == NCCL_LOG_INFO) {
len = snprintf(buffer, sizeof(buffer), "%s:%d:%d [%d] NCCL INFO ", hostname, pid, tid, cudaDev);
len = snprintf(buffer, sizeof(buffer), "%s:%d:%d [%d] %f NCCL INFO ", hostname, pid, tid, cudaDev, timestamp);
} else if (level == NCCL_LOG_TRACE && flags == NCCL_CALL) {
len = snprintf(buffer, sizeof(buffer), "%s:%d:%d NCCL CALL ", hostname, pid, tid);
len = snprintf(buffer, sizeof(buffer), "%s:%d:%d %f NCCL CALL ", hostname, pid, tid, timestamp);
} else if (level == NCCL_LOG_TRACE) {
auto delta = std::chrono::steady_clock::now() - ncclEpoch;
double timestamp = std::chrono::duration_cast<std::chrono::duration<double>>(delta).count()*1000;
len = snprintf(buffer, sizeof(buffer), "%s:%d:%d [%d] %f %s:%d NCCL TRACE ",
hostname, pid, tid, cudaDev, timestamp, filefunc, line);
}
Expand Down