From 2121eb31ba14e17e50cd893b20f5e8b747231db5 Mon Sep 17 00:00:00 2001 From: renjithravindrankannath <94420380+renjithravindrankannath@users.noreply.github.com> Date: Fri, 5 Apr 2024 12:02:32 -0700 Subject: [PATCH] Patch to set PARAMETERS_MIN_ALIGNMENT to the native alignment for rocm-opencl (#43444) * For avx build, the start address of values_ buffer in KernelParameters is not a correct as it is computed based on 16-byte alignment. * Style check error fix --- .../repos/builtin/packages/rocm-opencl/package.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/var/spack/repos/builtin/packages/rocm-opencl/package.py b/var/spack/repos/builtin/packages/rocm-opencl/package.py index fbef90f384..1848c183aa 100644 --- a/var/spack/repos/builtin/packages/rocm-opencl/package.py +++ b/var/spack/repos/builtin/packages/rocm-opencl/package.py @@ -82,6 +82,19 @@ def url_for_version(self, version): placement="rocclr", when=f"@{d_version}", ) + # For avx build, the start address of values_ buffer in KernelParameters is not + # correct as it is computed based on 16-byte alignment. + patch( + "https://github.com/ROCm/clr/commit/c4f773db0b4ccbbeed4e3d6c0f6bff299c2aa3f0.patch?full_index=1", + sha256="5bb9b0e08888830ccf3a0a658529fe25f4ee62b5b8890f349bf2cc914236eb2f", + when="@5.7:", + ) + patch( + "https://github.com/ROCm/clr/commit/7868876db742fb4d44483892856a66d2993add03.patch?full_index=1", + sha256="7668b2a710baf4cb063e6b00280fb75c4c3e0511575e8298a9c7ae5143f60b33", + when="@5.7:", + ) + # Patch to set package installation path for OpenCL. patch("0001-fix-build-error-rocm-opencl-5.1.0.patch", when="@5.1")