Compare commits

...

1 Commits

Author SHA1 Message Date
5b3b4e134e allow providing full fr trace path
Summary:
- allow users to specify the full path instead of fr suffixing the rank id
- this will be used by torchft to provide the global rank id accross all replicas
- we can't just prefix the replica id because analysis tool expects the file name to provide a unique integer
2025-10-16 09:33:32 -07:00

View File

@ -7,7 +7,10 @@ namespace c10d {
void DebugInfoWriter::write(const std::string& trace) {
std::string filename = filename_;
if (enable_dynamic_filename_) {
filename = c10::str(getCvarString({"TORCH_FR_DUMP_TEMP_FILE"}, ""), rank_);
LOG(INFO) << "Writing Flight Recorder debug info to a dynamic file name";
filename = c10::str(getCvarString({"TORCH_FR_DUMP_TEMP_FILE"}, ""));
} else {
LOG(INFO) << "Writing Flight Recorder debug info to a static file name";
}
// Open a file for writing. The ios::binary flag is used to write data as
// binary.