Subject: [bug#64498] [PATCH] gnu: rocm: Update to 5.6.0.

From: Lars-Dominik Braun <[email-masked]>
Date: Sun, 9 Jul 2023 20:08:08 +0200

Hi,

> Subject: [PATCH] gnu: rocm: Update to 5.6.0.

looks good to me and with the attached patch it even works on my RX 460
(aka gfx803). It still works for you, right?

Cheers,
Lars

diff --git a/gnu/packages/patches/rocclr-5.6.0-enable-gfx800.patch b/gnu/packages/patches/rocclr-5.6.0-enable-gfx800.patch
new file mode 100644
index 0000000000..2948234029
--- /dev/null
+++ b/gnu/packages/patches/rocclr-5.6.0-enable-gfx800.patch
@@ -0,0 +1,16 @@
+#From xuhuisheng
+#at https://github.com/RadeonOpenCompute/ROCm/issues/1659#issuecomment-1041026624
+
+diff --git a/utils/flags.hpp b/utils/flags.hpp
+index 8f0228cc..2eaa47c5 100644
+--- a/utils/flags.hpp
++++ b/utils/flags.hpp
+@@ -245,7 +245,7 @@ release(bool, ROC_SYSTEM_SCOPE_SIGNAL, true,                                  \
+         "Enable system scope for signals (uses interrupts).")                 \
+ release(bool, ROC_SKIP_COPY_SYNC, false,                                      \
+         "Skips copy syncs if runtime can predict the same engine.")           \
+-release(bool, ROC_ENABLE_PRE_VEGA, false,                                     \
++release(bool, ROC_ENABLE_PRE_VEGA, true,                                     \
+         "Enable support of pre-vega ASICs in ROCm path")                      \
+ release(bool, HIP_FORCE_QUEUE_PROFILING, false,                               \
+         "Force command queue profiling by default")                           \
diff --git a/gnu/packages/rocm.scm b/gnu/packages/rocm.scm
index 8140b1a46f..e883371928 100644
--- a/gnu/packages/rocm.scm
+++ b/gnu/packages/rocm.scm
@@ -193,7 +193,8 @@ (define rocclr-src
           (commit (string-append "rocm-" %rocm-version))))
     (sha256
      (base32
-      "1fzvnngxcvxscn718cqfglm4izccx88zjdr3g5ldfqw7hyd034sk"))))
+      "1fzvnngxcvxscn718cqfglm4izccx88zjdr3g5ldfqw7hyd034sk"))
+    (patches (search-patches "rocclr-5.6.0-enable-gfx800.patch"))))
 
 (define-public rocm-opencl-runtime
   (package