commit:     762901be036f623bb386f27cb8f586178cf81c42
Author:     YiyangWu <xgreenlandforwyy <AT> gmail <DOT> com>
AuthorDate: Tue Dec 21 03:48:53 2021 +0000
Commit:     Andrew Ammerlaan <andrewammerlaan <AT> gentoo <DOT> org>
CommitDate: Sat Mar  5 20:51:49 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=762901be

sci-libs/rocBLAS: fix tests using openblas as cpu reference

Add a patch that classify 6 test suites as known_bug.
Upstream will fix this issue in future releases,
and they recommand this as solution for current version.

Closes: https://github.com/ROCmSoftwarePlatform/rocBLAS/issues/1202
Package-Manager: Portage-3.0.22, Repoman-3.0.3
Signed-off-by: Yiyang Wu <xgreenlandforwyy <AT> gmail.com>
Signed-off-by: Andrew Ammerlaan <andrewammerlaan <AT> gentoo.org>

 ...BLAS-4.3.0-remove-problematic-test-suites.patch | 22 ++++++++++++++++++++++
 sci-libs/rocBLAS/rocBLAS-4.3.0.ebuild              |  3 ++-
 2 files changed, 24 insertions(+), 1 deletion(-)

diff --git 
a/sci-libs/rocBLAS/files/rocBLAS-4.3.0-remove-problematic-test-suites.patch 
b/sci-libs/rocBLAS/files/rocBLAS-4.3.0-remove-problematic-test-suites.patch
new file mode 100644
index 000000000000..4265e999f322
--- /dev/null
+++ b/sci-libs/rocBLAS/files/rocBLAS-4.3.0-remove-problematic-test-suites.patch
@@ -0,0 +1,22 @@
+Those tests will fail comparing rocblas vs openblas, because the testing 
program is so strict that it cannot tolerate the numerical differences which is 
actually OK.
+
+https://github.com/ROCmSoftwarePlatform/rocBLAS/issues/1202
+--- orig/clients/gtest/known_bugs.yaml
++++ rocBLAS-rocm-4.3.0/clients/gtest/known_bugs.yaml
+@@ -7,6 +7,16 @@ Known bugs:
+ - { function: gemm_ex, a_type: i8_r, b_type: i8_r, c_type: i32_r, d_type: 
i32_r, compute_type: i32_r, flags: 0, known_bug_platforms: 
"gfx900,gfx906,gfx1010,gfx1011,gfx1012,gfx1030" }
+ - { function: gemm_batched_ex, a_type: i8_r, b_type: i8_r, c_type: i32_r, 
d_type: i32_r, compute_type: i32_r, flags: 0, known_bug_platforms: 
"gfx900,gfx906,gfx90a,gfx1010,gfx1011,gfx1012,gfx1030" }
+ - { function: gemm_strided_batched_ex, a_type: i8_r, b_type: i8_r, c_type: 
i32_r, d_type: i32_r, compute_type: i32_r, flags: 0, known_bug_platforms: 
"gfx900,gfx906,gfx1010,gfx1011,gfx1012,gfx1030" }
++# gemv openblas reference differences due to summation order dependent 
roundoff accumulation with large M float complex
++# 8th significant digit difference vs CPU on single precision float math, 
leads to expected equality test failure
++# code needs to be changed to a tolerance test or reduce M for float complex 
type if using equality vs. CPU reference
++- { function: gemv, a_type: f32_c, transA: T, M: 131071 }
++- { function: gemv, a_type: f32_c, transA: C, M: 131071 }
++- { function: gemv_batched, a_type: f32_c, transA: T, M: 131071 }
++- { function: gemv_batched, a_type: f32_c, transA: C, M: 131071 }
++- { function: gemv_strided_batched, a_type: f32_c, transA: T, M: 131071 }
++- { function: gemv_strided_batched, a_type: f32_c, transA: C, M: 131071 }
++
+ 
+ #- { function: gemm_ex, a_type: bf16_r, b_type: bf16_r, c_type: bf16_r, 
d_type: bf16_r, compute_type: f32_r, transA: C, transB: N, M: 512, N: 512, K: 
512, lda: 512, ldb: 512, ldc: 512, ldd: 512, alpha: 5.0, alphai: 0.0, beta: 
0.0, betai: 0.0, known_bug_platforms: gfx908 }
+ #- { function: gemm_ex, a_type: bf16_r, b_type: bf16_r, c_type: bf16_r, 
d_type: bf16_r, compute_type: f32_r, transA: C, transB: N, M: 512, N: 512, K: 
512, lda: 512, ldb: 512, ldc: 512, ldd: 512, alpha: 0.0, alphai: 0.0, beta: 
3.0, betai: 0.0, known_bug_platforms: gfx908 }

diff --git a/sci-libs/rocBLAS/rocBLAS-4.3.0.ebuild 
b/sci-libs/rocBLAS/rocBLAS-4.3.0.ebuild
index f682328b782c..82b9207bdb09 100644
--- a/sci-libs/rocBLAS/rocBLAS-4.3.0.ebuild
+++ b/sci-libs/rocBLAS/rocBLAS-4.3.0.ebuild
@@ -46,7 +46,8 @@ S="${WORKDIR}"/${PN}-rocm-${PV}
 
 PATCHES=("${FILESDIR}"/${PN}-4.3.0-fix-glibc-2.32-and-above.patch
        "${FILESDIR}"/${PN}-4.3.0-change-default-Tensile-library-dir.patch
-       "${FILESDIR}"/${PN}-4.3.0-link-system-blas.patch )
+       "${FILESDIR}"/${PN}-4.3.0-link-system-blas.patch 
+       "${FILESDIR}"/${PN}-4.3.0-remove-problematic-test-suites.patch )
 
 src_prepare() {
        eapply_user

Reply via email to