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 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58
|
From: Cordell Bloor <cgmb@slerp.xyz>
Date: Mon, 25 Mar 2024 01:13:16 -0600
Subject: add opt-in macro for arch conversion
The Debian patch that loads code objects built for a particular ISA on
all compatible hardware not supported upstream, so for a header-only
library like rocprim it seems prudent to make behaviour depending on
that to be opt-in.
Forwarded: not-needed
Bug-Debian: https://bugs.debian.org/1056172
---
rocprim/include/rocprim/device/config_types.hpp | 25 ++++++++++++++++++++++++-
1 file changed, 24 insertions(+), 1 deletion(-)
diff --git a/rocprim/include/rocprim/device/config_types.hpp b/rocprim/include/rocprim/device/config_types.hpp
index b1bfa55..099b05a 100644
--- a/rocprim/include/rocprim/device/config_types.hpp
+++ b/rocprim/include/rocprim/device/config_types.hpp
@@ -216,7 +216,19 @@ constexpr target_arch get_target_arch_from_name(const char* const arch_name, con
"gfx1100",
"gfx1102",
"gfx1200",
- "gfx1201"};
+ "gfx1201",
+#ifdef ROCPRIM_USE_ARCH_CONVERSION
+ "gfx902",
+ "gfx909",
+ "gfx90c",
+ "gfx1031",
+ "gfx1032",
+ "gfx1033",
+ "gfx1034",
+ "gfx1035",
+ "gfx1036",
+#endif
+ };
constexpr target_arch target_architectures[] = {
target_arch::gfx803,
target_arch::gfx900,
@@ -229,6 +241,17 @@ constexpr target_arch get_target_arch_from_name(const char* const arch_name, con
target_arch::gfx1102,
target_arch::gfx1200,
target_arch::gfx1201,
+#ifdef ROCPRIM_USE_ARCH_CONVERSION
+ target_arch::gfx900,
+ target_arch::gfx900,
+ target_arch::gfx900,
+ target_arch::gfx1030,
+ target_arch::gfx1030,
+ target_arch::gfx1030,
+ target_arch::gfx1030,
+ target_arch::gfx1030,
+ target_arch::gfx1030,
+#endif
};
static_assert(sizeof(target_names) / sizeof(target_names[0])
== sizeof(target_architectures) / sizeof(target_architectures[0]),
|