pkgsrc-WIP-changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
py-torch: switch to upstream fix
Module Name: pkgsrc-wip
Committed By: Thomas Klausner <wiz%NetBSD.org@localhost>
Pushed By: wiz
Date: Sat Jul 4 12:02:47 2026 +0200
Changeset: 14eca424fc6001c22ed12e41c9c4484e26b215e4
Modified Files:
py-torch/distinfo
Added Files:
py-torch/patches/patch-c10_core_Scalar.h
Removed Files:
py-torch/patches/patch-c10_test_core_Scalar__test.cpp
Log Message:
py-torch: switch to upstream fix
To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=14eca424fc6001c22ed12e41c9c4484e26b215e4
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
diffstat:
py-torch/distinfo | 2 +-
py-torch/patches/patch-c10_core_Scalar.h | 21 +++++++++++++++++++++
.../patches/patch-c10_test_core_Scalar__test.cpp | 19 -------------------
3 files changed, 22 insertions(+), 20 deletions(-)
diffs:
diff --git a/py-torch/distinfo b/py-torch/distinfo
index 99708cba13..96fb2e0d1e 100644
--- a/py-torch/distinfo
+++ b/py-torch/distinfo
@@ -3,7 +3,7 @@ $NetBSD$
BLAKE2s (pytorch-v2.12.1.tar.gz) = e838105c3feba32caead605d7257c9324b8a8b500e06062ad7f36e115c068169
SHA512 (pytorch-v2.12.1.tar.gz) = f8112bbd5c2884530b0121dd4cf574e77d1d60b53cca4b5949a951babc348970b0ca7e2bdaf6b17fc871966600f0a08c744bcaf9c098cec24b26fafb0a90f47a
Size (pytorch-v2.12.1.tar.gz) = 430918199 bytes
-SHA1 (patch-c10_test_core_Scalar__test.cpp) = 7b3908b286e90c5b94f82a4ebf6cdca629f6ad0d
+SHA1 (patch-c10_core_Scalar.h) = bcc847bab505e1079cdc92c1af5aa69d961630bc
SHA1 (patch-cmake_Dependencies.cmake) = d524cb2a811788d801f086a3a84625f4c3dc3bf8
SHA1 (patch-cmake_Modules_FindBLAS.cmake) = fd29b5e717eda52f249ee3cff04e6fdd6c398cc2
SHA1 (patch-cmake_public_mkldnn.cmake) = 3cd077c540c0923a689d403ba92dc2c206b7f937
diff --git a/py-torch/patches/patch-c10_core_Scalar.h b/py-torch/patches/patch-c10_core_Scalar.h
new file mode 100644
index 0000000000..7195adb742
--- /dev/null
+++ b/py-torch/patches/patch-c10_core_Scalar.h
@@ -0,0 +1,21 @@
+$NetBSD$
+
+Fix build on NetBSD.
+https://github.com/pytorch/pytorch/pull/188941
+
+--- c10/core/Scalar.h.orig 2026-06-18 00:45:12.000000000 +0000
++++ c10/core/Scalar.h
+@@ -68,10 +68,11 @@ class C10_API Scalar {
+ "int64_t is the same as long long on Windows");
+ Scalar(long vv) : Scalar(vv, true) {}
+ #endif
+-#if defined(__linux__) && !defined(__ANDROID__)
++#if (defined(__linux__) && !defined(__ANDROID__)) || defined(__NetBSD__) || \
++ defined(__FreeBSD__) || defined(__OpenBSD__)
+ static_assert(
+ sizeof(void*) != 8 || std::is_same_v<long, int64_t>,
+- "int64_t is the same as long on 64 bit Linux");
++ "int64_t is the same as long on 64 bit Linux and BSDs");
+ #if LONG_MAX != INT_MAX
+ Scalar(long long vv) : Scalar(vv, true) {}
+ #endif /* not 32-bit system */
diff --git a/py-torch/patches/patch-c10_test_core_Scalar__test.cpp b/py-torch/patches/patch-c10_test_core_Scalar__test.cpp
deleted file mode 100644
index aa4dca1be4..0000000000
--- a/py-torch/patches/patch-c10_test_core_Scalar__test.cpp
+++ /dev/null
@@ -1,19 +0,0 @@
-$NetBSD$
-
-Avoid
-c10/test/core/Scalar_test.cpp: In member function 'virtual void ScalarTest_LongsAndLongLongs_Test::TestBody()':
-c10/test/core/Scalar_test.cpp:53:24: error: conversion from 'long long int' to 'c10::Scalar' is ambiguous
- 53 | Scalar longlongOne = 1LL;
-
-https://github.com/pytorch/pytorch/issues/188911
-
---- c10/test/core/Scalar_test.cpp.orig 2026-07-03 14:48:13.006025245 +0000
-+++ c10/test/core/Scalar_test.cpp
-@@ -50,6 +50,6 @@ TEST(ScalarTest, LongsAndLongLongs) {
-
- TEST(ScalarTest, LongsAndLongLongs) {
- Scalar longOne = 1L;
-- Scalar longlongOne = 1LL;
-+ Scalar longlongOne = (uint64_t)1LL;
- ASSERT_EQ(longOne.toInt(), longlongOne.toInt());
- }
Home |
Main Index |
Thread Index |
Old Index