Prepare for the next release
Signed-off-by: Tom Rix <trix@redhat.com>
This commit is contained in:
parent
f79fcb50df
commit
66733ffbd2
10 changed files with 420 additions and 15 deletions
39
next/0001-Regenerate-flatbuffer-header.patch
Normal file
39
next/0001-Regenerate-flatbuffer-header.patch
Normal file
|
|
@ -0,0 +1,39 @@
|
||||||
|
From 5b8e51b24513fa851eeff42f23d942bde301e321 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Tom Rix <trix@redhat.com>
|
||||||
|
Date: Fri, 29 Sep 2023 06:19:29 -0700
|
||||||
|
Subject: [PATCH] Regenerate flatbuffer header
|
||||||
|
|
||||||
|
For this error
|
||||||
|
torch/csrc/jit/serialization/mobile_bytecode_generated.h:12:41:
|
||||||
|
error: static assertion failed: Non-compatible flatbuffers version included
|
||||||
|
12 | FLATBUFFERS_VERSION_MINOR == 3 &&
|
||||||
|
|
||||||
|
PyTorch is expecting 23.3.3, what f38 has
|
||||||
|
Rawhide is at 23.5.26
|
||||||
|
|
||||||
|
Regenerate with
|
||||||
|
flatc --cpp --gen-mutable --no-prefix --scoped-enums mobile_bytecode.fbs
|
||||||
|
|
||||||
|
Signed-off-by: Tom Rix <trix@redhat.com>
|
||||||
|
---
|
||||||
|
torch/csrc/jit/serialization/mobile_bytecode_generated.h | 4 ++--
|
||||||
|
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/torch/csrc/jit/serialization/mobile_bytecode_generated.h b/torch/csrc/jit/serialization/mobile_bytecode_generated.h
|
||||||
|
index cffe8bc7a6..83575e4c19 100644
|
||||||
|
--- a/torch/csrc/jit/serialization/mobile_bytecode_generated.h
|
||||||
|
+++ b/torch/csrc/jit/serialization/mobile_bytecode_generated.h
|
||||||
|
@@ -9,8 +9,8 @@
|
||||||
|
// Ensure the included flatbuffers.h is the same version as when this file was
|
||||||
|
// generated, otherwise it may not be compatible.
|
||||||
|
static_assert(FLATBUFFERS_VERSION_MAJOR == 23 &&
|
||||||
|
- FLATBUFFERS_VERSION_MINOR == 3 &&
|
||||||
|
- FLATBUFFERS_VERSION_REVISION == 3,
|
||||||
|
+ FLATBUFFERS_VERSION_MINOR == 5 &&
|
||||||
|
+ FLATBUFFERS_VERSION_REVISION == 26,
|
||||||
|
"Non-compatible flatbuffers version included");
|
||||||
|
|
||||||
|
namespace torch {
|
||||||
|
--
|
||||||
|
2.43.0
|
||||||
|
|
||||||
73
next/0001-Stub-in-kineto-ActivityType.patch
Normal file
73
next/0001-Stub-in-kineto-ActivityType.patch
Normal file
|
|
@ -0,0 +1,73 @@
|
||||||
|
From 3ef82b814179da571b2478f61d4279717ab0b23a Mon Sep 17 00:00:00 2001
|
||||||
|
From: Tom Rix <trix@redhat.com>
|
||||||
|
Date: Fri, 29 Sep 2023 06:25:23 -0700
|
||||||
|
Subject: [PATCH] Stub in kineto ActivityType
|
||||||
|
|
||||||
|
There is an error with kineto is not used, the shim still
|
||||||
|
requires the ActivityTYpe.h header to get the enum Activity type.
|
||||||
|
So cut-n-paste just enough of the header in to do this.
|
||||||
|
|
||||||
|
Signed-off-by: Tom Rix <trix@redhat.com>
|
||||||
|
---
|
||||||
|
torch/csrc/profiler/kineto_shim.h | 44 +++++++++++++++++++++++++++++++
|
||||||
|
1 file changed, 44 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/torch/csrc/profiler/kineto_shim.h b/torch/csrc/profiler/kineto_shim.h
|
||||||
|
index e92cbf003d..68985ab7d0 100644
|
||||||
|
--- a/torch/csrc/profiler/kineto_shim.h
|
||||||
|
+++ b/torch/csrc/profiler/kineto_shim.h
|
||||||
|
@@ -12,7 +12,51 @@
|
||||||
|
#undef USE_KINETO
|
||||||
|
#endif
|
||||||
|
|
||||||
|
+#ifdef USE_KINETO
|
||||||
|
#include <ActivityType.h>
|
||||||
|
+#else
|
||||||
|
+namespace libkineto {
|
||||||
|
+// copied from header
|
||||||
|
+/*
|
||||||
|
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
|
||||||
|
+ * All rights reserved.
|
||||||
|
+ *
|
||||||
|
+ * This source code is licensed under the BSD-style license found in the
|
||||||
|
+ * LICENSE file in the root directory of this source tree.
|
||||||
|
+ */
|
||||||
|
+
|
||||||
|
+// Note : All activity types are not enabled by default. Please add them
|
||||||
|
+// at correct position in the enum
|
||||||
|
+enum class ActivityType {
|
||||||
|
+ // Activity types enabled by default
|
||||||
|
+ CPU_OP = 0, // cpu side ops
|
||||||
|
+ USER_ANNOTATION,
|
||||||
|
+ GPU_USER_ANNOTATION,
|
||||||
|
+ GPU_MEMCPY,
|
||||||
|
+ GPU_MEMSET,
|
||||||
|
+ CONCURRENT_KERNEL, // on-device kernels
|
||||||
|
+ EXTERNAL_CORRELATION,
|
||||||
|
+ CUDA_RUNTIME, // host side cuda runtime events
|
||||||
|
+ CUDA_DRIVER, // host side cuda driver events
|
||||||
|
+ CPU_INSTANT_EVENT, // host side point-like events
|
||||||
|
+ PYTHON_FUNCTION,
|
||||||
|
+ OVERHEAD, // CUPTI induced overhead events sampled from its overhead API.
|
||||||
|
+
|
||||||
|
+ // Optional Activity types
|
||||||
|
+ CUDA_SYNC, // synchronization events between runtime and kernels
|
||||||
|
+ GLOW_RUNTIME, // host side glow runtime events
|
||||||
|
+ MTIA_RUNTIME, // host side MTIA runtime events
|
||||||
|
+ CUDA_PROFILER_RANGE, // CUPTI Profiler range for performance metrics
|
||||||
|
+ MTIA_CCP_EVENTS, // MTIA ondevice CCP events
|
||||||
|
+ HPU_OP, // HPU host side runtime event
|
||||||
|
+ XPU_RUNTIME, // host side xpu runtime events
|
||||||
|
+
|
||||||
|
+ ENUM_COUNT, // This is to add buffer and not used for any profiling logic. Add your new type before it.
|
||||||
|
+ OPTIONAL_ACTIVITY_TYPE_START = CUDA_SYNC,
|
||||||
|
+};
|
||||||
|
+}
|
||||||
|
+
|
||||||
|
+#endif
|
||||||
|
|
||||||
|
#include <torch/csrc/Export.h>
|
||||||
|
#include <torch/csrc/profiler/api.h>
|
||||||
|
--
|
||||||
|
2.43.0
|
||||||
|
|
||||||
25
next/0001-can-not-use-with-c-files.patch
Normal file
25
next/0001-can-not-use-with-c-files.patch
Normal file
|
|
@ -0,0 +1,25 @@
|
||||||
|
From a5dff521691a17701b5a02ec75e84cfe1bf605f7 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Tom Rix <trix@redhat.com>
|
||||||
|
Date: Sat, 3 Feb 2024 06:41:49 -0500
|
||||||
|
Subject: [PATCH] can not use with c files
|
||||||
|
|
||||||
|
---
|
||||||
|
cmake/Dependencies.cmake | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/cmake/Dependencies.cmake b/cmake/Dependencies.cmake
|
||||||
|
index 4dd8042058..5f91f3ffab 100644
|
||||||
|
--- a/cmake/Dependencies.cmake
|
||||||
|
+++ b/cmake/Dependencies.cmake
|
||||||
|
@@ -1269,7 +1269,7 @@ if(USE_ROCM)
|
||||||
|
list(APPEND HIP_CXX_FLAGS -Wno-duplicate-decl-specifier)
|
||||||
|
list(APPEND HIP_CXX_FLAGS -DCAFFE2_USE_MIOPEN)
|
||||||
|
list(APPEND HIP_CXX_FLAGS -DTHRUST_DEVICE_SYSTEM=THRUST_DEVICE_SYSTEM_HIP)
|
||||||
|
- list(APPEND HIP_CXX_FLAGS -std=c++17)
|
||||||
|
+# list(APPEND HIP_CXX_FLAGS -std=c++17)
|
||||||
|
if(ROCM_VERSION_DEV VERSION_GREATER_EQUAL "6.0.0")
|
||||||
|
list(APPEND HIP_CXX_FLAGS -DHIPBLAS_V2)
|
||||||
|
endif()
|
||||||
|
--
|
||||||
|
2.43.0
|
||||||
|
|
||||||
42
next/0001-cuda-hip-signatures.patch
Normal file
42
next/0001-cuda-hip-signatures.patch
Normal file
|
|
@ -0,0 +1,42 @@
|
||||||
|
From 214dc959acc809e1959643272c344ee5335d5a69 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Tom Rix <trix@redhat.com>
|
||||||
|
Date: Thu, 1 Feb 2024 11:29:47 -0500
|
||||||
|
Subject: [PATCH] cuda - hip signatures
|
||||||
|
|
||||||
|
---
|
||||||
|
aten/src/ATen/cuda/detail/LazyNVRTC.cpp | 9 +++++++++
|
||||||
|
1 file changed, 9 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/aten/src/ATen/cuda/detail/LazyNVRTC.cpp b/aten/src/ATen/cuda/detail/LazyNVRTC.cpp
|
||||||
|
index 1b85e7776e..bb6f88783a 100644
|
||||||
|
--- a/aten/src/ATen/cuda/detail/LazyNVRTC.cpp
|
||||||
|
+++ b/aten/src/ATen/cuda/detail/LazyNVRTC.cpp
|
||||||
|
@@ -134,8 +134,13 @@ nvrtcResult nvrtcCreateProgram(nvrtcProgram *prog,
|
||||||
|
const char *src,
|
||||||
|
const char *name,
|
||||||
|
int numHeaders,
|
||||||
|
+#if !defined(USE_ROCM)
|
||||||
|
const char * const *headers,
|
||||||
|
const char * const *includeNames) {
|
||||||
|
+#else
|
||||||
|
+ const char **headers,
|
||||||
|
+ const char **includeNames) {
|
||||||
|
+#endif
|
||||||
|
auto fn = reinterpret_cast<decltype(&nvrtcCreateProgram)>(getNVRTCLibrary().sym(__func__));
|
||||||
|
if (!fn)
|
||||||
|
throw std::runtime_error("Can't get nvrtcCreateProgram");
|
||||||
|
@@ -150,7 +155,11 @@ NVRTC_STUB2(nvrtcGetPTX, nvrtcProgram, char *);
|
||||||
|
NVRTC_STUB2(nvrtcGetCUBINSize, nvrtcProgram, size_t *);
|
||||||
|
NVRTC_STUB2(nvrtcGetCUBIN, nvrtcProgram, char *);
|
||||||
|
#endif
|
||||||
|
+#if !defined(USE_ROCM)
|
||||||
|
NVRTC_STUB3(nvrtcCompileProgram, nvrtcProgram, int, const char * const *);
|
||||||
|
+#else
|
||||||
|
+NVRTC_STUB3(nvrtcCompileProgram, nvrtcProgram, int, const char **);
|
||||||
|
+#endif
|
||||||
|
_STUB_1(NVRTC, nvrtcGetErrorString, const char *, nvrtcResult);
|
||||||
|
NVRTC_STUB2(nvrtcGetProgramLogSize,nvrtcProgram, size_t*);
|
||||||
|
NVRTC_STUB2(nvrtcGetProgramLog, nvrtcProgram, char *);
|
||||||
|
--
|
||||||
|
2.43.0
|
||||||
|
|
||||||
25
next/0001-disable-submodule-search.patch
Normal file
25
next/0001-disable-submodule-search.patch
Normal file
|
|
@ -0,0 +1,25 @@
|
||||||
|
From e0b0ea90ecc0dbefc6aef2650e88ba88260935b9 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Tom Rix <trix@redhat.com>
|
||||||
|
Date: Fri, 29 Sep 2023 17:21:13 -0700
|
||||||
|
Subject: [PATCH] disable submodule search
|
||||||
|
|
||||||
|
---
|
||||||
|
setup.py | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/setup.py b/setup.py
|
||||||
|
index 0fd886d945..e397df8fb6 100644
|
||||||
|
--- a/setup.py
|
||||||
|
+++ b/setup.py
|
||||||
|
@@ -458,7 +458,7 @@ def mirror_files_into_torchgen():
|
||||||
|
def build_deps():
|
||||||
|
report("-- Building version " + version)
|
||||||
|
|
||||||
|
- check_submodules()
|
||||||
|
+ # check_submodules()
|
||||||
|
check_pydep("yaml", "pyyaml")
|
||||||
|
|
||||||
|
build_caffe2(
|
||||||
|
--
|
||||||
|
2.43.0
|
||||||
|
|
||||||
54
next/0001-no-third_party-FXdiv.patch
Normal file
54
next/0001-no-third_party-FXdiv.patch
Normal file
|
|
@ -0,0 +1,54 @@
|
||||||
|
From b3b307add5724ee5730f161e16594fa702f34a19 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Tom Rix <trix@redhat.com>
|
||||||
|
Date: Sat, 3 Feb 2024 08:20:28 -0500
|
||||||
|
Subject: [PATCH] no third_party FXdiv
|
||||||
|
|
||||||
|
---
|
||||||
|
caffe2/CMakeLists.txt | 24 ++++++++++++------------
|
||||||
|
1 file changed, 12 insertions(+), 12 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/caffe2/CMakeLists.txt b/caffe2/CMakeLists.txt
|
||||||
|
index b2f3adbfae..80a5625c8d 100644
|
||||||
|
--- a/caffe2/CMakeLists.txt
|
||||||
|
+++ b/caffe2/CMakeLists.txt
|
||||||
|
@@ -110,15 +110,15 @@ endif()
|
||||||
|
# Note: the folders that are being commented out have not been properly
|
||||||
|
# addressed yet.
|
||||||
|
|
||||||
|
-if(NOT MSVC AND USE_XNNPACK)
|
||||||
|
- if(NOT TARGET fxdiv)
|
||||||
|
- set(FXDIV_BUILD_TESTS OFF CACHE BOOL "")
|
||||||
|
- set(FXDIV_BUILD_BENCHMARKS OFF CACHE BOOL "")
|
||||||
|
- add_subdirectory(
|
||||||
|
- "${FXDIV_SOURCE_DIR}"
|
||||||
|
- "${CMAKE_BINARY_DIR}/FXdiv")
|
||||||
|
- endif()
|
||||||
|
-endif()
|
||||||
|
+#if(NOT MSVC AND USE_XNNPACK)
|
||||||
|
+# if(NOT TARGET fxdiv)
|
||||||
|
+# set(FXDIV_BUILD_TESTS OFF CACHE BOOL "")
|
||||||
|
+# set(FXDIV_BUILD_BENCHMARKS OFF CACHE BOOL "")
|
||||||
|
+# add_subdirectory(
|
||||||
|
+# "${FXDIV_SOURCE_DIR}"
|
||||||
|
+# "${CMAKE_BINARY_DIR}/FXdiv")
|
||||||
|
+# endif()
|
||||||
|
+#endif()
|
||||||
|
|
||||||
|
add_subdirectory(core)
|
||||||
|
add_subdirectory(serialize)
|
||||||
|
@@ -1081,9 +1081,9 @@ if(USE_XPU)
|
||||||
|
target_compile_definitions(torch_xpu PRIVATE USE_XPU)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
-if(NOT MSVC AND USE_XNNPACK)
|
||||||
|
- TARGET_LINK_LIBRARIES(torch_cpu PRIVATE fxdiv)
|
||||||
|
-endif()
|
||||||
|
+#if(NOT MSVC AND USE_XNNPACK)
|
||||||
|
+# TARGET_LINK_LIBRARIES(torch_cpu PRIVATE fxdiv)
|
||||||
|
+#endif()
|
||||||
|
|
||||||
|
# ==========================================================
|
||||||
|
# formerly-libtorch flags
|
||||||
|
--
|
||||||
|
2.43.0
|
||||||
|
|
||||||
65
next/0001-no-third_party-fmt.patch
Normal file
65
next/0001-no-third_party-fmt.patch
Normal file
|
|
@ -0,0 +1,65 @@
|
||||||
|
From c46146dc31ed3dc0ebb6ca28c01330db8ba5d4f2 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Tom Rix <trix@redhat.com>
|
||||||
|
Date: Sat, 3 Feb 2024 08:16:04 -0500
|
||||||
|
Subject: [PATCH] no third_party fmt
|
||||||
|
|
||||||
|
---
|
||||||
|
c10/CMakeLists.txt | 2 +-
|
||||||
|
cmake/Dependencies.cmake | 6 +++---
|
||||||
|
torch/CMakeLists.txt | 2 +-
|
||||||
|
3 files changed, 5 insertions(+), 5 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/c10/CMakeLists.txt b/c10/CMakeLists.txt
|
||||||
|
index cb81556ff2..7529b2aec9 100644
|
||||||
|
--- a/c10/CMakeLists.txt
|
||||||
|
+++ b/c10/CMakeLists.txt
|
||||||
|
@@ -87,7 +87,7 @@ endif()
|
||||||
|
if(C10_USE_GLOG)
|
||||||
|
target_link_libraries(c10 PUBLIC glog::glog)
|
||||||
|
endif()
|
||||||
|
-target_link_libraries(c10 PRIVATE fmt::fmt-header-only)
|
||||||
|
+target_link_libraries(c10 PRIVATE fmt)
|
||||||
|
|
||||||
|
if(C10_USE_NUMA)
|
||||||
|
target_include_directories(c10 PRIVATE ${Numa_INCLUDE_DIR})
|
||||||
|
diff --git a/cmake/Dependencies.cmake b/cmake/Dependencies.cmake
|
||||||
|
index 8310f29e01..c99d0d762a 100644
|
||||||
|
--- a/cmake/Dependencies.cmake
|
||||||
|
+++ b/cmake/Dependencies.cmake
|
||||||
|
@@ -1834,7 +1834,7 @@ endif()
|
||||||
|
#
|
||||||
|
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)
|
||||||
|
+# add_subdirectory(${PROJECT_SOURCE_DIR}/third_party/fmt)
|
||||||
|
|
||||||
|
# Disable compiler feature checks for `fmt`.
|
||||||
|
#
|
||||||
|
@@ -1843,9 +1843,9 @@ add_subdirectory(${PROJECT_SOURCE_DIR}/third_party/fmt)
|
||||||
|
# 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 "")
|
||||||
|
+# set_target_properties(fmt-header-only PROPERTIES INTERFACE_COMPILE_FEATURES "")
|
||||||
|
|
||||||
|
-list(APPEND Caffe2_DEPENDENCY_LIBS fmt::fmt-header-only)
|
||||||
|
+# list(APPEND Caffe2_DEPENDENCY_LIBS fmt::fmt-header-only)
|
||||||
|
set(BUILD_SHARED_LIBS ${TEMP_BUILD_SHARED_LIBS} CACHE BOOL "Build shared libs" FORCE)
|
||||||
|
|
||||||
|
# ---[ Kineto
|
||||||
|
diff --git a/torch/CMakeLists.txt b/torch/CMakeLists.txt
|
||||||
|
index 24903a207e..3a7751dc00 100644
|
||||||
|
--- a/torch/CMakeLists.txt
|
||||||
|
+++ b/torch/CMakeLists.txt
|
||||||
|
@@ -80,7 +80,7 @@ set(TORCH_PYTHON_LINK_LIBRARIES
|
||||||
|
python::python
|
||||||
|
pybind::pybind11
|
||||||
|
shm
|
||||||
|
- fmt::fmt-header-only
|
||||||
|
+ fmt
|
||||||
|
ATEN_CPU_FILES_GEN_LIB)
|
||||||
|
|
||||||
|
if(USE_ASAN AND TARGET Sanitizer::address)
|
||||||
|
--
|
||||||
|
2.43.0
|
||||||
|
|
||||||
36
next/0001-no-third_party-foxi.patch
Normal file
36
next/0001-no-third_party-foxi.patch
Normal file
|
|
@ -0,0 +1,36 @@
|
||||||
|
From 8cb61cf9282102ac225645fcc9fb4a1bb7cb15a2 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Tom Rix <trix@redhat.com>
|
||||||
|
Date: Sat, 3 Feb 2024 08:11:55 -0500
|
||||||
|
Subject: [PATCH] no third_party foxi
|
||||||
|
|
||||||
|
---
|
||||||
|
cmake/Dependencies.cmake | 6 +++---
|
||||||
|
1 file changed, 3 insertions(+), 3 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/cmake/Dependencies.cmake b/cmake/Dependencies.cmake
|
||||||
|
index 5f91f3ffab..8e1461af81 100644
|
||||||
|
--- a/cmake/Dependencies.cmake
|
||||||
|
+++ b/cmake/Dependencies.cmake
|
||||||
|
@@ -1567,7 +1567,7 @@ if(CAFFE2_CMAKE_BUILDING_WITH_MAIN_REPO AND NOT INTERN_DISABLE_ONNX)
|
||||||
|
set_target_properties(onnx_proto PROPERTIES CXX_STANDARD 17)
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
- add_subdirectory(${CMAKE_CURRENT_LIST_DIR}/../third_party/foxi EXCLUDE_FROM_ALL)
|
||||||
|
+ # add_subdirectory(${CMAKE_CURRENT_LIST_DIR}/../third_party/foxi EXCLUDE_FROM_ALL)
|
||||||
|
|
||||||
|
add_definitions(-DONNX_NAMESPACE=${ONNX_NAMESPACE})
|
||||||
|
if(NOT USE_SYSTEM_ONNX)
|
||||||
|
@@ -1600,8 +1600,8 @@ if(CAFFE2_CMAKE_BUILDING_WITH_MAIN_REPO AND NOT INTERN_DISABLE_ONNX)
|
||||||
|
message("-- Found onnx: ${ONNX_LIBRARY} ${ONNX_PROTO_LIBRARY}")
|
||||||
|
list(APPEND Caffe2_DEPENDENCY_LIBS onnx_proto onnx)
|
||||||
|
endif()
|
||||||
|
- include_directories(${FOXI_INCLUDE_DIRS})
|
||||||
|
- list(APPEND Caffe2_DEPENDENCY_LIBS foxi_loader)
|
||||||
|
+# include_directories(${FOXI_INCLUDE_DIRS})
|
||||||
|
+# list(APPEND Caffe2_DEPENDENCY_LIBS foxi_loader)
|
||||||
|
# Recover the build shared libs option.
|
||||||
|
set(BUILD_SHARED_LIBS ${TEMP_BUILD_SHARED_LIBS})
|
||||||
|
endif()
|
||||||
|
--
|
||||||
|
2.43.0
|
||||||
|
|
||||||
25
next/0001-silence-an-assert.patch
Normal file
25
next/0001-silence-an-assert.patch
Normal file
|
|
@ -0,0 +1,25 @@
|
||||||
|
From 04dd33db93b852fdfd7ea408813080b2e2026650 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Tom Rix <trix@redhat.com>
|
||||||
|
Date: Sat, 3 Feb 2024 06:41:20 -0500
|
||||||
|
Subject: [PATCH] silence an assert
|
||||||
|
|
||||||
|
---
|
||||||
|
aten/src/ATen/native/cuda/IndexKernel.cu | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/aten/src/ATen/native/cuda/IndexKernel.cu b/aten/src/ATen/native/cuda/IndexKernel.cu
|
||||||
|
index 657c0c77b3..b406aa6687 100644
|
||||||
|
--- a/aten/src/ATen/native/cuda/IndexKernel.cu
|
||||||
|
+++ b/aten/src/ATen/native/cuda/IndexKernel.cu
|
||||||
|
@@ -249,7 +249,7 @@ void index_put_kernel_quantized_cuda(TensorIterator& iter, const IntArrayRef ind
|
||||||
|
|
||||||
|
gpu_index_kernel(iter, index_size, index_stride, [inv_scale, zero_point, qmin, qmax]C10_DEVICE(char* const out_data, const char* const in_data, const int64_t offset) {
|
||||||
|
int64_t qvalue = static_cast<int64_t>(zero_point + nearbyintf(*(float*)in_data * inv_scale));
|
||||||
|
- qvalue = std::clamp(qvalue, qmin, qmax);
|
||||||
|
+ //qvalue = std::clamp(qvalue, qmin, qmax);
|
||||||
|
*(scalar_t*)(out_data + offset) = static_cast<scalar_t>(qvalue);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
--
|
||||||
|
2.43.0
|
||||||
|
|
||||||
|
|
@ -1,5 +1,4 @@
|
||||||
%global pypi_name torch
|
%global pypi_name torch
|
||||||
%global pypi_version 2.1.2
|
|
||||||
|
|
||||||
# Where the src comes from
|
# Where the src comes from
|
||||||
%global forgeurl https://github.com/pytorch/pytorch
|
%global forgeurl https://github.com/pytorch/pytorch
|
||||||
|
|
@ -7,9 +6,14 @@
|
||||||
# So pre releases can be tried
|
# So pre releases can be tried
|
||||||
%bcond_with gitcommit
|
%bcond_with gitcommit
|
||||||
%if %{with gitcommit}
|
%if %{with gitcommit}
|
||||||
# The top of the 2.1.0 branch - update to whatever..
|
# The top of tree ~2/1/24
|
||||||
%global commit0 1841d54370d167365d15f0ac78efc2c56cdf43ab
|
%global commit0 a43c28368c184ba1bf964f4fb99bec300917e2f4
|
||||||
%global shortcommit0 %(c=%{commit0}; echo ${c:0:7})
|
%global shortcommit0 %(c=%{commit0}; echo ${c:0:7})
|
||||||
|
|
||||||
|
%global pypi_version 2.3.0
|
||||||
|
%else
|
||||||
|
%global pypi_version 2.1.2
|
||||||
|
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
# For -test subpackage
|
# For -test subpackage
|
||||||
|
|
@ -20,6 +24,7 @@
|
||||||
%bcond_with test
|
%bcond_with test
|
||||||
|
|
||||||
# For testing rocm
|
# For testing rocm
|
||||||
|
# Not viable on 2.1.2, use --with gitcommit
|
||||||
%bcond_with rocm
|
%bcond_with rocm
|
||||||
|
|
||||||
# For testing openmp
|
# For testing openmp
|
||||||
|
|
@ -29,8 +34,8 @@
|
||||||
%bcond_with caffe2
|
%bcond_with caffe2
|
||||||
|
|
||||||
Name: python-%{pypi_name}
|
Name: python-%{pypi_name}
|
||||||
Version: 2.1.2
|
Version: %{pypi_version}
|
||||||
Release: 3%{?dist}
|
Release: %autorelease
|
||||||
Summary: PyTorch AI/ML framework
|
Summary: PyTorch AI/ML framework
|
||||||
# See below for details
|
# See below for details
|
||||||
License: BSD-3-Clause AND BSD-2-Clause AND 0BSD AND Apache-2.0 AND MIT AND BSL-1.0 AND GPL-3.0-or-later AND Zlib
|
License: BSD-3-Clause AND BSD-2-Clause AND 0BSD AND Apache-2.0 AND MIT AND BSL-1.0 AND GPL-3.0-or-later AND Zlib
|
||||||
|
|
@ -42,13 +47,23 @@ Source1: pyproject.toml
|
||||||
%else
|
%else
|
||||||
Source0: %{forgeurl}/releases/download/v%{version}/pytorch-v%{version}.tar.gz
|
Source0: %{forgeurl}/releases/download/v%{version}/pytorch-v%{version}.tar.gz
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
%if %{with gitcommit}
|
||||||
|
|
||||||
|
Patch0: 0001-no-third_party-foxi.patch
|
||||||
|
Patch1: 0001-no-third_party-fmt.patch
|
||||||
|
Patch2: 0001-no-third_party-FXdiv.patch
|
||||||
|
Patch3: 0001-Stub-in-kineto-ActivityType.patch
|
||||||
|
Patch4: 0001-Regenerate-flatbuffer-header.patch
|
||||||
|
Patch5: 0001-disable-submodule-search.patch
|
||||||
|
|
||||||
%if %{with rocm}
|
%if %{with rocm}
|
||||||
# Public version is references the /opt install location
|
Patch100: 0001-cuda-hip-signatures.patch
|
||||||
# Replace it with one that uses the system install location
|
Patch101: 0001-silence-an-assert.patch
|
||||||
Source100: LoadHIP.cmake
|
Patch102: 0001-can-not-use-with-c-files.patch
|
||||||
Patch100: 0001-add-rocm_version-fallback.patch
|
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
%else
|
||||||
# Misc cmake changes that would be difficult to upstream
|
# Misc cmake changes that would be difficult to upstream
|
||||||
# * Use the system fmt
|
# * Use the system fmt
|
||||||
# * Remove foxi use
|
# * Remove foxi use
|
||||||
|
|
@ -78,6 +93,7 @@ Patch8: 0001-torch-sane-version.patch
|
||||||
# etc.
|
# etc.
|
||||||
# As a wrapper library, this should be the expected behavior.
|
# As a wrapper library, this should be the expected behavior.
|
||||||
Patch9: 0001-disable-as-needed-for-libtorch.patch
|
Patch9: 0001-disable-as-needed-for-libtorch.patch
|
||||||
|
%endif
|
||||||
|
|
||||||
# Limit to these because they are well behaved with clang
|
# Limit to these because they are well behaved with clang
|
||||||
ExclusiveArch: x86_64 aarch64
|
ExclusiveArch: x86_64 aarch64
|
||||||
|
|
@ -111,7 +127,7 @@ BuildRequires: python3-pyyaml
|
||||||
BuildRequires: python3-typing-extensions
|
BuildRequires: python3-typing-extensions
|
||||||
BuildRequires: sleef-devel
|
BuildRequires: sleef-devel
|
||||||
BuildRequires: valgrind-devel
|
BuildRequires: valgrind-devel
|
||||||
BuildRequires: xnnpack-devel
|
BuildRequires: xnnpack-devel = 0.0^git20221221.51a9875
|
||||||
|
|
||||||
BuildRequires: python3-devel
|
BuildRequires: python3-devel
|
||||||
BuildRequires: python3dist(filelock)
|
BuildRequires: python3dist(filelock)
|
||||||
|
|
@ -125,10 +141,12 @@ BuildRequires: python3dist(sphinx)
|
||||||
|
|
||||||
%if %{with rocm}
|
%if %{with rocm}
|
||||||
BuildRequires: hipblas-devel
|
BuildRequires: hipblas-devel
|
||||||
|
BuildRequires: hipblaslt-devel
|
||||||
BuildRequires: hipcub-devel
|
BuildRequires: hipcub-devel
|
||||||
BuildRequires: hipfft-devel
|
BuildRequires: hipfft-devel
|
||||||
BuildRequires: hipsparse-devel
|
BuildRequires: hipsparse-devel
|
||||||
BuildRequires: hipsolver-devel
|
BuildRequires: hipsolver-devel
|
||||||
|
BuildRequires: miopen-devel
|
||||||
BuildRequires: rocblas-devel
|
BuildRequires: rocblas-devel
|
||||||
BuildRequires: rocprim-devel
|
BuildRequires: rocprim-devel
|
||||||
BuildRequires: rocm-cmake
|
BuildRequires: rocm-cmake
|
||||||
|
|
@ -198,16 +216,15 @@ Requires: python3-%{pypi_name}%{?_isa} = %{version}-%{release}
|
||||||
rm -rf %{pypi_name}.egg-info
|
rm -rf %{pypi_name}.egg-info
|
||||||
# Overwrite with a git checkout of the pyproject.toml
|
# Overwrite with a git checkout of the pyproject.toml
|
||||||
cp %{SOURCE1} .
|
cp %{SOURCE1} .
|
||||||
%else
|
|
||||||
%autosetup -p1 -n pytorch-v%{version}
|
|
||||||
|
|
||||||
%if %{with rocm}
|
%if %{with rocm}
|
||||||
cp %{SOURCE100} cmake/public
|
|
||||||
|
|
||||||
# hipify
|
# hipify
|
||||||
./tools/amd_build/build_amd.py
|
./tools/amd_build/build_amd.py
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
%else
|
||||||
|
%autosetup -p1 -n pytorch-v%{version}
|
||||||
|
|
||||||
%if %{with opencv}
|
%if %{with opencv}
|
||||||
# Reduce requirements, *FOUND is not set
|
# Reduce requirements, *FOUND is not set
|
||||||
sed -i -e 's/USE_OPENCV AND OpenCV_FOUND AND USE_FFMPEG AND FFMPEG_FOUND/USE_OPENCV AND USE_FFMPEG/' caffe2/video/CMakeLists.txt
|
sed -i -e 's/USE_OPENCV AND OpenCV_FOUND AND USE_FFMPEG AND FFMPEG_FOUND/USE_OPENCV AND USE_FFMPEG/' caffe2/video/CMakeLists.txt
|
||||||
|
|
@ -307,6 +324,7 @@ export USE_ROCM=ON
|
||||||
export USE_NCCL=OFF
|
export USE_NCCL=OFF
|
||||||
export BUILD_NVFUSER=OFF
|
export BUILD_NVFUSER=OFF
|
||||||
export HIP_PATH=%{_prefix}
|
export HIP_PATH=%{_prefix}
|
||||||
|
export ROCM_PATH=%{_prefix}
|
||||||
%else
|
%else
|
||||||
export USE_ROCM=OFF
|
export USE_ROCM=OFF
|
||||||
%endif
|
%endif
|
||||||
|
|
@ -390,6 +408,9 @@ sed -i -f br.sed devel.files
|
||||||
%{python3_sitearch}/torch/utils/model_dump/{*.js,*.mjs,*.html}
|
%{python3_sitearch}/torch/utils/model_dump/{*.js,*.mjs,*.html}
|
||||||
%{python3_sitearch}/torchgen/packaged/ATen/native/*.yaml
|
%{python3_sitearch}/torchgen/packaged/ATen/native/*.yaml
|
||||||
%{python3_sitearch}/torchgen/packaged/autograd/{*.md,*.yaml}
|
%{python3_sitearch}/torchgen/packaged/autograd/{*.md,*.yaml}
|
||||||
|
%if %{with gitcommit}
|
||||||
|
%{python3_sitearch}/torch/_export/serde/schema.yaml
|
||||||
|
%endif
|
||||||
|
|
||||||
# egg
|
# egg
|
||||||
%{python3_sitearch}/torch*.egg-info/*
|
%{python3_sitearch}/torch*.egg-info/*
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue