Gentoo Archives: gentoo-commits

From: Andrew Ammerlaan <andrewammerlaan@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sci-libs/rocBLAS/, sci-libs/rocBLAS/files/
Date: Sat, 05 Mar 2022 20:52:04
Message-Id: 1646513509.762901be036f623bb386f27cb8f586178cf81c42.andrewammerlaan@gentoo
1 commit: 762901be036f623bb386f27cb8f586178cf81c42
2 Author: YiyangWu <xgreenlandforwyy <AT> gmail <DOT> com>
3 AuthorDate: Tue Dec 21 03:48:53 2021 +0000
4 Commit: Andrew Ammerlaan <andrewammerlaan <AT> gentoo <DOT> org>
5 CommitDate: Sat Mar 5 20:51:49 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=762901be
7
8 sci-libs/rocBLAS: fix tests using openblas as cpu reference
9
10 Add a patch that classify 6 test suites as known_bug.
11 Upstream will fix this issue in future releases,
12 and they recommand this as solution for current version.
13
14 Closes: https://github.com/ROCmSoftwarePlatform/rocBLAS/issues/1202
15 Package-Manager: Portage-3.0.22, Repoman-3.0.3
16 Signed-off-by: Yiyang Wu <xgreenlandforwyy <AT> gmail.com>
17 Signed-off-by: Andrew Ammerlaan <andrewammerlaan <AT> gentoo.org>
18
19 ...BLAS-4.3.0-remove-problematic-test-suites.patch | 22 ++++++++++++++++++++++
20 sci-libs/rocBLAS/rocBLAS-4.3.0.ebuild | 3 ++-
21 2 files changed, 24 insertions(+), 1 deletion(-)
22
23 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
24 new file mode 100644
25 index 000000000000..4265e999f322
26 --- /dev/null
27 +++ b/sci-libs/rocBLAS/files/rocBLAS-4.3.0-remove-problematic-test-suites.patch
28 @@ -0,0 +1,22 @@
29 +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.
30 +
31 +https://github.com/ROCmSoftwarePlatform/rocBLAS/issues/1202
32 +--- orig/clients/gtest/known_bugs.yaml
33 ++++ rocBLAS-rocm-4.3.0/clients/gtest/known_bugs.yaml
34 +@@ -7,6 +7,16 @@ Known bugs:
35 + - { 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" }
36 + - { 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" }
37 + - { 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" }
38 ++# gemv openblas reference differences due to summation order dependent roundoff accumulation with large M float complex
39 ++# 8th significant digit difference vs CPU on single precision float math, leads to expected equality test failure
40 ++# code needs to be changed to a tolerance test or reduce M for float complex type if using equality vs. CPU reference
41 ++- { function: gemv, a_type: f32_c, transA: T, M: 131071 }
42 ++- { function: gemv, a_type: f32_c, transA: C, M: 131071 }
43 ++- { function: gemv_batched, a_type: f32_c, transA: T, M: 131071 }
44 ++- { function: gemv_batched, a_type: f32_c, transA: C, M: 131071 }
45 ++- { function: gemv_strided_batched, a_type: f32_c, transA: T, M: 131071 }
46 ++- { function: gemv_strided_batched, a_type: f32_c, transA: C, M: 131071 }
47 ++
48 +
49 + #- { 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 }
50 + #- { 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 }
51
52 diff --git a/sci-libs/rocBLAS/rocBLAS-4.3.0.ebuild b/sci-libs/rocBLAS/rocBLAS-4.3.0.ebuild
53 index f682328b782c..82b9207bdb09 100644
54 --- a/sci-libs/rocBLAS/rocBLAS-4.3.0.ebuild
55 +++ b/sci-libs/rocBLAS/rocBLAS-4.3.0.ebuild
56 @@ -46,7 +46,8 @@ S="${WORKDIR}"/${PN}-rocm-${PV}
57
58 PATCHES=("${FILESDIR}"/${PN}-4.3.0-fix-glibc-2.32-and-above.patch
59 "${FILESDIR}"/${PN}-4.3.0-change-default-Tensile-library-dir.patch
60 - "${FILESDIR}"/${PN}-4.3.0-link-system-blas.patch )
61 + "${FILESDIR}"/${PN}-4.3.0-link-system-blas.patch
62 + "${FILESDIR}"/${PN}-4.3.0-remove-problematic-test-suites.patch )
63
64 src_prepare() {
65 eapply_user