public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Tom Rix <Tom.Rix@amd.com>
To: git-commits@fedoraproject.org
Subject: [rpms/python-torchvision] rawhide: Rework cuda version patch for 0.27.1
Date: Tue, 23 Jun 2026 15:18:17 GMT [thread overview]
Message-ID: <178222789709.1.1507396084048286574.rpms-python-torchvision-4f9ff6322311@fedoraproject.org> (raw)
A new commit has been pushed.
Repo : rpms/python-torchvision
Branch : rawhide
Commit : 4f9ff63223119f369a9c4188fb15b7c37bac2c09
Author : Tom Rix <Tom.Rix@amd.com>
Date : 2026-06-23T08:17:42-07:00
Stats : +16/-18 in 2 file(s)
URL : https://src.fedoraproject.org/rpms/python-torchvision/c/4f9ff63223119f369a9c4188fb15b7c37bac2c09?branch=rawhide
Log:
Rework cuda version patch for 0.27.1
Signed-off-by: Tom Rix <Tom.Rix@amd.com>
---
diff --git a/0001-A-better-cuda-version.patch b/0001-A-better-cuda-version.patch
index ad6eaa1..8058bcf 100644
--- a/0001-A-better-cuda-version.patch
+++ b/0001-A-better-cuda-version.patch
@@ -1,14 +1,14 @@
-From b16eeb9f2bc4fa870fea6644bc3fafc1770b9368 Mon Sep 17 00:00:00 2001
+From 533b86d3964f2a5e0daa1dd9fa49b570ff8b43e8 Mon Sep 17 00:00:00 2001
From: Tom Rix <Tom.Rix@amd.com>
-Date: Tue, 3 Mar 2026 06:13:05 -0800
+Date: Tue, 23 Jun 2026 06:45:11 -0700
Subject: [PATCH] A better cuda version
---
- torchvision/csrc/vision.cpp | 17 ++++++++---------
- 1 file changed, 8 insertions(+), 9 deletions(-)
+ torchvision/csrc/vision.cpp | 13 +++++--------
+ 1 file changed, 5 insertions(+), 8 deletions(-)
diff --git a/torchvision/csrc/vision.cpp b/torchvision/csrc/vision.cpp
-index 806e870a83fd..e937924c2c88 100644
+index 6cd289d3e8c6..133dd406572f 100644
--- a/torchvision/csrc/vision.cpp
+++ b/torchvision/csrc/vision.cpp
@@ -7,6 +7,7 @@
@@ -19,28 +19,26 @@ index 806e870a83fd..e937924c2c88 100644
#endif
// If we are in a Windows environment, we need to define
-@@ -18,15 +19,13 @@ void* PyInit__C(void) {
+@@ -18,16 +19,12 @@ void* PyInit__C(void) {
#endif // !defined(MOBILE) && defined(_WIN32)
namespace vision {
-int64_t cuda_version() {
-#ifdef WITH_CUDA
+- // looks like 12060, 12080, etc.
- return CUDA_VERSION;
-#else
- return -1;
-+#ifdef WITH_HIP
-+ int64_t cuda_version() {
-+ return (ROCM_VERSION_MAJOR * 100) + ROCM_VERSION_MINOR;
-+ }
-+ TORCH_LIBRARY_FRAGMENT(torchvision, m) {
-+ m.def("_cuda_version", &cuda_version);
-+ }
- #endif
+-#endif
-}
++#ifdef WITH_HIP
++int64_t cuda_version() { return (ROCM_VERSION_MAJOR * 100) + ROCM_VERSION_MINOR; }
--TORCH_LIBRARY_FRAGMENT(torchvision, m) {
-- m.def("_cuda_version", &cuda_version);
--}
+ TORCH_LIBRARY_FRAGMENT(torchvision, m) {
+ m.def("_cuda_version", &cuda_version);
+ }
++#endif
++
} // namespace vision
--
2.53.0
diff --git a/python-torchvision.spec b/python-torchvision.spec
index 70bb56f..4e56f96 100644
--- a/python-torchvision.spec
+++ b/python-torchvision.spec
@@ -34,7 +34,7 @@ Source0: %{url}/archive/%{commit0}/vision-%{shortcommit0}.tar.gz
Source0: %{url}/archive/refs/tags/v%{version}.tar.gz#/vision-v%{version}.tar.gz
%endif
# get the hip version, step on the cuda version
-# Patch1: 0001-A-better-cuda-version.patch
+Patch1: 0001-A-better-cuda-version.patch
# Fix build with FFmpeg 8
# Patch2: %{name}-ffmpeg8.patch
reply other threads:[~2026-06-23 15:18 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=178222789709.1.1507396084048286574.rpms-python-torchvision-4f9ff6322311@fedoraproject.org \
--to=tom.rix@amd.com \
--cc=git-commits@fedoraproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox