File: fix-legacy-stream-version-check.patch

package info (click to toggle)
rocprim 6.4.3-2
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 11,428 kB
  • sloc: cpp: 153,383; python: 1,397; sh: 404; xml: 217; makefile: 119
file content (42 lines) | stat: -rw-r--r-- 1,853 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
From: Cordell Bloor <cgmb@slerp.xyz>
Date: Mon, 30 Jun 2025 16:13:56 -0600
Subject: fix legacy stream version check

The hipStreamLegacy macro was added in HIP 6.2.

Forwarded: https://github.com/ROCm/rocm-libraries/pull/464
---
 rocprim/include/rocprim/device/config_types.hpp | 4 ++--
 test/rocprim/test_config_dispatch.cpp           | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/rocprim/include/rocprim/device/config_types.hpp b/rocprim/include/rocprim/device/config_types.hpp
index 1fcc9f5..3ae4f74 100644
--- a/rocprim/include/rocprim/device/config_types.hpp
+++ b/rocprim/include/rocprim/device/config_types.hpp
@@ -374,8 +374,8 @@ inline hipError_t get_device_from_stream(const hipStream_t stream, int& device_i
 {
     static constexpr hipStream_t default_stream = 0;
 
-    // hipStreamLegacy is supported in HIP >= 6.1.0
-#if (HIP_VERSION_MAJOR >= 6 && HIP_VERSION_MINOR >= 1)
+    // hipStreamLegacy is supported in HIP >= 6.2.0
+#if (HIP_VERSION_MAJOR >= 6 && HIP_VERSION_MINOR >= 2)
     const bool is_legacy_stream = (stream == hipStreamLegacy);
 #else
     const bool is_legacy_stream = false;
diff --git a/test/rocprim/test_config_dispatch.cpp b/test/rocprim/test_config_dispatch.cpp
index f7ae181..00ef6d8 100644
--- a/test/rocprim/test_config_dispatch.cpp
+++ b/test/rocprim/test_config_dispatch.cpp
@@ -98,8 +98,8 @@ TEST(RocprimConfigDispatchTests, DeviceIdFromStream)
     HIP_CHECK(get_device_from_stream(hipStreamPerThread, result));
     ASSERT_EQ(result, device_id);
 
-    // hipStreamLegacy support was added in ROCm 6.1.0
-#if (HIP_VERSION_MAJOR >= 6 && HIP_VERSION_MINOR >= 1)
+    // hipStreamLegacy support was added in ROCm 6.2.0
+#if (HIP_VERSION_MAJOR >= 6 && HIP_VERSION_MINOR >= 2)
     HIP_CHECK(get_device_from_stream(hipStreamLegacy, result));
     ASSERT_EQ(result, device_id);
 #endif