diff --git a/misc/py-pytorch/Makefile b/misc/py-pytorch/Makefile index 6bccd074fd5a..77a74e33233a 100644 --- a/misc/py-pytorch/Makefile +++ b/misc/py-pytorch/Makefile @@ -1,83 +1,83 @@ PORTNAME= pytorch DISTVERSIONPREFIX= v -DISTVERSION= 2.3.1 -PORTREVISION= 5 +DISTVERSION= 2.4.0 CATEGORIES= misc # machine-learning MASTER_SITES= https://github.com/pytorch/pytorch/releases/download/v${DISTVERSION}/ PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} DISTFILES= ${PORTNAME}-${DISTVERSIONFULL}${EXTRACT_SUFX} # the main tarball disappears when GH_xx tags are added w/out this line DIST_SUBDIR= ${PORTNAME} MAINTAINER= yuri@FreeBSD.org COMMENT= PyTorch: Tensors and dynamic neural networks in Python WWW= https://pytorch.org/ LICENSE= BSD3CLAUSE LICENSE_FILE= ${WRKSRC}/LICENSE BROKEN_aarch64= build fails: CMake Error at third_party/QNNPACK/CMakeLists.txt:47 (MESSAGE): Unrecognized CMAKE_SYSTEM_NAME = FreeBSD BROKEN_i386= build fails: DispatchStub.cpp:162:29: [0m[0;1;31merror: [0m[1muse of undeclared identifier 'AVX2'[0m BUILD_DEPENDS= cmake:devel/cmake-core \ gmake:devel/gmake \ pybind11>0:devel/pybind11 \ ${PYNUMPY} \ ${LOCALBASE}/include/fxdiv.h:devel/fxdiv \ ${PYTHON_PKGNAMEPREFIX}typing-extensions>0:devel/py-typing-extensions@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}pyyaml>=0:devel/py-pyyaml@${PY_FLAVOR} LIB_DEPENDS= libabsl_base.so:devel/abseil \ libblis.so:math/blis \ libmpi_cxx.so:net/openmpi4 \ libonnx.so:misc/onnx \ libopenblas.so:math/openblas \ libpthreadpool.so:devel/pthreadpool \ libprotobuf.so:devel/protobuf \ libsleef.so:math/sleef RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}filelock>0:sysutils/py-filelock@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}Jinja2>=0:devel/py-Jinja2@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}networkx>0:math/py-networkx@${PY_FLAVOR} \ ${PYNUMPY} \ ${PYTHON_PKGNAMEPREFIX}sympy>0:math/py-sympy@${PY_FLAVOR} \ ${PYTHON_PKGNAMEPREFIX}typing-extensions>0:devel/py-typing-extensions@${PY_FLAVOR} RUN_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}dill>0:devel/py-dill@${PY_FLAVOR} # optional dependency USES= compiler:c++17-lang localbase:ldflags python USE_PYTHON= distutils autoplist USE_GITHUB= nodefault GH_TUPLE= pytorch:cpuinfo:3a3b76bc8845d0f4a2ea3108e256313458c5de03:cpuinfo/cpuinfo-with-freebsd-support # https://github.com/pytorch/cpuinfo/pull/230/commits MAKE_ENV= USE_NINJA=no # ninja breaks for some reason MAKE_ENV+= BUILD_TEST=0 # ninja breaks for some reason MAKE_ENV+= USE_MKLDNN=0 # disable MKLDNN that doesn't exist, see https://github.com/pytorch/pytorch/issues/100957 MAKE_ENV+= USE_CUDNN=0 MAKE_ENV+= USE_LAPACK=1 # needed on FreeBSD to run w/out GPU +MAKE_ENV+= USE_QNNPACK=0 LDFLAGS+= -lexecinfo BINARY_ALIAS= make=${GMAKE} POST_PLIST= fix-plist .include .if ${OPSYS} == FreeBSD && ( ${OSVERSION} >= 1400091 || ( ${OSVERSION} >= 1302507 && ${OSVERSION} < 1400000 )) USES+= llvm:max=15 .endif post-patch: @cd ${WRKSRC} && \ ${RM} -r third_party/cpuinfo third_party/fbgemm/third_party/cpuinfo && \ ${CP} -r cpuinfo-with-freebsd-support third_party/cpuinfo && \ ${CP} -r cpuinfo-with-freebsd-support third_party/fbgemm/third_party/cpuinfo post-install: # strip binaries @${STRIP_CMD} \ ${STAGEDIR}${PYTHON_SITELIBDIR}/torch/bin/torch_shm_manager \ ${STAGEDIR}${PYTHON_SITELIBDIR}/torch/_C${PYTHON_EXT_SUFFIX}.so \ ${STAGEDIR}${PYTHON_SITELIBDIR}/functorch/_C${PYTHON_EXT_SUFFIX}.so \ ${STAGEDIR}${PYTHON_SITELIBDIR}/torch/lib/lib*.so fix-plist: # remove the stray %%PYTHON_SITELIBDIR%%/caffe2 file @${REINPLACE_CMD} -e "s|.*/caffe2$$||" ${TMPPLIST} .include diff --git a/misc/py-pytorch/distinfo b/misc/py-pytorch/distinfo index 5357ddb84ac4..23ab484cb7d0 100644 --- a/misc/py-pytorch/distinfo +++ b/misc/py-pytorch/distinfo @@ -1,5 +1,5 @@ -TIMESTAMP = 1718402293 -SHA256 (pytorch/pytorch-v2.3.1.tar.gz) = 6c66b59345091907cd62a693b647cee224558e7f15a9b04f4f322f4f6ffeb75b -SIZE (pytorch/pytorch-v2.3.1.tar.gz) = 277997681 +TIMESTAMP = 1724635082 +SHA256 (pytorch/pytorch-v2.4.0.tar.gz) = a890d4342149adbc6c8b116a9afe437fe347527a9ecc0650086cdec82ecdcfb7 +SIZE (pytorch/pytorch-v2.4.0.tar.gz) = 296908090 SHA256 (pytorch/pytorch-cpuinfo-3a3b76bc8845d0f4a2ea3108e256313458c5de03_GH0.tar.gz) = 658acaf67573484abc7a093066d3766f9a3b94aff5b77e0f4e9c72cee5ebaa4a SIZE (pytorch/pytorch-cpuinfo-3a3b76bc8845d0f4a2ea3108e256313458c5de03_GH0.tar.gz) = 3534893 diff --git a/misc/py-pytorch/files/patch-CMakeLists.txt b/misc/py-pytorch/files/patch-CMakeLists.txt index 3fddac84c520..968de704b3c4 100644 --- a/misc/py-pytorch/files/patch-CMakeLists.txt +++ b/misc/py-pytorch/files/patch-CMakeLists.txt @@ -1,48 +1,48 @@ ---- CMakeLists.txt.orig 2024-06-05 19:17:56 UTC +--- CMakeLists.txt.orig 2024-07-24 18:41:35 UTC +++ CMakeLists.txt -@@ -148,7 +148,7 @@ set(CPU_INTEL OFF) +@@ -181,7 +181,7 @@ set(CPU_INTEL OFF) set(CPU_AARCH64 OFF) set(CPU_INTEL OFF) -if(CMAKE_SYSTEM_PROCESSOR MATCHES "(AMD64|x86_64)") +if(CMAKE_SYSTEM_PROCESSOR MATCHES "(amd64|x86_64)") set(CPU_INTEL ON) elseif(CMAKE_SYSTEM_PROCESSOR MATCHES "^(aarch64|arm64)") set(CPU_AARCH64 ON) -@@ -173,7 +173,7 @@ option(BUILD_DOCS "Build Caffe2 documentation" OFF) - option(ATEN_NO_TEST "Do not build ATen test binaries" OFF) +@@ -210,7 +210,7 @@ option(BUILD_CUSTOM_PROTOBUF option(BUILD_BINARY "Build C++ binaries" OFF) option(BUILD_DOCS "Build Caffe2 documentation" OFF) --option(BUILD_CUSTOM_PROTOBUF "Build and use Caffe2's own protobuf under third_party" ON) -+option(BUILD_CUSTOM_PROTOBUF "Build and use Caffe2's own protobuf under third_party" OFF) + option(BUILD_CUSTOM_PROTOBUF +- "Build and use Caffe2's own protobuf under third_party" ON) ++ "Build and use Caffe2's own protobuf under third_party" OFF) option(BUILD_PYTHON "Build Python binaries" ON) - option(BUILD_CAFFE2 "Master flag to build Caffe2" OFF) option(BUILD_LITE_INTERPRETER "Master flag to build Lite Interpreter" OFF) -@@ -226,7 +226,7 @@ option(USE_LEVELDB "Use LEVELDB" OFF) + option(BUILD_SHARED_LIBS "Build libcaffe2.so" ON) +@@ -258,7 +258,7 @@ option(USE_GLOG "Use GLOG" OFF) + option(USE_FAKELOWP "Use FakeLowp operators" OFF) option(USE_GFLAGS "Use GFLAGS" OFF) option(USE_GLOG "Use GLOG" OFF) - option(USE_LEVELDB "Use LEVELDB" OFF) -option(USE_LITE_PROTO "Use lite protobuf instead of full." OFF) -+option(USE_LITE_PROTO "Use lite protobuf instead of full." ON) # use lite protobuf to workaround for protobuf-related failure described here: https://github.com/onnx/optimizer/issues/38 - option(USE_LMDB "Use LMDB" OFF) ++option(USE_LITE_PROTO "Use lite protobuf instead of full." ON) option(USE_MAGMA "Use MAGMA" ON) - option(USE_METAL "Use Metal for Caffe2 iOS build" ON) -@@ -409,15 +409,15 @@ option(USE_SYSTEM_CPUINFO "Use system-provided cpuinfo + option(USE_PYTORCH_METAL "Use Metal for PyTorch iOS build" OFF) + option(USE_PYTORCH_METAL_EXPORT "Export Metal models on MacOSX desktop" OFF) +@@ -451,15 +451,15 @@ option(USE_SYSTEM_CPUINFO "Use system-provided cpuinfo # USE_SYSTEM_LIBS being "OFF". option(USE_SYSTEM_LIBS "Use all available system-provided libraries." OFF) option(USE_SYSTEM_CPUINFO "Use system-provided cpuinfo." OFF) -option(USE_SYSTEM_SLEEF "Use system-provided sleef." OFF) +option(USE_SYSTEM_SLEEF "Use system-provided sleef." ON) option(USE_SYSTEM_GLOO "Use system-provided gloo." OFF) option(USE_SYSTEM_FP16 "Use system-provided fp16." OFF) -option(USE_SYSTEM_PYBIND11 "Use system-provided PyBind11." OFF) +option(USE_SYSTEM_PYBIND11 "Use system-provided PyBind11." ON) option(USE_SYSTEM_PTHREADPOOL "Use system-provided pthreadpool." OFF) option(USE_SYSTEM_PSIMD "Use system-provided psimd." OFF) option(USE_SYSTEM_FXDIV "Use system-provided fxdiv." OFF) option(USE_SYSTEM_BENCHMARK "Use system-provided google benchmark." OFF) -option(USE_SYSTEM_ONNX "Use system-provided onnx." OFF) +option(USE_SYSTEM_ONNX "Use system-provided onnx." ON) option(USE_SYSTEM_XNNPACK "Use system-provided xnnpack." OFF) - option(USE_SYSTEM_ZSTD "Use system-provided zstd." OFF) option(USE_GOLD_LINKER "Use ld.gold to link" OFF) + if(USE_SYSTEM_LIBS) diff --git a/misc/py-pytorch/files/patch-aten_src_ATen_cpu_vec_vec256_vec256__bfloat16.h b/misc/py-pytorch/files/patch-aten_src_ATen_cpu_vec_vec256_vec256__bfloat16.h deleted file mode 100644 index 5923cd93c2cd..000000000000 --- a/misc/py-pytorch/files/patch-aten_src_ATen_cpu_vec_vec256_vec256__bfloat16.h +++ /dev/null @@ -1,11 +0,0 @@ ---- aten/src/ATen/cpu/vec/vec256/vec256_bfloat16.h.orig 2023-10-12 12:49:42 UTC -+++ aten/src/ATen/cpu/vec/vec256/vec256_bfloat16.h -@@ -266,7 +266,7 @@ static_assert( (public) - } - return b; - } -- Vectorized map(const __m256 (*const vop)(__m256)) const { -+ Vectorized map(__m256 (*const vop)(__m256)) const { - __m256 lo, hi; - cvt_to_fp32(values, lo, hi); - const auto o1 = vop(lo); diff --git a/misc/py-pytorch/files/patch-aten_src_ATen_cpu_vec_vec512_vec512__bfloat16.h b/misc/py-pytorch/files/patch-aten_src_ATen_cpu_vec_vec512_vec512__bfloat16.h deleted file mode 100644 index 80e0b1832434..000000000000 --- a/misc/py-pytorch/files/patch-aten_src_ATen_cpu_vec_vec512_vec512__bfloat16.h +++ /dev/null @@ -1,11 +0,0 @@ ---- aten/src/ATen/cpu/vec/vec512/vec512_bfloat16.h.orig 2023-10-12 12:54:40 UTC -+++ aten/src/ATen/cpu/vec/vec512/vec512_bfloat16.h -@@ -345,7 +345,7 @@ static_assert( (public) - } - #pragma clang diagnostic push - #pragma clang diagnostic ignored "-Wignored-qualifiers" -- Vectorized map(const __m512 (*const vop)(__m512)) const { -+ Vectorized map(__m512 (*const vop)(__m512)) const { - __m512 lo, hi; - cvt_to_fp32(values, lo, hi); - const auto o1 = vop(lo); diff --git a/misc/py-pytorch/files/patch-aten_src_ATen_native_sparse_ValidateCompressedIndicesCommon.h b/misc/py-pytorch/files/patch-aten_src_ATen_native_sparse_ValidateCompressedIndicesCommon.h index e4cdf08b4ff3..f1cc30608ecf 100644 --- a/misc/py-pytorch/files/patch-aten_src_ATen_native_sparse_ValidateCompressedIndicesCommon.h +++ b/misc/py-pytorch/files/patch-aten_src_ATen_native_sparse_ValidateCompressedIndicesCommon.h @@ -1,78 +1,78 @@ ---- aten/src/ATen/native/sparse/ValidateCompressedIndicesCommon.h.orig 2023-12-15 02:03:27 UTC +--- aten/src/ATen/native/sparse/ValidateCompressedIndicesCommon.h.orig 2024-07-24 18:41:35 UTC +++ aten/src/ATen/native/sparse/ValidateCompressedIndicesCommon.h -@@ -40,7 +40,7 @@ INVARIANT_CHECK_FUNC_API +@@ -39,7 +39,7 @@ INVARIANT_CHECK_FUNC_API // use `cidx/idx` to refer to `compressed_indices/plain_indices` respectively. INVARIANT_CHECK_FUNC_API -_assert(const bool cond, const char* const message) { +__assert(const bool cond, const char* const message) { #ifdef GPUCC CUDA_KERNEL_ASSERT(cond && message); #else -@@ -58,9 +58,9 @@ INVARIANT_CHECK_FUNC_API _check_first_cidx_is_zero( +@@ -57,9 +57,9 @@ INVARIANT_CHECK_FUNC_API _check_first_cidx_is_zero( const index_t& zero) { const bool invariant = cidx == zero; if (cdim_name == CDimName::CRow) { - _assert(invariant, "`crow_indices[..., 0] == 0` is not satisfied."); + __assert(invariant, "`crow_indices[..., 0] == 0` is not satisfied."); } else { - _assert(invariant, "`ccol_indices[..., 0] == 0` is not satisfied."); + __assert(invariant, "`ccol_indices[..., 0] == 0` is not satisfied."); } } -@@ -72,9 +72,9 @@ INVARIANT_CHECK_FUNC_API _check_last_cidx_is_nnz( +@@ -71,9 +71,9 @@ INVARIANT_CHECK_FUNC_API _check_last_cidx_is_nnz( const index_t& nnz) { const bool invariant = cidx == nnz; if (cdim_name == CDimName::CRow) { - _assert(invariant, "`crow_indices[..., -1] == nnz` is not satisfied."); + __assert(invariant, "`crow_indices[..., -1] == nnz` is not satisfied."); } else { - _assert(invariant, "`ccol_indices[..., -1] == nnz` is not satisfied."); + __assert(invariant, "`ccol_indices[..., -1] == nnz` is not satisfied."); } } -@@ -89,11 +89,11 @@ INVARIANT_CHECK_FUNC_API _check_cidx_nondecreasing_loc +@@ -88,11 +88,11 @@ INVARIANT_CHECK_FUNC_API _check_cidx_nondecreasing_loc const auto s_cidx = cidx_next - cidx; const bool invariant = zero <= s_cidx && s_cidx <= dim; if (cdim_name == CDimName::CRow) { - _assert( + __assert( invariant, "`0 <= crow_indices[..., 1:] - crow_indices[..., :-1] <= ncols` is not satisfied."); } else { - _assert( + __assert( invariant, "`0 <= ccol_indices[..., 1:] - ccol_indices[..., :-1] <= nrows` is not satisfied."); } -@@ -108,9 +108,9 @@ INVARIANT_CHECK_FUNC_API _check_idx_bounds( +@@ -107,9 +107,9 @@ INVARIANT_CHECK_FUNC_API _check_idx_bounds( const index_t& dim) { const bool invariant = zero <= idx && idx < dim; if (cdim_name == CDimName::CRow) { - _assert(invariant, "`0 <= col_indices < ncols` is not satisfied."); + __assert(invariant, "`0 <= col_indices < ncols` is not satisfied."); } else { - _assert(invariant, "`0 <= row_indices < nrows` is not satisfied."); + __assert(invariant, "`0 <= row_indices < nrows` is not satisfied."); } } -@@ -129,14 +129,14 @@ INVARIANT_CHECK_FUNC_API _check_idx_sorted_distinct_va - for (auto* RESTRICT curr = slice_begin + 1; curr < slice_end; ++curr) { - const auto invariant = *(curr - 1) < *curr; +@@ -128,14 +128,14 @@ INVARIANT_CHECK_FUNC_API _check_idx_sorted_distinct_va + for (auto* RESTRICT curr = slice_begin; (slice_begin < slice_end) && (curr + 1 < slice_end); ++curr) { + const auto invariant = *curr < *(curr + 1); if (cdim_name == CDimName::CRow) { - _assert( + __assert( invariant, "`col_indices[..., crow_indices[..., i - 1]:crow_indices[..., i]] " "for all i = 1, ..., nrows " "are sorted and distinct along the last dimension values` " "is not satisfied."); } else { - _assert( + __assert( invariant, "`row_indices[..., ccol_indices[..., i - 1]:ccol_indices[..., i]] " "for all i = 1, ..., ncols " diff --git a/misc/py-pytorch/files/patch-c10_core_DynamicCast.h b/misc/py-pytorch/files/patch-c10_core_DynamicCast.h index 096c85f368f8..f3f9af294a30 100644 --- a/misc/py-pytorch/files/patch-c10_core_DynamicCast.h +++ b/misc/py-pytorch/files/patch-c10_core_DynamicCast.h @@ -1,31 +1,31 @@ - workaround for the failuree diring math/dgl build: - /usr/local/lib/python3.9/site-packages/torch/include/c10/core/DynamicCast.h:112:22: error: use of undeclared identifier '__assert_fail' - see https://github.com/pytorch/pytorch/issues/113941 ---- c10/core/DynamicCast.h.orig 2023-10-06 19:49:01 UTC +--- c10/core/DynamicCast.h.orig 2024-07-24 18:41:35 UTC +++ c10/core/DynamicCast.h @@ -54,7 +54,7 @@ namespace c10 { // #ifdef C10_HOST_DEVICE -#define ERROR_UNSUPPORTED_CAST CUDA_KERNEL_ASSERT(false); +#define ERROR_UNSUPPORTED_CAST assert(false); #else #define ERROR_UNSUPPORTED_CAST TORCH_CHECK(false, "Unexpected scalar type"); #endif -@@ -99,13 +99,13 @@ C10_HOST_DEVICE inline void cast_and_store( +@@ -105,13 +105,13 @@ C10_HOST_DEVICE inline void cast_and_store( template <> \ C10_HOST_DEVICE inline T fetch_and_cast( \ const ScalarType src_type, const void* ptr) { \ - CUDA_KERNEL_ASSERT(ScalarType::scalartype_ == src_type); \ + assert(ScalarType::scalartype_ == src_type); \ return c10::load(ptr); \ } \ template <> \ C10_HOST_DEVICE inline void cast_and_store( \ const ScalarType dest_type, void* ptr, T value) { \ - CUDA_KERNEL_ASSERT(ScalarType::scalartype_ == dest_type); \ + assert(ScalarType::scalartype_ == dest_type); \ *(T*)ptr = value; \ } diff --git a/misc/py-pytorch/files/patch-caffe2_CMakeLists.txt b/misc/py-pytorch/files/patch-caffe2_CMakeLists.txt new file mode 100644 index 000000000000..21b4acf07bc2 --- /dev/null +++ b/misc/py-pytorch/files/patch-caffe2_CMakeLists.txt @@ -0,0 +1,28 @@ +- fix regression in python install path in 2.4.0 + +--- caffe2/CMakeLists.txt.orig 2024-07-24 18:41:35 UTC ++++ caffe2/CMakeLists.txt +@@ -1897,8 +1897,22 @@ if(BUILD_PYTHON) + # only rerun when needed. + + if(BUILD_PYTHON) ++ # Python site-packages ++ # Get canonical directory for python site packages (relative to install ++ # location). It varies from system to system. ++ # We should pin the path separator to the forward slash on Windows. ++ # More details can be seen at ++ # https://github.com/pytorch/pytorch/tree/main/tools/build_pytorch_libs.bat#note-backslash-munging-on-windows ++ pycmd(PYTHON_SITE_PACKAGES " ++ import os ++ import sysconfig ++ relative_site_packages = sysconfig.get_path('purelib').replace(sysconfig.get_path('data'), '').lstrip(os.path.sep) ++ print(relative_site_packages) ++ ") ++ file(TO_CMAKE_PATH ${PYTHON_SITE_PACKAGES} PYTHON_SITE_PACKAGES) ++ set(PYTHON_SITE_PACKAGES ${PYTHON_SITE_PACKAGES} PARENT_SCOPE) # for Summary + # ---[ Options. +- set(PYTHON_LIB_REL_PATH "${Python_SITELIB}" CACHE STRING "Python installation path (relative to CMake installation prefix)") ++ set(PYTHON_LIB_REL_PATH "${PYTHON_SITE_PACKAGES}" CACHE STRING "Python installation path (relative to CMake installation prefix)") + message(STATUS "Using ${PYTHON_LIB_REL_PATH} as python relative installation path") + + diff --git a/misc/py-pytorch/files/patch-cmake_Dependencies.cmake b/misc/py-pytorch/files/patch-cmake_Dependencies.cmake index 7c673370a258..d97ba9f5940e 100644 --- a/misc/py-pytorch/files/patch-cmake_Dependencies.cmake +++ b/misc/py-pytorch/files/patch-cmake_Dependencies.cmake @@ -1,11 +1,11 @@ ---- cmake/Dependencies.cmake.orig 2023-12-15 02:03:27 UTC +--- cmake/Dependencies.cmake.orig 2024-07-24 18:41:35 UTC +++ cmake/Dependencies.cmake -@@ -340,7 +340,7 @@ if(USE_NNPACK OR USE_QNNPACK OR USE_PYTORCH_QNNPACK OR +@@ -304,7 +304,7 @@ if(USE_NNPACK OR USE_PYTORCH_QNNPACK OR USE_XNNPACK) set(DISABLE_NNPACK_AND_FAMILY ON) endif() else() - if(NOT IOS AND NOT (CMAKE_SYSTEM_NAME MATCHES "^(Android|Linux|Darwin|Windows)$")) + if(NOT IOS AND NOT (CMAKE_SYSTEM_NAME MATCHES "^(Android|Linux|FreeBSD|Darwin|Windows)$")) message(WARNING "Target platform \"${CMAKE_SYSTEM_NAME}\" is not supported in {Q/X}NNPACK. " "Supported platforms are Android, iOS, Linux, and macOS. " diff --git a/misc/py-pytorch/files/patch-setup.py b/misc/py-pytorch/files/patch-setup.py new file mode 100644 index 000000000000..d4ceb66eaed9 --- /dev/null +++ b/misc/py-pytorch/files/patch-setup.py @@ -0,0 +1,10 @@ +--- setup.py.orig 2024-08-26 02:27:07 UTC ++++ setup.py +@@ -366,7 +366,6 @@ def get_submodule_folders(): + "cpuinfo", + "onnx", + "foxi", +- "QNNPACK", + "fbgemm", + "cutlass", + ] diff --git a/misc/py-pytorch/files/patch-third__party_kineto_libkineto_src_ThreadUtil.cpp b/misc/py-pytorch/files/patch-third__party_kineto_libkineto_src_ThreadUtil.cpp index f014a26e4f20..c439537220d6 100644 --- a/misc/py-pytorch/files/patch-third__party_kineto_libkineto_src_ThreadUtil.cpp +++ b/misc/py-pytorch/files/patch-third__party_kineto_libkineto_src_ThreadUtil.cpp @@ -1,11 +1,11 @@ ---- third_party/kineto/libkineto/src/ThreadUtil.cpp.orig 2023-04-03 19:46:02 UTC +--- third_party/kineto/libkineto/src/ThreadUtil.cpp.orig 2024-07-24 18:41:37 UTC +++ third_party/kineto/libkineto/src/ThreadUtil.cpp -@@ -57,7 +57,7 @@ int32_t systemThreadId() { - #elif defined _MSC_VER - _sysTid = (int32_t)GetCurrentThreadId(); +@@ -59,7 +59,7 @@ int32_t systemThreadId() { + #elif defined __FreeBSD__ + syscall(SYS_thr_self, &_sysTid); #else - _sysTid = (int32_t)syscall(SYS_gettid); + _sysTid = (int32_t)syscall(SYS_getpid); #endif } return _sysTid;