mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2025-12-21 21:17:37 -08:00
sci-ml/caffe2: Fix for CCCL
Signed-off-by: Alfredo Tupone <tupone@gentoo.org>
This commit is contained in:
parent
7334e1d35f
commit
a75d5082e1
@ -163,6 +163,7 @@ PATCHES=(
|
|||||||
"${FILESDIR}"/${PN}-2.8.0-rocm-minus-flash.patch
|
"${FILESDIR}"/${PN}-2.8.0-rocm-minus-flash.patch
|
||||||
"${FILESDIR}"/${PN}-2.9.0-cmake.patch
|
"${FILESDIR}"/${PN}-2.9.0-cmake.patch
|
||||||
"${FILESDIR}"/${PN}-2.9.0-rocm-distributed-link.patch
|
"${FILESDIR}"/${PN}-2.9.0-rocm-distributed-link.patch
|
||||||
|
"${FILESDIR}"/${P}-CCCL31.patch
|
||||||
)
|
)
|
||||||
|
|
||||||
src_prepare() {
|
src_prepare() {
|
||||||
|
|||||||
34
sci-ml/caffe2/files/caffe2-2.9.1-CCCL31.patch
Normal file
34
sci-ml/caffe2/files/caffe2-2.9.1-CCCL31.patch
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
From a20afb61007a94f5c28294e9ae20043657152ef6 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Bernhard Manfred Gruber <bernhardmgruber@gmail.com>
|
||||||
|
Date: Wed, 15 Oct 2025 01:40:49 +0000
|
||||||
|
Subject: [PATCH] Allow at::native::offset_t to be offset using `operator+=`
|
||||||
|
(#164570)
|
||||||
|
|
||||||
|
This will be required by CCCL 3.1.
|
||||||
|
Pull Request resolved: https://github.com/pytorch/pytorch/pull/164570
|
||||||
|
Approved by: https://github.com/Skylion007, https://github.com/eqy
|
||||||
|
---
|
||||||
|
aten/src/ATen/native/cuda/SortStable.cu | 8 +++++++-
|
||||||
|
1 file changed, 7 insertions(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/aten/src/ATen/native/cuda/SortStable.cu b/aten/src/ATen/native/cuda/SortStable.cu
|
||||||
|
index 4d956616371de..8117eeeec558e 100644
|
||||||
|
--- a/aten/src/ATen/native/cuda/SortStable.cu
|
||||||
|
+++ b/aten/src/ATen/native/cuda/SortStable.cu
|
||||||
|
@@ -21,9 +21,15 @@ namespace {
|
||||||
|
struct offset_t {
|
||||||
|
int stride;
|
||||||
|
int begin;
|
||||||
|
- __device__ int operator[](int i) {
|
||||||
|
+ __device__ int operator[](int i) const {
|
||||||
|
return stride * (begin + i);
|
||||||
|
}
|
||||||
|
+#if CCCL_VERSION >= 3001000
|
||||||
|
+ __device__ offset_t& operator+=(int i) {
|
||||||
|
+ begin += i;
|
||||||
|
+ return *this;
|
||||||
|
+ }
|
||||||
|
+#endif
|
||||||
|
};
|
||||||
|
// Segmented sort by full sort algorithm:.
|
||||||
|
// Say we are sorting a (2, 3) tensor. We have in flattened form:
|
||||||
Loading…
x
Reference in New Issue
Block a user