mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 21:14:14 +08:00
[submodule] update libfmt to tag 9.1.0 (#93219)
Pull Request resolved: https://github.com/pytorch/pytorch/pull/93219 Approved by: https://github.com/malfet, https://github.com/Skylion007, https://github.com/albanD
This commit is contained in:
@ -258,6 +258,11 @@ local_repository(
|
|||||||
path = "third_party/fbgemm",
|
path = "third_party/fbgemm",
|
||||||
)
|
)
|
||||||
|
|
||||||
|
local_repository(
|
||||||
|
name = "unused_ftm_bazel",
|
||||||
|
path = "third_party/fmt/support/bazel",
|
||||||
|
)
|
||||||
|
|
||||||
local_repository(
|
local_repository(
|
||||||
name = "unused_kineto_dynolog_googletest",
|
name = "unused_kineto_dynolog_googletest",
|
||||||
path = "third_party/kineto/libkineto/third_party/dynolog/third_party/googletest",
|
path = "third_party/kineto/libkineto/third_party/dynolog/third_party/googletest",
|
||||||
|
|||||||
2
third_party/fmt
vendored
2
third_party/fmt
vendored
Submodule third_party/fmt updated: 7bdf0628b1...a33701196a
2
third_party/kineto
vendored
2
third_party/kineto
vendored
Submodule third_party/kineto updated: a2d16d5f38...2da532c91d
@ -1,11 +1,10 @@
|
|||||||
#include <torch/csrc/Exceptions.h>
|
#include <torch/csrc/Exceptions.h>
|
||||||
#include <torch/csrc/python_headers.h>
|
#include <torch/csrc/python_headers.h>
|
||||||
|
|
||||||
|
#include <array>
|
||||||
#include <cstdarg>
|
#include <cstdarg>
|
||||||
#include <exception>
|
#include <exception>
|
||||||
#include <sstream>
|
|
||||||
#include <utility>
|
#include <utility>
|
||||||
#include <vector>
|
|
||||||
|
|
||||||
#include <fmt/format.h>
|
#include <fmt/format.h>
|
||||||
#include <torch/csrc/THP.h>
|
#include <torch/csrc/THP.h>
|
||||||
@ -281,16 +280,13 @@ PyWarningHandler::~PyWarningHandler() noexcept(false) {
|
|||||||
} else {
|
} else {
|
||||||
// Lets Python set the source location and puts the C++ warning
|
// Lets Python set the source location and puts the C++ warning
|
||||||
// location into the message.
|
// location into the message.
|
||||||
fmt::memory_buffer buf;
|
auto buf = fmt::format(
|
||||||
fmt::format_to(
|
"{} (Triggered internally at {}:{}.)",
|
||||||
buf,
|
|
||||||
FMT_STRING("{} (Triggered internally at {}:{}.)"),
|
|
||||||
msg,
|
msg,
|
||||||
source_location.file,
|
source_location.file,
|
||||||
source_location.line);
|
source_location.line);
|
||||||
buf.push_back('\0');
|
|
||||||
result =
|
result =
|
||||||
PyErr_WarnEx(map_warning_to_python_type(warning), buf.data(), 1);
|
PyErr_WarnEx(map_warning_to_python_type(warning), buf.c_str(), 1);
|
||||||
}
|
}
|
||||||
if (result < 0) {
|
if (result < 0) {
|
||||||
if (in_exception_) {
|
if (in_exception_) {
|
||||||
|
|||||||
@ -92,7 +92,7 @@ std::string makeRPCError(
|
|||||||
return fmt::format(
|
return fmt::format(
|
||||||
"{}:{}:{}",
|
"{}:{}:{}",
|
||||||
torch::distributed::rpc::kRPCErrorPrefix,
|
torch::distributed::rpc::kRPCErrorPrefix,
|
||||||
errorType,
|
static_cast<int>(errorType),
|
||||||
rpcErrorStr);
|
rpcErrorStr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user