54 lines
2.1 KiB
Diff
54 lines
2.1 KiB
Diff
From afdeb01359eecc67b573bcfb4f164ec81a1c7197 Mon Sep 17 00:00:00 2001
|
|
From: Tom Rix <Tom.Rix@amd.com>
|
|
Date: Mon, 17 Aug 2026 15:59:39 -0700
|
|
Subject: [PATCH] pytorch fmt
|
|
|
|
---
|
|
cmake/Dependencies.cmake | 31 -------------------------------
|
|
1 file changed, 31 deletions(-)
|
|
|
|
diff --git a/cmake/Dependencies.cmake b/cmake/Dependencies.cmake
|
|
index f7f938988c8e..d84eea5f1129 100644
|
|
--- a/cmake/Dependencies.cmake
|
|
+++ b/cmake/Dependencies.cmake
|
|
@@ -1635,37 +1635,6 @@ endif()
|
|
# End ATen checks
|
|
#
|
|
|
|
-# Install `fmtlib` header.
|
|
-# This was the default behavior before version 12.0.0.
|
|
-# Since PyTorch C API depends on it, make it available for projects that
|
|
-# depend on PyTorch.
|
|
-set(FMT_INSTALL ON)
|
|
-set(TEMP_BUILD_SHARED_LIBS ${BUILD_SHARED_LIBS})
|
|
-set(BUILD_SHARED_LIBS OFF CACHE BOOL "Build shared libs" FORCE)
|
|
-add_subdirectory(${PROJECT_SOURCE_DIR}/third_party/fmt)
|
|
-
|
|
-# Disable compiler feature checks for `fmt`.
|
|
-#
|
|
-# CMake compiles a little program to check compiler features. Some of our build
|
|
-# configurations (notably the mobile build analyzer) will populate
|
|
-# CMAKE_CXX_FLAGS in ways that break feature checks. Since we already know
|
|
-# `fmt` is compatible with a superset of the compilers that PyTorch is, it
|
|
-# shouldn't be too bad to just disable the checks.
|
|
-set_target_properties(fmt-header-only PROPERTIES INTERFACE_COMPILE_FEATURES "")
|
|
-
|
|
-# Keep fmt's header-only type layout stable across mixed C++ modes by forcing
|
|
-# one no_unique_address spelling for all translation units.
|
|
-if(MSVC AND NOT CMAKE_CXX_COMPILER_ID MATCHES "Clang")
|
|
- set(_fmt_no_unique_address "[[msvc::no_unique_address]]")
|
|
-else()
|
|
- set(_fmt_no_unique_address "[[no_unique_address]]")
|
|
-endif()
|
|
-target_compile_definitions(fmt PUBLIC "FMT_NO_UNIQUE_ADDRESS=${_fmt_no_unique_address}")
|
|
-target_compile_definitions(fmt-header-only INTERFACE "FMT_NO_UNIQUE_ADDRESS=${_fmt_no_unique_address}")
|
|
-unset(_fmt_no_unique_address)
|
|
-
|
|
-list(APPEND Caffe2_DEPENDENCY_LIBS fmt::fmt-header-only)
|
|
-set(BUILD_SHARED_LIBS ${TEMP_BUILD_SHARED_LIBS} CACHE BOOL "Build shared libs" FORCE)
|
|
|
|
# ---[ Kineto
|
|
# edge profiler depends on KinetoProfiler but it only does cpu
|
|
--
|
|
2.55.0
|
|
|