Skip to content

Commit

Permalink
[submodule] Pin fmtlib/fmt to 10.1.0 (pytorch#106672)
Browse files Browse the repository at this point in the history
fmt10.1.0 fixes a bug of format_string_checker initialisation order which is important to our improved clang-tidy checks pytorch#103058. This PR upgrades third_party fmt to 10.1.0, in the meanwhile, kineto is also upgraded to avoid fmt errors.

Pull Request resolved: pytorch#106672
Approved by: https://github.com/Skylion007
  • Loading branch information
cyyever authored and pytorchmergebot committed Aug 15, 2023
1 parent 20c5add commit b7431d8
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 11 deletions.
8 changes: 4 additions & 4 deletions aten/src/ATen/mps/MPSProfiler.mm
Original file line number Diff line number Diff line change
Expand Up @@ -504,7 +504,7 @@
opInfo->runCount,
fmt::format("{:.3f}", opInfo->totalSchedulingTime / double(opInfo->runCount)),
fmt::format("{:.3f}", opInfo->totalGpuTime / double(opInfo->runCount)),
fmt::format("{:.3f}", opInfo->totalGpuTime),
fmt::format("{:.3f}", opInfo->totalGpuTime.load()),
opInfo->strKey);
}
}
Expand Down Expand Up @@ -556,7 +556,7 @@
cpuFbInfo->profileId,
cpuFbInfo->runCount,
fmt::format("{:.3f}", cpuFbInfo->totalSchedulingTime / double(cpuFbInfo->runCount)),
fmt::format("{:.3f}", cpuFbInfo->totalSchedulingTime),
fmt::format("{:.3f}", cpuFbInfo->totalSchedulingTime.load()),
getIMPSAllocator()->formatSize(cpuFbInfo->totalCopyOverhead),
cpuFbInfo->opName);
}
Expand Down Expand Up @@ -607,8 +607,8 @@
copyStat.kindStr,
copyStat.totalCount,
getIMPSAllocator()->formatSize(copyStat.length),
fmt::format("{:.3f}", copyStat.totalSchedulingTime),
fmt::format("{:.3f}", copyStat.totalGpuTime),
fmt::format("{:.3f}", copyStat.totalSchedulingTime.load()),
fmt::format("{:.3f}", copyStat.totalGpuTime.load()),
copyStat.scalarsCount,
fmt::format("{:.2f} %",
copyStat.totalGpuTime > 0.0
Expand Down
2 changes: 1 addition & 1 deletion third_party/fmt
Submodule fmt updated 69 files
+8 −0 .github/dependabot.yml
+3 −2 .github/pull_request_template.md
+30 −0 .github/workflows/cifuzz.yml
+9 −1 .github/workflows/doc.yml
+30 −13 .github/workflows/linux.yml
+17 −2 .github/workflows/macos.yml
+12 −4 .github/workflows/windows.yml
+98 −41 CMakeLists.txt
+618 −1 ChangeLog.rst
+1 −1 LICENSE.rst
+39 −28 README.rst
+200 −145 doc/api.rst
+5 −6 doc/build.py
+134 −8 doc/syntax.rst
+1 −1 include/fmt/args.h
+466 −327 include/fmt/chrono.h
+18 −37 include/fmt/color.h
+27 −104 include/fmt/compile.h
+742 −1,141 include/fmt/core.h
+91 −152 include/fmt/format-inl.h
+1,065 −783 include/fmt/format.h
+44 −71 include/fmt/os.h
+22 −50 include/fmt/ostream.h
+201 −174 include/fmt/printf.h
+158 −145 include/fmt/ranges.h
+306 −37 include/fmt/std.h
+62 −33 include/fmt/xchar.h
+40 −29 src/fmt.cc
+1 −5 src/format.cc
+99 −62 src/os.cc
+3 −3 support/Vagrantfile
+0 −1 support/bazel/.bazelrc
+1 −1 support/bazel/.bazelversion
+2 −2 support/bazel/BUILD.bazel
+5 −4 support/bazel/README.md
+1 −1 support/build.gradle
+0 −54 support/cmake/cxx14.cmake
+7 −0 support/rst2md.py
+15 −3 test/CMakeLists.txt
+1 −1 test/add-subdirectory-test/CMakeLists.txt
+1 −1 test/args-test.cc
+386 −26 test/chrono-test.cc
+2 −2 test/compile-error-test/CMakeLists.txt
+1 −0 test/compile-fp-test.cc
+7 −40 test/compile-test.cc
+119 −239 test/core-test.cc
+2 −0 test/enforce-checks-test.cc
+1 −1 test/find-package-test/CMakeLists.txt
+27 −91 test/format-impl-test.cc
+278 −329 test/format-test.cc
+1 −1 test/fuzzing/CMakeLists.txt
+2 −0 test/gtest-extra-test.cc
+1 −6 test/gtest-extra.h
+1 −7 test/gtest/CMakeLists.txt
+1 −1 test/gtest/gmock-gtest-all.cc
+2 −2 test/mock-allocator.h
+36 −88 test/module-test.cc
+15 −56 test/os-test.cc
+16 −47 test/ostream-test.cc
+1 −7 test/posix-mock-test.cc
+0 −2 test/posix-mock.h
+13 −37 test/printf-test.cc
+138 −35 test/ranges-test.cc
+1 −1 test/scan-test.cc
+17 −14 test/scan.h
+1 −1 test/static-export-test/CMakeLists.txt
+179 −20 test/std-test.cc
+2 −6 test/util.h
+118 −55 test/xchar-test.cc
14 changes: 9 additions & 5 deletions torch/csrc/distributed/rpc/agent_utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -156,13 +156,17 @@ static std::atomic<int> barrierId(0);

static std::tuple<std::string, std::string, std::string> getNextKeyIds() {
barrierId++;
std::string processCountKey =
fmt::format("{}{}{}", storeKeyProcessCount, storeKeyBarrierId, barrierId);
auto newBarrierId = barrierId.load();
std::string processCountKey = fmt::format(
"{}{}{}", storeKeyProcessCount, storeKeyBarrierId, newBarrierId);
std::string activeCallCountKey = fmt::format(
"{}{}{}", storeKeyActiveCallCount, storeKeyBarrierId, barrierId);
"{}{}{}", storeKeyActiveCallCount, storeKeyBarrierId, newBarrierId);
std::string barrierKey =
fmt::format("{}{}{}", storeKeyReady, storeKeyBarrierId, barrierId);
return std::make_tuple(processCountKey, activeCallCountKey, barrierKey);
fmt::format("{}{}{}", storeKeyReady, storeKeyBarrierId, newBarrierId);
return std::make_tuple(
std::move(processCountKey),
std::move(activeCallCountKey),
std::move(barrierKey));
}

// Synchronize process with all other agent processes strictly using store
Expand Down

0 comments on commit b7431d8

Please sign in to comment.