Merge #3 Rebuilt for fmt 11

This commit is contained in:
Tom Rix 2024-07-20 12:14:57 +00:00
commit f3030ddf1d
2 changed files with 55 additions and 0 deletions

View file

@ -0,0 +1,54 @@
From ba2cf11d1bf1dd5086c8e793198a697d4179cca7 Mon Sep 17 00:00:00 2001
From: Kefu Chai <tchaikov@gmail.com>
Date: Tue, 16 Jul 2024 08:00:22 +0800
Subject: [PATCH] include fmt/ranges.h for using fmt::join()
fmt::join() was moved into fmt/ranges.h in fmt 11, so include this
header for using it.
Signed-off-by: Kefu Chai <tchaikov@gmail.com>
---
torch/csrc/distributed/c10d/socket.cpp | 1 +
torch/csrc/profiler/standalone/execution_trace_observer.cpp | 1 +
torch/csrc/profiler/util.cpp | 1 +
3 files changed, 3 insertions(+)
diff --git a/torch/csrc/distributed/c10d/socket.cpp b/torch/csrc/distributed/c10d/socket.cpp
index 5013f2540..cbcd33a19 100644
--- a/torch/csrc/distributed/c10d/socket.cpp
+++ b/torch/csrc/distributed/c10d/socket.cpp
@@ -31,6 +31,7 @@ C10_DIAGNOSTIC_PUSH_AND_IGNORED_IF_DEFINED("-Wdeprecated")
#include <fmt/chrono.h>
C10_DIAGNOSTIC_POP()
#include <fmt/format.h>
+#include <fmt/ranges.h>
#include <torch/csrc/distributed/c10d/error.h>
#include <torch/csrc/distributed/c10d/exception.h>
diff --git a/torch/csrc/profiler/standalone/execution_trace_observer.cpp b/torch/csrc/profiler/standalone/execution_trace_observer.cpp
index 2ef2e5423..fb053e916 100644
--- a/torch/csrc/profiler/standalone/execution_trace_observer.cpp
+++ b/torch/csrc/profiler/standalone/execution_trace_observer.cpp
@@ -10,6 +10,7 @@
#endif // _WIN32
#include <fmt/format.h>
+#include <fmt/ranges.h>
#include <chrono>
#include <cmath>
#include <fstream>
diff --git a/torch/csrc/profiler/util.cpp b/torch/csrc/profiler/util.cpp
index 896bf606c..c229ce130 100644
--- a/torch/csrc/profiler/util.cpp
+++ b/torch/csrc/profiler/util.cpp
@@ -5,6 +5,7 @@
#include <c10/util/ArrayRef.h>
#include <c10/util/irange.h>
#include <fmt/format.h>
+#include <fmt/ranges.h>
#ifdef USE_KINETO
#include <libkineto.h>
--
2.45.2

View file

@ -284,6 +284,7 @@ Patch103: 0001-can-not-use-with-c-files.patch
# Patch104: 0001-use-any-hip.patch
Patch105: 0001-disable-use-of-aotriton.patch
%endif
Patch106: 0001-include-fmt-ranges.h-for-using-fmt-join.patch
ExclusiveArch: x86_64 aarch64
%global toolchain gcc