Initial import
Signed-off-by: Tom Rix <trix@redhat.com>
This commit is contained in:
parent
7d5865168f
commit
48192fa108
13 changed files with 1272 additions and 0 deletions
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
/pytorch-v2.1.0.tar.gz
|
||||||
169
0001-Prepare-pytorch-cmake-for-fedora.patch
Normal file
169
0001-Prepare-pytorch-cmake-for-fedora.patch
Normal file
|
|
@ -0,0 +1,169 @@
|
||||||
|
From 24cf0294a67d89ad70367940eea872162b44482c Mon Sep 17 00:00:00 2001
|
||||||
|
From: Tom Rix <trix@redhat.com>
|
||||||
|
Date: Sat, 23 Sep 2023 10:18:52 -0700
|
||||||
|
Subject: [PATCH] Prepare pytorch cmake for fedora
|
||||||
|
|
||||||
|
Use the system fmt
|
||||||
|
Remove foxi use
|
||||||
|
Remove warnings/errors for clang 17
|
||||||
|
fxdiv is not a library
|
||||||
|
build type is RelWithDebInfo
|
||||||
|
use system pthreadpool
|
||||||
|
|
||||||
|
Signed-off-by: Tom Rix <trix@redhat.com>
|
||||||
|
---
|
||||||
|
CMakeLists.txt | 6 +++---
|
||||||
|
.../native/quantized/cpu/qnnpack/CMakeLists.txt | 3 ---
|
||||||
|
c10/CMakeLists.txt | 2 +-
|
||||||
|
caffe2/CMakeLists.txt | 6 +-----
|
||||||
|
cmake/Dependencies.cmake | 16 +---------------
|
||||||
|
test/cpp/tensorexpr/CMakeLists.txt | 2 +-
|
||||||
|
torch/CMakeLists.txt | 2 +-
|
||||||
|
7 files changed, 8 insertions(+), 29 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||||
|
index 3a48eaf4e2..902ee70fd1 100644
|
||||||
|
--- a/CMakeLists.txt
|
||||||
|
+++ b/CMakeLists.txt
|
||||||
|
@@ -682,7 +682,7 @@ set(CAFFE2_ALLOWLIST "" CACHE STRING "A allowlist file of files that one should
|
||||||
|
# Set default build type
|
||||||
|
if(NOT CMAKE_BUILD_TYPE)
|
||||||
|
message(STATUS "Build type not set - defaulting to Release")
|
||||||
|
- set(CMAKE_BUILD_TYPE "Release" CACHE STRING "Choose the type of build from: Debug Release RelWithDebInfo MinSizeRel Coverage." FORCE)
|
||||||
|
+ set(CMAKE_BUILD_TYPE "RelWithDebInfo" CACHE STRING "Choose the type of build from: Debug Release RelWithDebInfo MinSizeRel Coverage." FORCE)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
# The below means we are cross compiling for arm64 or x86_64 on MacOSX
|
||||||
|
@@ -917,8 +917,8 @@ if(NOT MSVC)
|
||||||
|
string(APPEND CMAKE_LINKER_FLAGS_DEBUG " -fno-omit-frame-pointer -O0")
|
||||||
|
append_cxx_flag_if_supported("-fno-math-errno" CMAKE_CXX_FLAGS)
|
||||||
|
append_cxx_flag_if_supported("-fno-trapping-math" CMAKE_CXX_FLAGS)
|
||||||
|
- append_cxx_flag_if_supported("-Werror=format" CMAKE_CXX_FLAGS)
|
||||||
|
- append_cxx_flag_if_supported("-Werror=cast-function-type" CMAKE_CXX_FLAGS)
|
||||||
|
+# append_cxx_flag_if_supported("-Werror=format" CMAKE_CXX_FLAGS)
|
||||||
|
+# append_cxx_flag_if_supported("-Werror=cast-function-type" CMAKE_CXX_FLAGS)
|
||||||
|
else()
|
||||||
|
# skip unwanted includes from windows.h
|
||||||
|
add_compile_definitions(WIN32_LEAN_AND_MEAN)
|
||||||
|
diff --git a/aten/src/ATen/native/quantized/cpu/qnnpack/CMakeLists.txt b/aten/src/ATen/native/quantized/cpu/qnnpack/CMakeLists.txt
|
||||||
|
index fd6b7ff551..218c8e9b2a 100644
|
||||||
|
--- a/aten/src/ATen/native/quantized/cpu/qnnpack/CMakeLists.txt
|
||||||
|
+++ b/aten/src/ATen/native/quantized/cpu/qnnpack/CMakeLists.txt
|
||||||
|
@@ -393,10 +393,7 @@ elseif(NOT TARGET fxdiv AND USE_SYSTEM_FXDIV)
|
||||||
|
if(NOT FXDIV_HDR)
|
||||||
|
message(FATAL_ERROR "Cannot find fxdiv")
|
||||||
|
endif()
|
||||||
|
- add_library(fxdiv STATIC "${FXDIV_HDR}")
|
||||||
|
- set_property(TARGET fxdiv PROPERTY LINKER_LANGUAGE C)
|
||||||
|
endif()
|
||||||
|
-target_link_libraries(pytorch_qnnpack PRIVATE fxdiv)
|
||||||
|
|
||||||
|
# ---[ Configure psimd
|
||||||
|
if(NOT TARGET psimd AND NOT USE_SYSTEM_PSIMD)
|
||||||
|
diff --git a/c10/CMakeLists.txt b/c10/CMakeLists.txt
|
||||||
|
index feebad7cbb..7c029cd88d 100644
|
||||||
|
--- a/c10/CMakeLists.txt
|
||||||
|
+++ b/c10/CMakeLists.txt
|
||||||
|
@@ -87,7 +87,7 @@ endif()
|
||||||
|
if(${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)
|
||||||
|
|
||||||
|
find_package(Backtrace)
|
||||||
|
if(Backtrace_FOUND)
|
||||||
|
diff --git a/caffe2/CMakeLists.txt b/caffe2/CMakeLists.txt
|
||||||
|
index 74d0d55719..b975d388a7 100644
|
||||||
|
--- a/caffe2/CMakeLists.txt
|
||||||
|
+++ b/caffe2/CMakeLists.txt
|
||||||
|
@@ -107,7 +107,7 @@ endif()
|
||||||
|
# Note: the folders that are being commented out have not been properly
|
||||||
|
# addressed yet.
|
||||||
|
|
||||||
|
-if(NOT MSVC AND USE_XNNPACK)
|
||||||
|
+if(NOT MSVC AND USE_XNNPACK AND NOT USE_SYSTEM_FXDIV)
|
||||||
|
if(NOT TARGET fxdiv)
|
||||||
|
set(FXDIV_BUILD_TESTS OFF CACHE BOOL "")
|
||||||
|
set(FXDIV_BUILD_BENCHMARKS OFF CACHE BOOL "")
|
||||||
|
@@ -1022,10 +1022,6 @@ elseif(USE_CUDA)
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
|
-if(NOT MSVC AND USE_XNNPACK)
|
||||||
|
- TARGET_LINK_LIBRARIES(torch_cpu PRIVATE fxdiv)
|
||||||
|
-endif()
|
||||||
|
-
|
||||||
|
# ==========================================================
|
||||||
|
# formerly-libtorch flags
|
||||||
|
# ==========================================================
|
||||||
|
diff --git a/cmake/Dependencies.cmake b/cmake/Dependencies.cmake
|
||||||
|
index c3abce52e4..21b40f3a88 100644
|
||||||
|
--- a/cmake/Dependencies.cmake
|
||||||
|
+++ b/cmake/Dependencies.cmake
|
||||||
|
@@ -1555,7 +1555,6 @@ 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_definitions(-DONNX_NAMESPACE=${ONNX_NAMESPACE})
|
||||||
|
if(NOT USE_SYSTEM_ONNX)
|
||||||
|
@@ -1588,8 +1587,6 @@ 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)
|
||||||
|
# Recover the build shared libs option.
|
||||||
|
set(BUILD_SHARED_LIBS ${TEMP_BUILD_SHARED_LIBS})
|
||||||
|
endif()
|
||||||
|
@@ -1834,18 +1831,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)
|
||||||
|
-
|
||||||
|
-# 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 "")
|
||||||
|
-
|
||||||
|
-list(APPEND Caffe2_DEPENDENCY_LIBS fmt::fmt-header-only)
|
||||||
|
+list(APPEND Caffe2_DEPENDENCY_LIBS fmt)
|
||||||
|
set(BUILD_SHARED_LIBS ${TEMP_BUILD_SHARED_LIBS} CACHE BOOL "Build shared libs" FORCE)
|
||||||
|
|
||||||
|
# ---[ Kineto
|
||||||
|
diff --git a/test/cpp/tensorexpr/CMakeLists.txt b/test/cpp/tensorexpr/CMakeLists.txt
|
||||||
|
index 7dff70630d..90b1003591 100644
|
||||||
|
--- a/test/cpp/tensorexpr/CMakeLists.txt
|
||||||
|
+++ b/test/cpp/tensorexpr/CMakeLists.txt
|
||||||
|
@@ -54,7 +54,7 @@ target_include_directories(tutorial_tensorexpr PRIVATE ${ATen_CPU_INCLUDE})
|
||||||
|
# pthreadpool header. For some build environment we need add the dependency
|
||||||
|
# explicitly.
|
||||||
|
if(USE_PTHREADPOOL)
|
||||||
|
- target_link_libraries(test_tensorexpr PRIVATE pthreadpool_interface)
|
||||||
|
+ target_link_libraries(test_tensorexpr PRIVATE pthreadpool)
|
||||||
|
endif()
|
||||||
|
if(USE_CUDA)
|
||||||
|
target_link_libraries(test_tensorexpr PRIVATE
|
||||||
|
diff --git a/torch/CMakeLists.txt b/torch/CMakeLists.txt
|
||||||
|
index 62ee4c12a9..8d5375f320 100644
|
||||||
|
--- a/torch/CMakeLists.txt
|
||||||
|
+++ b/torch/CMakeLists.txt
|
||||||
|
@@ -84,7 +84,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.42.1
|
||||||
|
|
||||||
28
0001-disable-as-needed-for-libtorch.patch
Normal file
28
0001-disable-as-needed-for-libtorch.patch
Normal file
|
|
@ -0,0 +1,28 @@
|
||||||
|
From 06499575b177a218846f0e43ff4bc77d245f207f Mon Sep 17 00:00:00 2001
|
||||||
|
From: Tom Rix <trix@redhat.com>
|
||||||
|
Date: Fri, 1 Dec 2023 09:38:05 -0500
|
||||||
|
Subject: [PATCH] disable as-needed for libtorch
|
||||||
|
|
||||||
|
Signed-off-by: Tom Rix <trix@redhat.com>
|
||||||
|
---
|
||||||
|
caffe2/CMakeLists.txt | 4 ++++
|
||||||
|
1 file changed, 4 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/caffe2/CMakeLists.txt b/caffe2/CMakeLists.txt
|
||||||
|
index b975d388a7..5e9fd3b3f3 100644
|
||||||
|
--- a/caffe2/CMakeLists.txt
|
||||||
|
+++ b/caffe2/CMakeLists.txt
|
||||||
|
@@ -914,6 +914,10 @@ if(HAVE_SOVERSION)
|
||||||
|
VERSION ${TORCH_VERSION} SOVERSION ${TORCH_SOVERSION})
|
||||||
|
endif()
|
||||||
|
|
||||||
|
+# Disable global as-needed
|
||||||
|
+set_target_properties(torch PROPERTIES LINK_FLAGS -Wl,--no-as-needed)
|
||||||
|
+
|
||||||
|
+
|
||||||
|
if(USE_ROCM)
|
||||||
|
filter_list(__caffe2_hip_srcs_cpp Caffe2_HIP_SRCS "\\.(cu|hip)$")
|
||||||
|
set_source_files_properties(${__caffe2_hip_srcs_cpp} PROPERTIES HIP_SOURCE_PROPERTY_FORMAT 1)
|
||||||
|
--
|
||||||
|
2.42.1
|
||||||
|
|
||||||
27
0001-python-torch-link-with-python.patch
Normal file
27
0001-python-torch-link-with-python.patch
Normal file
|
|
@ -0,0 +1,27 @@
|
||||||
|
From cef92207b79ad53e3fcc1b0e22ba91cb9422968c Mon Sep 17 00:00:00 2001
|
||||||
|
From: Tom Rix <trix@redhat.com>
|
||||||
|
Date: Sat, 18 Nov 2023 09:38:52 -0500
|
||||||
|
Subject: [PATCH] python-torch link with python
|
||||||
|
|
||||||
|
Signed-off-by: Tom Rix <trix@redhat.com>
|
||||||
|
---
|
||||||
|
torch/CMakeLists.txt | 3 +++
|
||||||
|
1 file changed, 3 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/torch/CMakeLists.txt b/torch/CMakeLists.txt
|
||||||
|
index 8d5375f320..6f8c7b65c4 100644
|
||||||
|
--- a/torch/CMakeLists.txt
|
||||||
|
+++ b/torch/CMakeLists.txt
|
||||||
|
@@ -312,6 +312,9 @@ add_dependencies(torch_python torch_python_stubs)
|
||||||
|
add_dependencies(torch_python flatbuffers)
|
||||||
|
|
||||||
|
|
||||||
|
+# Unresolved syms in -lpython
|
||||||
|
+target_link_libraries(torch_python PUBLIC ${PYTHON_LIBRARIES})
|
||||||
|
+
|
||||||
|
if(USE_PRECOMPILED_HEADERS)
|
||||||
|
target_precompile_headers(torch_python PRIVATE
|
||||||
|
"$<$<COMPILE_LANGUAGE:CXX>:ATen/ATen.h>")
|
||||||
|
--
|
||||||
|
2.42.1
|
||||||
|
|
||||||
33
0001-python-torch-remove-ubuntu-specific-linking.patch
Normal file
33
0001-python-torch-remove-ubuntu-specific-linking.patch
Normal file
|
|
@ -0,0 +1,33 @@
|
||||||
|
From f70ef37d0b3c780fd17be199e66a81ffa679f93e Mon Sep 17 00:00:00 2001
|
||||||
|
From: Tom Rix <trix@redhat.com>
|
||||||
|
Date: Sat, 18 Nov 2023 12:05:43 -0500
|
||||||
|
Subject: [PATCH] python-torch remove ubuntu specific linking
|
||||||
|
|
||||||
|
Signed-off-by: Tom Rix <trix@redhat.com>
|
||||||
|
---
|
||||||
|
CMakeLists.txt | 9 ++++++---
|
||||||
|
1 file changed, 6 insertions(+), 3 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||||
|
index 86c34984b2..f7c4a7b05f 100644
|
||||||
|
--- a/CMakeLists.txt
|
||||||
|
+++ b/CMakeLists.txt
|
||||||
|
@@ -479,9 +479,12 @@ option(BUILD_EXECUTORCH "Master flag to build Executorch" ON)
|
||||||
|
# This is a fix for a rare build issue on Ubuntu:
|
||||||
|
# symbol lookup error: miniconda3/envs/pytorch-py3.7/lib/libmkl_intel_lp64.so: undefined symbol: mkl_blas_dsyrk
|
||||||
|
# https://software.intel.com/en-us/articles/symbol-lookup-error-when-linking-intel-mkl-with-gcc-on-ubuntu
|
||||||
|
-if(LINUX)
|
||||||
|
- set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--no-as-needed")
|
||||||
|
-endif()
|
||||||
|
+
|
||||||
|
+# This is not ubuntu!
|
||||||
|
+# if(LINUX)
|
||||||
|
+# set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--no-as-needed")
|
||||||
|
+# endif()
|
||||||
|
+set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--as-needed")
|
||||||
|
|
||||||
|
if(MSVC)
|
||||||
|
set(CMAKE_NINJA_CMCLDEPS_RC OFF)
|
||||||
|
--
|
||||||
|
2.42.1
|
||||||
|
|
||||||
26
0001-pytorch-use-SO-version-by-default.patch
Normal file
26
0001-pytorch-use-SO-version-by-default.patch
Normal file
|
|
@ -0,0 +1,26 @@
|
||||||
|
From 527d1ce24a06a14788ca5fc2411985d7c1cb2923 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Tom Rix <trix@redhat.com>
|
||||||
|
Date: Fri, 13 Oct 2023 05:35:19 -0700
|
||||||
|
Subject: [PATCH] pytorch use SO version by default
|
||||||
|
|
||||||
|
Signed-off-by: Tom Rix <trix@redhat.com>
|
||||||
|
---
|
||||||
|
CMakeLists.txt | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||||
|
index 902ee70fd1..86c34984b2 100644
|
||||||
|
--- a/CMakeLists.txt
|
||||||
|
+++ b/CMakeLists.txt
|
||||||
|
@@ -340,7 +340,7 @@ option(USE_TBB "Use TBB (Deprecated)" OFF)
|
||||||
|
cmake_dependent_option(
|
||||||
|
USE_SYSTEM_TBB "Use system-provided Intel TBB." OFF "USE_TBB" OFF)
|
||||||
|
option(ONNX_ML "Enable traditional ONNX ML API." ON)
|
||||||
|
-option(HAVE_SOVERSION "Whether to add SOVERSION to the shared objects" OFF)
|
||||||
|
+option(HAVE_SOVERSION "Whether to add SOVERSION to the shared objects" ON)
|
||||||
|
option(BUILD_LIBTORCH_CPU_WITH_DEBUG "Enable RelWithDebInfo for libtorch_cpu target only" OFF)
|
||||||
|
cmake_dependent_option(USE_CCACHE "Attempt using CCache to wrap the compilation" ON "UNIX" OFF)
|
||||||
|
option(WERROR "Build with -Werror supported by the compiler" OFF)
|
||||||
|
--
|
||||||
|
2.42.1
|
||||||
|
|
||||||
32
0001-torch-sane-version.patch
Normal file
32
0001-torch-sane-version.patch
Normal file
|
|
@ -0,0 +1,32 @@
|
||||||
|
From c47c6e202d60ccac15aa36698bd4788415a9416b Mon Sep 17 00:00:00 2001
|
||||||
|
From: Tom Rix <trix@redhat.com>
|
||||||
|
Date: Sat, 25 Nov 2023 16:46:17 -0500
|
||||||
|
Subject: [PATCH] torch sane version
|
||||||
|
|
||||||
|
---
|
||||||
|
tools/generate_torch_version.py | 1 +
|
||||||
|
version.txt | 2 +-
|
||||||
|
2 files changed, 2 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/tools/generate_torch_version.py b/tools/generate_torch_version.py
|
||||||
|
index d90d3646ab..11d5bbeba5 100644
|
||||||
|
--- a/tools/generate_torch_version.py
|
||||||
|
+++ b/tools/generate_torch_version.py
|
||||||
|
@@ -42,6 +42,7 @@ def get_tag(pytorch_root: Union[str, Path]) -> str:
|
||||||
|
def get_torch_version(sha: Optional[str] = None) -> str:
|
||||||
|
pytorch_root = Path(__file__).parent.parent
|
||||||
|
version = open(pytorch_root / "version.txt").read().strip()
|
||||||
|
+ return version
|
||||||
|
|
||||||
|
if os.getenv("PYTORCH_BUILD_VERSION"):
|
||||||
|
assert os.getenv("PYTORCH_BUILD_NUMBER") is not None
|
||||||
|
diff --git a/version.txt b/version.txt
|
||||||
|
index ecaf4eea7c..7ec1d6db40 100644
|
||||||
|
--- a/version.txt
|
||||||
|
+++ b/version.txt
|
||||||
|
@@ -1 +1 @@
|
||||||
|
-2.1.0a0
|
||||||
|
+2.1.0
|
||||||
|
--
|
||||||
|
2.42.1
|
||||||
|
|
||||||
39
0002-Regenerate-flatbuffer-header.patch
Normal file
39
0002-Regenerate-flatbuffer-header.patch
Normal file
|
|
@ -0,0 +1,39 @@
|
||||||
|
From 587a8b10bd3f7a68275356ee6eb6bb43ed711ba2 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Tom Rix <trix@redhat.com>
|
||||||
|
Date: Fri, 29 Sep 2023 06:19:29 -0700
|
||||||
|
Subject: [PATCH 2/6] 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.41.0
|
||||||
|
|
||||||
73
0003-Stub-in-kineto-ActivityType.patch
Normal file
73
0003-Stub-in-kineto-ActivityType.patch
Normal file
|
|
@ -0,0 +1,73 @@
|
||||||
|
From bb52aeacc6dfab2355249b7b5beb72c2761ec319 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Tom Rix <trix@redhat.com>
|
||||||
|
Date: Fri, 29 Sep 2023 06:25:23 -0700
|
||||||
|
Subject: [PATCH 3/6] 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 2a410719a1..7d6525befd 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.41.0
|
||||||
|
|
||||||
26
0004-torch-python-3.12-changes.patch
Normal file
26
0004-torch-python-3.12-changes.patch
Normal file
|
|
@ -0,0 +1,26 @@
|
||||||
|
From dcd60ab193aca8811e1283003cbcca4946c6b48e Mon Sep 17 00:00:00 2001
|
||||||
|
From: Tom Rix <trix@redhat.com>
|
||||||
|
Date: Fri, 29 Sep 2023 13:58:28 -0700
|
||||||
|
Subject: [PATCH 4/6] torch python 3.12 changes
|
||||||
|
|
||||||
|
Signed-off-by: Tom Rix <trix@redhat.com>
|
||||||
|
---
|
||||||
|
torch/csrc/dynamo/cpython_defs.h | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/torch/csrc/dynamo/cpython_defs.h b/torch/csrc/dynamo/cpython_defs.h
|
||||||
|
index f0a0e1a88e..f58becd246 100644
|
||||||
|
--- a/torch/csrc/dynamo/cpython_defs.h
|
||||||
|
+++ b/torch/csrc/dynamo/cpython_defs.h
|
||||||
|
@@ -6,7 +6,7 @@
|
||||||
|
// should go in cpython_defs.c. Copying is required when, e.g.,
|
||||||
|
// we need to call internal CPython functions that are not exposed.
|
||||||
|
|
||||||
|
-#if IS_PYTHON_3_11_PLUS && !(IS_PYTHON_3_12_PLUS)
|
||||||
|
+#if IS_PYTHON_3_11_PLUS
|
||||||
|
|
||||||
|
#include <internal/pycore_frame.h>
|
||||||
|
|
||||||
|
--
|
||||||
|
2.41.0
|
||||||
|
|
||||||
25
0005-disable-submodule-search.patch
Normal file
25
0005-disable-submodule-search.patch
Normal file
|
|
@ -0,0 +1,25 @@
|
||||||
|
From fc0d4ce06fecbd2bcd10fb13c515dc6625260870 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Tom Rix <trix@redhat.com>
|
||||||
|
Date: Fri, 29 Sep 2023 17:21:13 -0700
|
||||||
|
Subject: [PATCH 5/6] disable submodule search
|
||||||
|
|
||||||
|
---
|
||||||
|
setup.py | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/setup.py b/setup.py
|
||||||
|
index 17bf16b89a..b8c8ae5506 100644
|
||||||
|
--- a/setup.py
|
||||||
|
+++ b/setup.py
|
||||||
|
@@ -452,7 +452,7 @@ def mirror_files_into_torchgen():
|
||||||
|
def build_deps():
|
||||||
|
report("-- Building version " + version)
|
||||||
|
|
||||||
|
- check_submodules()
|
||||||
|
+ # check_submodules()
|
||||||
|
check_pydep("yaml", "pyyaml")
|
||||||
|
|
||||||
|
build_caffe2(
|
||||||
|
--
|
||||||
|
2.41.0
|
||||||
|
|
||||||
792
python-torch.spec
Normal file
792
python-torch.spec
Normal file
|
|
@ -0,0 +1,792 @@
|
||||||
|
%global pypi_name torch
|
||||||
|
%global pypi_version 2.1.0
|
||||||
|
|
||||||
|
# Where the src comes from
|
||||||
|
%global forgeurl https://github.com/pytorch/pytorch
|
||||||
|
|
||||||
|
# So pre releases can be tried
|
||||||
|
%bcond_with gitcommit
|
||||||
|
%if %{with gitcommit}
|
||||||
|
# The top of the 2.1.0 branch - update to whatever..
|
||||||
|
%global commit0 1841d54370d167365d15f0ac78efc2c56cdf43ab
|
||||||
|
%global shortcommit0 %(c=%{commit0}; echo ${c:0:7})
|
||||||
|
%endif
|
||||||
|
|
||||||
|
# For -test subpackage
|
||||||
|
# suitable only for local testing
|
||||||
|
# Install and do something like
|
||||||
|
# export LD_LIBRARY_PATH=/usr/lib64/python3.12/site-packages/torch/lib
|
||||||
|
# /usr/lib64/python3.12/site-packages/torch/bin/test_api, test_lazy
|
||||||
|
%bcond_with test
|
||||||
|
|
||||||
|
Name: python-%{pypi_name}
|
||||||
|
Version: 2.1.0
|
||||||
|
Release: 10%{?dist}
|
||||||
|
Summary: PyTorch AI/ML framework
|
||||||
|
# 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
|
||||||
|
|
||||||
|
URL: https://pytorch.org/
|
||||||
|
%if %{with gitcommit}
|
||||||
|
Source0: %{forgeurl}/archive/%{commit0}/pytorch-%{shortcommit0}.tar.gz
|
||||||
|
Source1: pyproject.toml
|
||||||
|
%else
|
||||||
|
Source0: %{forgeurl}/releases/download/v%{version}/pytorch-v%{version}.tar.gz
|
||||||
|
%endif
|
||||||
|
|
||||||
|
# Misc cmake changes that would be difficult to upstream
|
||||||
|
# * Use the system fmt
|
||||||
|
# * Remove foxi use
|
||||||
|
# * Remove warnings/errors for clang 17
|
||||||
|
# * fxdiv is not a library on Fedora
|
||||||
|
Patch0: 0001-Prepare-pytorch-cmake-for-fedora.patch
|
||||||
|
# Use Fedora's fmt
|
||||||
|
Patch1: 0002-Regenerate-flatbuffer-header.patch
|
||||||
|
# https://github.com/pytorch/pytorch/pull/111048
|
||||||
|
Patch2: 0003-Stub-in-kineto-ActivityType.patch
|
||||||
|
# PyTorch has not fully baked 3.12 support because 3.12 is so new
|
||||||
|
Patch3: 0004-torch-python-3.12-changes.patch
|
||||||
|
# Short circuit looking for things that can not be downloade by mock
|
||||||
|
Patch4: 0005-disable-submodule-search.patch
|
||||||
|
# Fedora requires versioned so's
|
||||||
|
Patch5: 0001-pytorch-use-SO-version-by-default.patch
|
||||||
|
# libtorch_python.so: undefined symbols: Py*
|
||||||
|
Patch6: 0001-python-torch-link-with-python.patch
|
||||||
|
# E: unused-direct-shlib-dependency libshm.so.2.1.0 libtorch.so.2.1
|
||||||
|
# turn on as-needed globally
|
||||||
|
Patch7: 0001-python-torch-remove-ubuntu-specific-linking.patch
|
||||||
|
# Tries to use git and is confused by tarball
|
||||||
|
Patch8: 0001-torch-sane-version.patch
|
||||||
|
# libtorch is a wrapper so turn off as-needed locally
|
||||||
|
# resolves this rpmlint
|
||||||
|
# E: shared-library-without-dependency-information libtorch.so.2.1.0
|
||||||
|
# causes these
|
||||||
|
# E: unused-direct-shlib-dependency libtorch.so.2.1.0 libtorch_cpu.so.2.1
|
||||||
|
# etc.
|
||||||
|
# As a wrapper library, this should be the expected behavior.
|
||||||
|
Patch9: 0001-disable-as-needed-for-libtorch.patch
|
||||||
|
|
||||||
|
# Limit to these because they are well behaved with clang
|
||||||
|
ExclusiveArch: x86_64 aarch64
|
||||||
|
%global toolchain clang
|
||||||
|
|
||||||
|
BuildRequires: clang-devel
|
||||||
|
BuildRequires: cmake
|
||||||
|
BuildRequires: cpuinfo-devel
|
||||||
|
BuildRequires: eigen3-devel
|
||||||
|
BuildRequires: fmt-devel
|
||||||
|
BuildRequires: flatbuffers-devel
|
||||||
|
BuildRequires: FP16-devel
|
||||||
|
BuildRequires: fxdiv-devel
|
||||||
|
BuildRequires: gcc-c++
|
||||||
|
BuildRequires: gcc-gfortran
|
||||||
|
BuildRequires: gloo-devel
|
||||||
|
BuildRequires: ninja-build
|
||||||
|
BuildRequires: onnx-devel
|
||||||
|
BuildRequires: openblas-devel
|
||||||
|
BuildRequires: pocketfft-devel
|
||||||
|
BuildRequires: protobuf-devel
|
||||||
|
BuildRequires: pthreadpool-devel
|
||||||
|
BuildRequires: psimd-devel
|
||||||
|
BuildRequires: python3-numpy
|
||||||
|
BuildRequires: python3-pybind11
|
||||||
|
BuildRequires: python3-pyyaml
|
||||||
|
BuildRequires: python3-typing-extensions
|
||||||
|
BuildRequires: sleef-devel
|
||||||
|
BuildRequires: valgrind-devel
|
||||||
|
BuildRequires: xnnpack-devel
|
||||||
|
|
||||||
|
BuildRequires: python3-devel
|
||||||
|
BuildRequires: python3dist(filelock)
|
||||||
|
BuildRequires: python3dist(fsspec)
|
||||||
|
BuildRequires: python3dist(jinja2)
|
||||||
|
BuildRequires: python3dist(networkx)
|
||||||
|
BuildRequires: python3dist(setuptools)
|
||||||
|
BuildRequires: python3dist(sympy)
|
||||||
|
BuildRequires: python3dist(typing-extensions)
|
||||||
|
BuildRequires: python3dist(sphinx)
|
||||||
|
|
||||||
|
Provides: bundled(miniz) = 2.1.0
|
||||||
|
|
||||||
|
%description
|
||||||
|
PyTorch is a Python package that provides two high-level features:
|
||||||
|
|
||||||
|
* Tensor computation (like NumPy) with strong GPU acceleration
|
||||||
|
* Deep neural networks built on a tape-based autograd system
|
||||||
|
|
||||||
|
You can reuse your favorite Python packages such as NumPy, SciPy,
|
||||||
|
and Cython to extend PyTorch when needed.
|
||||||
|
|
||||||
|
%package -n python3-%{pypi_name}
|
||||||
|
Summary: %{summary}
|
||||||
|
|
||||||
|
%description -n python3-%{pypi_name}
|
||||||
|
PyTorch is a Python package that provides two high-level features:
|
||||||
|
|
||||||
|
* Tensor computation (like NumPy) with strong GPU acceleration
|
||||||
|
* Deep neural networks built on a tape-based autograd system
|
||||||
|
|
||||||
|
You can reuse your favorite Python packages such as NumPy, SciPy,
|
||||||
|
and Cython to extend PyTorch when needed.
|
||||||
|
|
||||||
|
%package -n python3-%{pypi_name}-devel
|
||||||
|
Summary: Libraries and headers for %{name}
|
||||||
|
Requires: python3-%{pypi_name}%{?_isa} = %{version}-%{release}
|
||||||
|
|
||||||
|
%description -n python3-%{pypi_name}-devel
|
||||||
|
%{summary}
|
||||||
|
|
||||||
|
%if %{with test}
|
||||||
|
%package -n python3-%{pypi_name}-test
|
||||||
|
Summary: Tests for %{name}
|
||||||
|
Requires: python3-%{pypi_name}%{?_isa} = %{version}-%{release}
|
||||||
|
|
||||||
|
%description -n python3-%{pypi_name}-test
|
||||||
|
%{summary}
|
||||||
|
%endif
|
||||||
|
|
||||||
|
|
||||||
|
%prep
|
||||||
|
%if %{with gitcommit}
|
||||||
|
%autosetup -p1 -n pytorch-%{commit0}
|
||||||
|
|
||||||
|
# Remove bundled egg-info
|
||||||
|
rm -rf %{pypi_name}.egg-info
|
||||||
|
# Overwrite with a git checkout of the pyproject.toml
|
||||||
|
cp %{SOURCE1} .
|
||||||
|
%else
|
||||||
|
%autosetup -p1 -n pytorch-v%{version}
|
||||||
|
|
||||||
|
# Release comes fully loaded with third party src
|
||||||
|
# Remove what we can
|
||||||
|
#
|
||||||
|
# For 2.1 this is all but miniz-2.1.0
|
||||||
|
# Instead of building as a library, caffe2 reaches into
|
||||||
|
# the third_party dir to compile the file.
|
||||||
|
# mimiz is licensed MIT
|
||||||
|
# https://github.com/richgel999/miniz/blob/master/LICENSE
|
||||||
|
mv third_party/miniz-2.1.0 .
|
||||||
|
#
|
||||||
|
# setup.py depends on this script
|
||||||
|
mv third_party/build_bundled.py .
|
||||||
|
|
||||||
|
%if %{with test}
|
||||||
|
mv third_party/googletest .
|
||||||
|
%endif
|
||||||
|
|
||||||
|
# Remove everything
|
||||||
|
rm -rf third_party/*
|
||||||
|
# Put stuff back
|
||||||
|
mv build_bundled.py third_party
|
||||||
|
mv miniz-2.1.0 third_party
|
||||||
|
%if %{with test}
|
||||||
|
mv googletest third_party
|
||||||
|
%endif
|
||||||
|
#
|
||||||
|
# Fake out pocketfft, and system header will be used
|
||||||
|
mkdir third_party/pocketfft
|
||||||
|
#
|
||||||
|
# Use the system valgrind headers
|
||||||
|
mkdir third_party/valgrind-headers
|
||||||
|
cp %{_includedir}/valgrind/* third_party/valgrind-headers
|
||||||
|
|
||||||
|
# Remove unneeded OpenCL files that confuse the lincense scanner
|
||||||
|
rm caffe2/contrib/opencl/OpenCL/cl.hpp
|
||||||
|
rm caffe2/mobile/contrib/libopencl-stub/include/CL/cl.h
|
||||||
|
rm caffe2/mobile/contrib/libopencl-stub/include/CL/cl.hpp
|
||||||
|
rm caffe2/mobile/contrib/libopencl-stub/include/CL/cl_ext.h
|
||||||
|
rm caffe2/mobile/contrib/libopencl-stub/include/CL/cl_gl.h
|
||||||
|
rm caffe2/mobile/contrib/libopencl-stub/include/CL/cl_gl_ext.h
|
||||||
|
rm caffe2/mobile/contrib/libopencl-stub/include/CL/cl_platform.h
|
||||||
|
rm caffe2/mobile/contrib/libopencl-stub/include/CL/opencl.h
|
||||||
|
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%build
|
||||||
|
|
||||||
|
# For debugging setup.py
|
||||||
|
# export SETUPTOOLS_SCM_DEBUG=1
|
||||||
|
|
||||||
|
# For verbose cmake output
|
||||||
|
# export VERBOSE=ON
|
||||||
|
# For verbose linking
|
||||||
|
# export CMAKE_SHARED_LINKER_FLAGS=-Wl,--verbose
|
||||||
|
|
||||||
|
# Manually set this hardening flag
|
||||||
|
export CMAKE_EXE_LINKER_FLAGS=-pie
|
||||||
|
|
||||||
|
export BUILD_CUSTOM_PROTOBUF=OFF
|
||||||
|
export BUILD_SHARED_LIBS=ON
|
||||||
|
%if %{with test}
|
||||||
|
export BUILD_TEST=ON
|
||||||
|
%else
|
||||||
|
export BUILD_TEST=OFF
|
||||||
|
%endif
|
||||||
|
export CMAKE_BUILD_TYPE=RelWithDebInfo
|
||||||
|
export CMAKE_FIND_PACKAGE_PREFER_CONFIG=ON
|
||||||
|
export CAFFE2_LINK_LOCAL_PROTOBUF=OFF
|
||||||
|
export USE_CUDA=OFF
|
||||||
|
export USE_DISTRIBUTED=OFF
|
||||||
|
export USE_FBGEMM=OFF
|
||||||
|
export USE_GOLD_LINKER=OFF
|
||||||
|
export USE_ITT=OFF
|
||||||
|
export USE_KINETO=OFF
|
||||||
|
export USE_LITE_INTERPRETER_PROFILER=OFF
|
||||||
|
export USE_MKLDNN=OFF
|
||||||
|
export USE_NNPACK=OFF
|
||||||
|
export USE_NUMPY=ON
|
||||||
|
export USE_OPENMP=OFF
|
||||||
|
export USE_PYTORCH_QNNPACK=OFF
|
||||||
|
export USE_QNNPACK=OFF
|
||||||
|
export USE_ROCM=OFF
|
||||||
|
export USE_SYSTEM_LIBS=ON
|
||||||
|
export USE_TENSORPIPE=OFF
|
||||||
|
export USE_XNNPACK=ON
|
||||||
|
|
||||||
|
# Why we are using py3_ vs pyproject_
|
||||||
|
#
|
||||||
|
# current pyproject problem with mock
|
||||||
|
# + /usr/bin/python3 -Bs /usr/lib/rpm/redhat/pyproject_wheel.py /builddir/build/BUILD/pytorch-v2.1.0/pyproject-wheeldir
|
||||||
|
# /usr/bin/python3: No module named pip
|
||||||
|
# Adding pip to build requires does not fix
|
||||||
|
#
|
||||||
|
# See BZ 2244862
|
||||||
|
%py3_build
|
||||||
|
|
||||||
|
%install
|
||||||
|
%py3_install
|
||||||
|
|
||||||
|
# empty files
|
||||||
|
rm %{buildroot}%{python3_sitearch}/torch/py.typed
|
||||||
|
rm %{buildroot}%{python3_sitearch}/torch/ao/quantization/backend_config/observation_type.py
|
||||||
|
rm %{buildroot}%{python3_sitearch}/torch/ao/quantization/backend_config/__pycache__/observation_type.*.pyc
|
||||||
|
rm %{buildroot}%{python3_sitearch}/torch/cuda/error.py
|
||||||
|
rm %{buildroot}%{python3_sitearch}/torch/cuda/__pycache__/error.*.pyc
|
||||||
|
rm %{buildroot}%{python3_sitearch}/torch/include/ATen/cudnn/Exceptions.h
|
||||||
|
|
||||||
|
# exec permission
|
||||||
|
for f in `find %{buildroot}%{python3_sitearch} -name '*.py'`; do
|
||||||
|
if [ ! -x $f ]; then
|
||||||
|
sed -i '1{\@^#!/usr/bin@d}' $f
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
# shebangs
|
||||||
|
%py3_shebang_fix %{buildroot}%{python3_sitearch}
|
||||||
|
|
||||||
|
# Remove copies of the *.so's
|
||||||
|
#
|
||||||
|
# *.so should be symlinks, not copies
|
||||||
|
# there is a copy of *.so.x.y.z to *.so and *.so.x.y
|
||||||
|
# remove the copies and do the link
|
||||||
|
#
|
||||||
|
%global lib_list c10 shm torch torch_cpu torch_global_deps torch_python
|
||||||
|
{
|
||||||
|
cd %{buildroot}%{python3_sitearch}/torch/lib
|
||||||
|
for l in %{lib_list}
|
||||||
|
do
|
||||||
|
long_name=lib${l}.so.%{version}
|
||||||
|
short_name=${long_name%.*}
|
||||||
|
devel_name=lib${l}.so
|
||||||
|
rm ${short_name}
|
||||||
|
rm ${devel_name}
|
||||||
|
ln -s ${long_name} ${short_name}
|
||||||
|
ln -s ${long_name} ${devel_name}
|
||||||
|
done
|
||||||
|
cd -
|
||||||
|
}
|
||||||
|
|
||||||
|
# Programatically create the list of dirs
|
||||||
|
echo "s|%{buildroot}%{python3_sitearch}|%%dir %%{python3_sitearch}|g" > br.sed
|
||||||
|
find %{buildroot}%{python3_sitearch} -mindepth 1 -type d > dirs.files
|
||||||
|
sed -i -f br.sed dirs.files
|
||||||
|
cat dirs.files > main.files
|
||||||
|
|
||||||
|
# Similar for the python files
|
||||||
|
find %{buildroot}%{python3_sitearch} -type f -name "*.py" -o -name "*.pyc" -o -name "*.pyi" > py.files
|
||||||
|
echo "s|%{buildroot}%{python3_sitearch}|%%{python3_sitearch}|g" > br.sed
|
||||||
|
sed -i -f br.sed py.files
|
||||||
|
cat py.files >> main.files
|
||||||
|
|
||||||
|
# devel files, headers and such
|
||||||
|
find %{buildroot}%{python3_sitearch} -type f -name "*.h" -o -name "*.hpp" -o -name "*.cuh" -o -name "*.cpp" -o -name "*.cu" > devel.files
|
||||||
|
sed -i -f br.sed devel.files
|
||||||
|
|
||||||
|
#
|
||||||
|
# Main package
|
||||||
|
##% dir % {python3_sitearch}/torch*.egg-info
|
||||||
|
|
||||||
|
%files -n python3-%{pypi_name} -f main.files
|
||||||
|
|
||||||
|
%license LICENSE
|
||||||
|
%doc README.md
|
||||||
|
|
||||||
|
# bins
|
||||||
|
%{_bindir}/convert-caffe2-to-onnx
|
||||||
|
%{_bindir}/convert-onnx-to-caffe2
|
||||||
|
%{_bindir}/torchrun
|
||||||
|
%{python3_sitearch}/torch/bin/torch_shm_manager
|
||||||
|
|
||||||
|
# libs
|
||||||
|
%{python3_sitearch}/functorch/_C.cpython*.so
|
||||||
|
%{python3_sitearch}/torch/_C.cpython*.so
|
||||||
|
%{python3_sitearch}/torch/lib/libc10.so.*
|
||||||
|
%{python3_sitearch}/torch/lib/libshm.so.*
|
||||||
|
%{python3_sitearch}/torch/lib/libtorch.so.*
|
||||||
|
%{python3_sitearch}/torch/lib/libtorch_cpu.so.*
|
||||||
|
%{python3_sitearch}/torch/lib/libtorch_global_deps.so.*
|
||||||
|
%{python3_sitearch}/torch/lib/libtorch_python.so.*
|
||||||
|
|
||||||
|
# misc
|
||||||
|
%{python3_sitearch}/torch/utils/model_dump/{*.js,*.mjs,*.html}
|
||||||
|
%{python3_sitearch}/torchgen/packaged/ATen/native/*.yaml
|
||||||
|
%{python3_sitearch}/torchgen/packaged/autograd/{*.md,*.yaml}
|
||||||
|
|
||||||
|
# egg
|
||||||
|
%{python3_sitearch}/torch*.egg-info/*
|
||||||
|
|
||||||
|
# excludes
|
||||||
|
# bazel build cruft
|
||||||
|
%exclude %{python3_sitearch}/torchgen/packaged/autograd/{BUILD.bazel,build.bzl}
|
||||||
|
|
||||||
|
#
|
||||||
|
# devel package
|
||||||
|
#
|
||||||
|
%files -n python3-%{pypi_name}-devel -f devel.files
|
||||||
|
|
||||||
|
# devel libs
|
||||||
|
%{python3_sitearch}/torch/lib/libc10.so
|
||||||
|
%{python3_sitearch}/torch/lib/libshm.so
|
||||||
|
%{python3_sitearch}/torch/lib/libtorch.so
|
||||||
|
%{python3_sitearch}/torch/lib/libtorch_cpu.so
|
||||||
|
%{python3_sitearch}/torch/lib/libtorch_global_deps.so
|
||||||
|
%{python3_sitearch}/torch/lib/libtorch_python.so
|
||||||
|
|
||||||
|
# devel cmake
|
||||||
|
%{python3_sitearch}/torch/share/cmake/{ATen,Caffe2,Torch}/*.cmake
|
||||||
|
%{python3_sitearch}/torch/share/cmake/Caffe2/public/*.cmake
|
||||||
|
%{python3_sitearch}/torch/share/cmake/Caffe2/Modules_CUDA_fix/*.cmake
|
||||||
|
%{python3_sitearch}/torch/share/cmake/Caffe2/Modules_CUDA_fix/upstream/*.cmake
|
||||||
|
%{python3_sitearch}/torch/share/cmake/Caffe2/Modules_CUDA_fix/upstream/FindCUDA/*.cmake
|
||||||
|
|
||||||
|
# devel misc
|
||||||
|
%{python3_sitearch}/torchgen/packaged/ATen/templates/RegisterDispatchDefinitions.ini
|
||||||
|
%{python3_sitearch}/torchgen/packaged/autograd/templates/annotated_fn_args.py.in
|
||||||
|
|
||||||
|
%if %{with test}
|
||||||
|
%files -n python3-%{pypi_name}-test
|
||||||
|
|
||||||
|
# test bins
|
||||||
|
%{python3_sitearch}/torch/bin/test_api
|
||||||
|
%{python3_sitearch}/torch/bin/test_edge_op_registration
|
||||||
|
%{python3_sitearch}/torch/bin/test_jit
|
||||||
|
%{python3_sitearch}/torch/bin/test_lazy
|
||||||
|
%{python3_sitearch}/torch/bin/test_tensorexpr
|
||||||
|
%{python3_sitearch}/torch/bin/tutorial_tensorexpr
|
||||||
|
|
||||||
|
# test libs
|
||||||
|
# Unversioned - not ment for release
|
||||||
|
%{python3_sitearch}/torch/lib/libbackend_with_compiler.so
|
||||||
|
%{python3_sitearch}/torch/lib/libjitbackend_test.so
|
||||||
|
%{python3_sitearch}/torch/lib/libtorchbind_test.so
|
||||||
|
|
||||||
|
# tests
|
||||||
|
%{python3_sitearch}/torch/test/*
|
||||||
|
|
||||||
|
%endif
|
||||||
|
|
||||||
|
#
|
||||||
|
# License Details
|
||||||
|
# Main license BSD 3-Clause
|
||||||
|
#
|
||||||
|
# Apache-2.0
|
||||||
|
# android/libs/fbjni/LICENSE
|
||||||
|
# android/libs/fbjni/CMakeLists.txt
|
||||||
|
# android/libs/fbjni/build.gradle
|
||||||
|
# android/libs/fbjni/cxx/fbjni/ByteBuffer.cpp
|
||||||
|
# android/libs/fbjni/cxx/fbjni/ByteBuffer.h
|
||||||
|
# android/libs/fbjni/cxx/fbjni/Context.h
|
||||||
|
# android/libs/fbjni/cxx/fbjni/File.h
|
||||||
|
# android/libs/fbjni/cxx/fbjni/JThread.h
|
||||||
|
# android/libs/fbjni/cxx/fbjni/NativeRunnable.h
|
||||||
|
# android/libs/fbjni/cxx/fbjni/OnLoad.cpp
|
||||||
|
# android/libs/fbjni/cxx/fbjni/ReadableByteChannel.cpp
|
||||||
|
# android/libs/fbjni/cxx/fbjni/ReadableByteChannel.h
|
||||||
|
# android/libs/fbjni/cxx/fbjni/detail/Boxed.h
|
||||||
|
# android/libs/fbjni/cxx/fbjni/detail/Common.h
|
||||||
|
# android/libs/fbjni/cxx/fbjni/detail/CoreClasses-inl.h
|
||||||
|
# android/libs/fbjni/cxx/fbjni/detail/CoreClasses.h
|
||||||
|
# android/libs/fbjni/cxx/fbjni/detail/Environment.cpp
|
||||||
|
# android/libs/fbjni/cxx/fbjni/detail/Environment.h
|
||||||
|
# android/libs/fbjni/cxx/fbjni/detail/Exceptions.cpp
|
||||||
|
# android/libs/fbjni/cxx/fbjni/detail/Exceptions.h
|
||||||
|
# android/libs/fbjni/cxx/fbjni/detail/FbjniApi.h
|
||||||
|
# android/libs/fbjni/cxx/fbjni/detail/Hybrid.cpp
|
||||||
|
# android/libs/fbjni/cxx/fbjni/detail/Hybrid.h
|
||||||
|
# android/libs/fbjni/cxx/fbjni/detail/Iterator-inl.h
|
||||||
|
# android/libs/fbjni/cxx/fbjni/detail/Iterator.h
|
||||||
|
# android/libs/fbjni/cxx/fbjni/detail/JWeakReference.h
|
||||||
|
# android/libs/fbjni/cxx/fbjni/detail/Log.h
|
||||||
|
# android/libs/fbjni/cxx/fbjni/detail/Meta-forward.h
|
||||||
|
# android/libs/fbjni/cxx/fbjni/detail/Meta-inl.h
|
||||||
|
# android/libs/fbjni/cxx/fbjni/detail/Meta.cpp
|
||||||
|
# android/libs/fbjni/cxx/fbjni/detail/Meta.h
|
||||||
|
# android/libs/fbjni/cxx/fbjni/detail/MetaConvert.h
|
||||||
|
# android/libs/fbjni/cxx/fbjni/detail/ReferenceAllocators-inl.h
|
||||||
|
# android/libs/fbjni/cxx/fbjni/detail/ReferenceAllocators.h
|
||||||
|
# android/libs/fbjni/cxx/fbjni/detail/References-forward.h
|
||||||
|
# android/libs/fbjni/cxx/fbjni/detail/References-inl.h
|
||||||
|
# android/libs/fbjni/cxx/fbjni/detail/References.cpp
|
||||||
|
# android/libs/fbjni/cxx/fbjni/detail/References.h
|
||||||
|
# android/libs/fbjni/cxx/fbjni/detail/Registration-inl.h
|
||||||
|
# android/libs/fbjni/cxx/fbjni/detail/Registration.h
|
||||||
|
# android/libs/fbjni/cxx/fbjni/detail/SimpleFixedString.h
|
||||||
|
# android/libs/fbjni/cxx/fbjni/detail/TypeTraits.h
|
||||||
|
# android/libs/fbjni/cxx/fbjni/detail/utf8.cpp
|
||||||
|
# android/libs/fbjni/cxx/fbjni/detail/utf8.h
|
||||||
|
# android/libs/fbjni/cxx/fbjni/fbjni.cpp
|
||||||
|
# android/libs/fbjni/cxx/fbjni/fbjni.h
|
||||||
|
# android/libs/fbjni/cxx/lyra/cxa_throw.cpp
|
||||||
|
# android/libs/fbjni/cxx/lyra/lyra.cpp
|
||||||
|
# android/libs/fbjni/cxx/lyra/lyra.h
|
||||||
|
# android/libs/fbjni/cxx/lyra/lyra_breakpad.cpp
|
||||||
|
# android/libs/fbjni/cxx/lyra/lyra_exceptions.cpp
|
||||||
|
# android/libs/fbjni/cxx/lyra/lyra_exceptions.h
|
||||||
|
# android/libs/fbjni/gradle.properties
|
||||||
|
# android/libs/fbjni/gradle/android-tasks.gradle
|
||||||
|
# android/libs/fbjni/gradle/release.gradle
|
||||||
|
# android/libs/fbjni/gradlew
|
||||||
|
# android/libs/fbjni/gradlew.bat
|
||||||
|
# android/libs/fbjni/host.gradle
|
||||||
|
# android/libs/fbjni/java/com/facebook/jni/CppException.java
|
||||||
|
# android/libs/fbjni/java/com/facebook/jni/CppSystemErrorException.java
|
||||||
|
# android/libs/fbjni/java/com/facebook/jni/DestructorThread.java
|
||||||
|
# android/libs/fbjni/java/com/facebook/jni/HybridClassBase.java
|
||||||
|
# android/libs/fbjni/java/com/facebook/jni/HybridData.java
|
||||||
|
# android/libs/fbjni/java/com/facebook/jni/IteratorHelper.java
|
||||||
|
# android/libs/fbjni/java/com/facebook/jni/MapIteratorHelper.java
|
||||||
|
# android/libs/fbjni/java/com/facebook/jni/NativeRunnable.java
|
||||||
|
# android/libs/fbjni/java/com/facebook/jni/ThreadScopeSupport.java
|
||||||
|
# android/libs/fbjni/java/com/facebook/jni/UnknownCppException.java
|
||||||
|
# android/libs/fbjni/java/com/facebook/jni/annotations/DoNotStrip.java
|
||||||
|
# android/libs/fbjni/scripts/android-setup.sh
|
||||||
|
# android/libs/fbjni/scripts/run-host-tests.sh
|
||||||
|
# android/libs/fbjni/settings.gradle
|
||||||
|
# android/libs/fbjni/test/BaseFBJniTests.java
|
||||||
|
# android/libs/fbjni/test/ByteBufferTests.java
|
||||||
|
# android/libs/fbjni/test/DocTests.java
|
||||||
|
# android/libs/fbjni/test/FBJniTests.java
|
||||||
|
# android/libs/fbjni/test/HybridTests.java
|
||||||
|
# android/libs/fbjni/test/IteratorTests.java
|
||||||
|
# android/libs/fbjni/test/PrimitiveArrayTests.java
|
||||||
|
# android/libs/fbjni/test/ReadableByteChannelTests.java
|
||||||
|
# android/libs/fbjni/test/jni/CMakeLists.txt
|
||||||
|
# android/libs/fbjni/test/jni/byte_buffer_tests.cpp
|
||||||
|
# android/libs/fbjni/test/jni/doc_tests.cpp
|
||||||
|
# android/libs/fbjni/test/jni/expect.h
|
||||||
|
# android/libs/fbjni/test/jni/fbjni_onload.cpp
|
||||||
|
# android/libs/fbjni/test/jni/fbjni_tests.cpp
|
||||||
|
# android/libs/fbjni/test/jni/hybrid_tests.cpp
|
||||||
|
# android/libs/fbjni/test/jni/inter_dso_exception_test_1/Test.cpp
|
||||||
|
# android/libs/fbjni/test/jni/inter_dso_exception_test_1/Test.h
|
||||||
|
# android/libs/fbjni/test/jni/inter_dso_exception_test_2/Test.cpp
|
||||||
|
# android/libs/fbjni/test/jni/inter_dso_exception_test_2/Test.h
|
||||||
|
# android/libs/fbjni/test/jni/iterator_tests.cpp
|
||||||
|
# android/libs/fbjni/test/jni/modified_utf8_test.cpp
|
||||||
|
# android/libs/fbjni/test/jni/no_rtti.cpp
|
||||||
|
# android/libs/fbjni/test/jni/no_rtti.h
|
||||||
|
# android/libs/fbjni/test/jni/primitive_array_tests.cpp
|
||||||
|
# android/libs/fbjni/test/jni/readable_byte_channel_tests.cpp
|
||||||
|
# android/libs/fbjni/test/jni/simple_fixed_string_tests.cpp
|
||||||
|
# android/libs/fbjni/test/jni/utf16toUTF8_test.cpp
|
||||||
|
# android/pytorch_android/host/build.gradle
|
||||||
|
# aten/src/ATen/cuda/llvm_basic.cpp
|
||||||
|
# aten/src/ATen/cuda/llvm_complex.cpp
|
||||||
|
# aten/src/ATen/native/quantized/cpu/qnnpack/confu.yaml
|
||||||
|
# aten/src/ATen/native/quantized/cpu/qnnpack/src/requantization/gemmlowp-neon.c
|
||||||
|
# aten/src/ATen/native/quantized/cpu/qnnpack/src/requantization/gemmlowp-scalar.h
|
||||||
|
# aten/src/ATen/native/quantized/cpu/qnnpack/src/requantization/gemmlowp-sse.h
|
||||||
|
# aten/src/ATen/nnapi/codegen.py
|
||||||
|
# aten/src/ATen/nnapi/NeuralNetworks.h
|
||||||
|
# aten/src/ATen/nnapi/nnapi_wrapper.cpp
|
||||||
|
# aten/src/ATen/nnapi/nnapi_wrapper.h
|
||||||
|
# binaries/benchmark_args.h
|
||||||
|
# binaries/benchmark_helper.cc
|
||||||
|
# binaries/benchmark_helper.h
|
||||||
|
# binaries/compare_models_torch.cc
|
||||||
|
# binaries/convert_and_benchmark.cc
|
||||||
|
# binaries/convert_caffe_image_db.cc
|
||||||
|
# binaries/convert_db.cc
|
||||||
|
# binaries/convert_encoded_to_raw_leveldb.cc
|
||||||
|
# binaries/convert_image_to_tensor.cc
|
||||||
|
# binaries/core_overhead_benchmark.cc
|
||||||
|
# binaries/core_overhead_benchmark_gpu.cc
|
||||||
|
# binaries/db_throughput.cc
|
||||||
|
# binaries/dump_operator_names.cc
|
||||||
|
# binaries/inspect_gpu.cc
|
||||||
|
# binaries/load_benchmark_torch.cc
|
||||||
|
# binaries/make_cifar_db.cc
|
||||||
|
# binaries/make_image_db.cc
|
||||||
|
# binaries/make_mnist_db.cc
|
||||||
|
# binaries/optimize_for_mobile.cc
|
||||||
|
# binaries/parallel_info.cc
|
||||||
|
# binaries/predictor_verifier.cc
|
||||||
|
# binaries/print_core_object_sizes_gpu.cc
|
||||||
|
# binaries/print_registered_core_operators.cc
|
||||||
|
# binaries/run_plan.cc
|
||||||
|
# binaries/run_plan_mpi.cc
|
||||||
|
# binaries/speed_benchmark.cc
|
||||||
|
# binaries/speed_benchmark_torch.cc
|
||||||
|
# binaries/split_db.cc
|
||||||
|
# binaries/tsv_2_proto.cc
|
||||||
|
# binaries/tutorial_blob.cc
|
||||||
|
# binaries/zmq_feeder.cc
|
||||||
|
# c10/test/util/small_vector_test.cpp
|
||||||
|
# c10/util/FunctionRef.h
|
||||||
|
# c10/util/SmallVector.cpp
|
||||||
|
# c10/util/SmallVector.h
|
||||||
|
# c10/util/llvmMathExtras.h
|
||||||
|
# c10/util/sparse_bitset.h
|
||||||
|
# caffe2/contrib/aten/gen_op.py
|
||||||
|
# caffe2/contrib/fakelowp/fp16_fc_acc_op.cc
|
||||||
|
# caffe2/contrib/fakelowp/fp16_fc_acc_op.h
|
||||||
|
# caffe2/contrib/gloo/allgather_ops.cc
|
||||||
|
# caffe2/contrib/gloo/allgather_ops.h
|
||||||
|
# caffe2/contrib/gloo/reduce_scatter_ops.cc
|
||||||
|
# caffe2/contrib/gloo/reduce_scatter_ops.h
|
||||||
|
# caffe2/core/hip/common_miopen.h
|
||||||
|
# caffe2/core/hip/common_miopen.hip
|
||||||
|
# caffe2/core/net_async_tracing.cc
|
||||||
|
# caffe2/core/net_async_tracing.h
|
||||||
|
# caffe2/core/net_async_tracing_test.cc
|
||||||
|
# caffe2/experiments/operators/fully_connected_op_decomposition.cc
|
||||||
|
# caffe2/experiments/operators/fully_connected_op_decomposition.h
|
||||||
|
# caffe2/experiments/operators/fully_connected_op_decomposition_gpu.cc
|
||||||
|
# caffe2/experiments/operators/fully_connected_op_prune.cc
|
||||||
|
# caffe2/experiments/operators/fully_connected_op_prune.h
|
||||||
|
# caffe2/experiments/operators/fully_connected_op_sparse.cc
|
||||||
|
# caffe2/experiments/operators/fully_connected_op_sparse.h
|
||||||
|
# caffe2/experiments/operators/funhash_op.cc
|
||||||
|
# caffe2/experiments/operators/funhash_op.h
|
||||||
|
# caffe2/experiments/operators/sparse_funhash_op.cc
|
||||||
|
# caffe2/experiments/operators/sparse_funhash_op.h
|
||||||
|
# caffe2/experiments/operators/sparse_matrix_reshape_op.cc
|
||||||
|
# caffe2/experiments/operators/sparse_matrix_reshape_op.h
|
||||||
|
# caffe2/experiments/operators/tt_contraction_op.cc
|
||||||
|
# caffe2/experiments/operators/tt_contraction_op.h
|
||||||
|
# caffe2/experiments/operators/tt_contraction_op_gpu.cc
|
||||||
|
# caffe2/experiments/operators/tt_pad_op.cc
|
||||||
|
# caffe2/experiments/operators/tt_pad_op.h
|
||||||
|
# caffe2/experiments/python/SparseTransformer.py
|
||||||
|
# caffe2/experiments/python/convnet_benchmarks.py
|
||||||
|
# caffe2/experiments/python/device_reduce_sum_bench.py
|
||||||
|
# caffe2/experiments/python/funhash_op_test.py
|
||||||
|
# caffe2/experiments/python/net_construct_bench.py
|
||||||
|
# caffe2/experiments/python/sparse_funhash_op_test.py
|
||||||
|
# caffe2/experiments/python/sparse_reshape_op_test.py
|
||||||
|
# caffe2/experiments/python/tt_contraction_op_test.py
|
||||||
|
# caffe2/experiments/python/tt_pad_op_test.py
|
||||||
|
# caffe2/mobile/contrib/libvulkan-stub/include/vulkan/vk_platform.h
|
||||||
|
# caffe2/mobile/contrib/libvulkan-stub/include/vulkan/vulkan.h
|
||||||
|
# caffe2/mobile/contrib/nnapi/NeuralNetworks.h
|
||||||
|
# caffe2/mobile/contrib/nnapi/dlnnapi.c
|
||||||
|
# caffe2/mobile/contrib/nnapi/nnapi_benchmark.cc
|
||||||
|
# caffe2/observers/profile_observer.cc
|
||||||
|
# caffe2/observers/profile_observer.h
|
||||||
|
# caffe2/operators/hip/conv_op_miopen.hip
|
||||||
|
# caffe2/operators/hip/local_response_normalization_op_miopen.hip
|
||||||
|
# caffe2/operators/hip/pool_op_miopen.hip
|
||||||
|
# caffe2/operators/hip/spatial_batch_norm_op_miopen.hip
|
||||||
|
# caffe2/operators/quantized/int8_utils.h
|
||||||
|
# caffe2/operators/stump_func_op.cc
|
||||||
|
# caffe2/operators/stump_func_op.cu
|
||||||
|
# caffe2/operators/stump_func_op.h
|
||||||
|
# caffe2/operators/unique_ops.cc
|
||||||
|
# caffe2/operators/unique_ops.cu
|
||||||
|
# caffe2/operators/unique_ops.h
|
||||||
|
# caffe2/operators/upsample_op.cc
|
||||||
|
# caffe2/operators/upsample_op.h
|
||||||
|
# caffe2/opt/fusion.h
|
||||||
|
# caffe2/python/layers/label_smooth.py
|
||||||
|
# caffe2/python/mint/static/css/simple-sidebar.css
|
||||||
|
# caffe2/python/modeling/get_entry_from_blobs.py
|
||||||
|
# caffe2/python/modeling/get_entry_from_blobs_test.py
|
||||||
|
# caffe2/python/modeling/gradient_clipping_test.py
|
||||||
|
# caffe2/python/operator_test/unique_ops_test.py
|
||||||
|
# caffe2/python/operator_test/upsample_op_test.py
|
||||||
|
# caffe2/python/operator_test/weight_scale_test.py
|
||||||
|
# caffe2/python/pybind_state_int8.cc
|
||||||
|
# caffe2/python/transformations.py
|
||||||
|
# caffe2/python/transformations_test.py
|
||||||
|
# caffe2/quantization/server/batch_matmul_dnnlowp_op.cc
|
||||||
|
# caffe2/quantization/server/batch_matmul_dnnlowp_op.h
|
||||||
|
# caffe2/quantization/server/compute_equalization_scale_test.py
|
||||||
|
# caffe2/quantization/server/elementwise_linear_dnnlowp_op.cc
|
||||||
|
# caffe2/quantization/server/elementwise_linear_dnnlowp_op.h
|
||||||
|
# caffe2/quantization/server/elementwise_sum_relu_op.cc
|
||||||
|
# caffe2/quantization/server/fb_fc_packed_op.cc
|
||||||
|
# caffe2/quantization/server/fb_fc_packed_op.h
|
||||||
|
# caffe2/quantization/server/fbgemm_fp16_pack_op.cc
|
||||||
|
# caffe2/quantization/server/fbgemm_fp16_pack_op.h
|
||||||
|
# caffe2/quantization/server/fully_connected_fake_lowp_op.cc
|
||||||
|
# caffe2/quantization/server/fully_connected_fake_lowp_op.h
|
||||||
|
# caffe2/quantization/server/int8_gen_quant_params_min_max_test.py
|
||||||
|
# caffe2/quantization/server/int8_gen_quant_params_test.py
|
||||||
|
# caffe2/quantization/server/int8_quant_scheme_blob_fill_test.py
|
||||||
|
# caffe2/quantization/server/spatial_batch_norm_relu_op.cc
|
||||||
|
# caffe2/sgd/weight_scale_op.cc
|
||||||
|
# caffe2/sgd/weight_scale_op.h
|
||||||
|
# caffe2/utils/bench_utils.h
|
||||||
|
# functorch/examples/maml_omniglot/maml-omniglot-higher.py
|
||||||
|
# functorch/examples/maml_omniglot/maml-omniglot-ptonly.py
|
||||||
|
# functorch/examples/maml_omniglot/maml-omniglot-transforms.py
|
||||||
|
# functorch/examples/maml_omniglot/support/omniglot_loaders.py
|
||||||
|
# modules/detectron/group_spatial_softmax_op.cc
|
||||||
|
# modules/detectron/group_spatial_softmax_op.cu
|
||||||
|
# modules/detectron/group_spatial_softmax_op.h
|
||||||
|
# modules/detectron/ps_roi_pool_op.cc
|
||||||
|
# modules/detectron/ps_roi_pool_op.h
|
||||||
|
# modules/detectron/roi_pool_f_op.cc
|
||||||
|
# modules/detectron/roi_pool_f_op.cu
|
||||||
|
# modules/detectron/roi_pool_f_op.h
|
||||||
|
# modules/detectron/sample_as_op.cc
|
||||||
|
# modules/detectron/sample_as_op.cu
|
||||||
|
# modules/detectron/sample_as_op.h
|
||||||
|
# modules/detectron/select_smooth_l1_loss_op.cc
|
||||||
|
# modules/detectron/select_smooth_l1_loss_op.cu
|
||||||
|
# modules/detectron/select_smooth_l1_loss_op.h
|
||||||
|
# modules/detectron/sigmoid_cross_entropy_loss_op.cc
|
||||||
|
# modules/detectron/sigmoid_cross_entropy_loss_op.cu
|
||||||
|
# modules/detectron/sigmoid_cross_entropy_loss_op.h
|
||||||
|
# modules/detectron/sigmoid_focal_loss_op.cc
|
||||||
|
# modules/detectron/sigmoid_focal_loss_op.cu
|
||||||
|
# modules/detectron/sigmoid_focal_loss_op.h
|
||||||
|
# modules/detectron/smooth_l1_loss_op.cc
|
||||||
|
# modules/detectron/smooth_l1_loss_op.cu
|
||||||
|
# modules/detectron/smooth_l1_loss_op.h
|
||||||
|
# modules/detectron/softmax_focal_loss_op.cc
|
||||||
|
# modules/detectron/softmax_focal_loss_op.cu
|
||||||
|
# modules/detectron/softmax_focal_loss_op.h
|
||||||
|
# modules/detectron/spatial_narrow_as_op.cc
|
||||||
|
# modules/detectron/spatial_narrow_as_op.cu
|
||||||
|
# modules/detectron/spatial_narrow_as_op.h
|
||||||
|
# modules/detectron/upsample_nearest_op.cc
|
||||||
|
# modules/detectron/upsample_nearest_op.h
|
||||||
|
# modules/module_test/module_test_dynamic.cc
|
||||||
|
# modules/rocksdb/rocksdb.cc
|
||||||
|
# scripts/apache_header.txt
|
||||||
|
# scripts/apache_python.txt
|
||||||
|
# torch/distributions/lkj_cholesky.py
|
||||||
|
#
|
||||||
|
# Apache 2.0 AND BSD 2-Clause
|
||||||
|
# caffe2/operators/deform_conv_op.cu
|
||||||
|
#
|
||||||
|
# Apache 2.0 AND BSD 2-Clause AND MIT
|
||||||
|
# modules/detectron/ps_roi_pool_op.cu
|
||||||
|
#
|
||||||
|
# Apache 2.0 AND BSD 2-Clause
|
||||||
|
# modules/detectron/upsample_nearest_op.cu
|
||||||
|
#
|
||||||
|
# BSD 0-Clause
|
||||||
|
# torch/csrc/utils/pythoncapi_compat.h
|
||||||
|
#
|
||||||
|
# BSD 2-Clause
|
||||||
|
# aten/src/ATen/native/quantized/cpu/qnnpack/deps/clog/LICENSE
|
||||||
|
# caffe2/image/transform_gpu.cu
|
||||||
|
# caffe2/image/transform_gpu.h
|
||||||
|
#
|
||||||
|
# BSL-1.0
|
||||||
|
# c10/util/flat_hash_map.h
|
||||||
|
# c10/util/hash.h
|
||||||
|
# c10/util/Optional.h
|
||||||
|
# c10/util/order_preserving_flat_hash_map.h
|
||||||
|
# c10/util/strong_type.h
|
||||||
|
# c10/util/variant.h
|
||||||
|
#
|
||||||
|
# GPL-3.0-or-later AND MIT
|
||||||
|
# c10/util/reverse_iterator.h
|
||||||
|
#
|
||||||
|
# Khronos
|
||||||
|
# These files are for OpenCL, an unused option
|
||||||
|
# Replace them later, as-needed with the opencl-headers.rpm
|
||||||
|
#
|
||||||
|
# caffe2/contrib/opencl/OpenCL/cl.hpp
|
||||||
|
# caffe2/mobile/contrib/libopencl-stub/include/CL/cl.h
|
||||||
|
# caffe2/mobile/contrib/libopencl-stub/include/CL/cl.hpp
|
||||||
|
# caffe2/mobile/contrib/libopencl-stub/include/CL/cl_ext.h
|
||||||
|
# caffe2/mobile/contrib/libopencl-stub/include/CL/cl_gl.h
|
||||||
|
# caffe2/mobile/contrib/libopencl-stub/include/CL/cl_gl_ext.h
|
||||||
|
# caffe2/mobile/contrib/libopencl-stub/include/CL/cl_platform.h
|
||||||
|
# caffe2/mobile/contrib/libopencl-stub/include/CL/opencl.h
|
||||||
|
#
|
||||||
|
# MIT
|
||||||
|
# android/libs/fbjni/googletest-CMakeLists.txt.in
|
||||||
|
# c10/util/BFloat16-math.h
|
||||||
|
# caffe2/mobile/contrib/libvulkan-stub/include/libvulkan-stub.h
|
||||||
|
# caffe2/mobile/contrib/libvulkan-stub/src/libvulkan-stub.c
|
||||||
|
# caffe2/onnx/torch_ops/defs.cc
|
||||||
|
# cmake/Modules_CUDA_fix/upstream/FindCUDA/make2cmake.cmake
|
||||||
|
# cmake/Modules_CUDA_fix/upstream/FindCUDA/parse_cubin.cmake
|
||||||
|
# cmake/Modules_CUDA_fix/upstream/FindCUDA/run_nvcc.cmake
|
||||||
|
# functorch/einops/_parsing.py
|
||||||
|
# test/functorch/test_parsing.py
|
||||||
|
# test/functorch/test_rearrange.py
|
||||||
|
# third_party/miniz-2.1.0/LICENSE
|
||||||
|
# third_party/miniz-2.1.0/miniz.c
|
||||||
|
# tools/coverage_plugins_package/setup.py
|
||||||
|
# torch/_appdirs.py
|
||||||
|
# torch/utils/hipify/hipify_python.py
|
||||||
|
#
|
||||||
|
# Public Domain
|
||||||
|
# caffe2/mobile/contrib/libopencl-stub/LICENSE
|
||||||
|
# caffe2/utils/murmur_hash3.cc
|
||||||
|
# caffe2/utils/murmur_hash3.h
|
||||||
|
#
|
||||||
|
# Zlib
|
||||||
|
# aten/src/ATen/native/cpu/avx_mathfun.h
|
||||||
|
|
||||||
|
%changelog
|
||||||
|
* Fri Dec 1 2023 Tom Rix <trix@redhat.com> - 2.1.0-10
|
||||||
|
- Disable gold linker
|
||||||
|
- Remove python requires
|
||||||
|
- Change to openblas, remove -lgfortran fixes
|
||||||
|
- Manually add -pie to linking options
|
||||||
|
|
||||||
|
* Fri Nov 24 2023 Tom Rix <trix@redhat.com> - 2.1.0-9
|
||||||
|
- Enable debug build
|
||||||
|
- Remove Khronos licensed files from source
|
||||||
|
- Use 0BSD license identifier
|
||||||
|
- Generate lists directories, python and header files
|
||||||
|
- Add a -test subpackage
|
||||||
|
|
||||||
|
* Wed Nov 15 2023 Tom Rix <trix@redhat.com> - 2.1.0-8
|
||||||
|
- Address review comments
|
||||||
|
|
||||||
|
* Thu Nov 2 2023 Tom Rix <trix@redhat.com> - 2.1.0-7
|
||||||
|
- Address review comments
|
||||||
|
- remove pyproject option
|
||||||
|
|
||||||
|
* Thu Oct 19 2023 Tom Rix <trix@redhat.com> - 2.1.0-6
|
||||||
|
- Address review comments
|
||||||
|
|
||||||
|
* Wed Oct 18 2023 Tom Rix <trix@redhat.com> - 2.1.0-5
|
||||||
|
- Address review comments
|
||||||
|
|
||||||
|
* Sat Oct 14 2023 Tom Rix <trix@redhat.com> - 2.1.0-4
|
||||||
|
- Use gloo, xnnpack
|
||||||
|
- Find missing build_bundled.py
|
||||||
|
- Add pyproject option
|
||||||
|
|
||||||
|
* Thu Oct 12 2023 Tom Rix <trix@redhat.com> - 2.1.0-3
|
||||||
|
- Address review comments
|
||||||
|
- Force so versioning on
|
||||||
|
|
||||||
|
* Mon Oct 9 2023 Tom Rix <trix@redhat.com> - 2.1.0-2
|
||||||
|
- Use the 2.1 release
|
||||||
|
- Reduce USE_SYSTEM_LIBS to parts
|
||||||
|
- Remove almost all of third_party/
|
||||||
|
- Remove py2rpm generated noise
|
||||||
|
|
||||||
|
* Sat Sep 30 2023 Tom Rix <trix@redhat.com> - 2.1.0-1
|
||||||
|
- Initial package.
|
||||||
|
|
||||||
1
sources
Normal file
1
sources
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
SHA512 (pytorch-v2.1.0.tar.gz) = 59421bf6cea6661d61ed66ab16526e3a07162e70e53381cbd5987042917610ec993d2f151fb086f0f98e5a396fe69e82bbc76f840bebffe4ebe7f50458c3aa44
|
||||||
Loading…
Add table
Add a link
Reference in a new issue