Skip to content

Commit e3d9b83

Browse files
committed
Fixed xGEMM dynamic dispatch crash on ST library.
Small gemm implemenation is called from gemmnat path when library is built as multi-threaded small gemm is completely disabled. For single threaded the crash is fixed by disabling small gemm on generic architecture. AMD-Internal: [CPUPL-1930] Change-Id: If718870d89909cef908a1c23918b7ef6f7d80f7a
1 parent c12dbcf commit e3d9b83

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

kernels/zen/3/bli_gemm_small.c

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,19 @@ err_t bli_gemm_small
113113
#ifdef BLIS_ENABLE_MULTITHREADING
114114
AOCL_DTL_TRACE_EXIT(AOCL_DTL_LEVEL_TRACE_7);
115115
return BLIS_NOT_YET_IMPLEMENTED;
116+
#else
117+
// When dynamic dispatch is enabled i.e. library is built for 'amdzen' configuration.
118+
// Invoke architecture specific kernels only if we are sure that we are running on zen,
119+
// zen2 or zen3 otherwise fall back to reference kernels (via framework and context).
120+
arch_t id = bli_arch_query_id();
121+
bool bamdzen = (id == BLIS_ARCH_ZEN3) || (id == BLIS_ARCH_ZEN2) || (id == BLIS_ARCH_ZEN);
122+
123+
if (0 == bamdzen)
124+
{
125+
return BLIS_NOT_YET_IMPLEMENTED;
126+
}
116127
#endif
128+
117129
// If alpha is zero, scale by beta and return.
118130
if (bli_obj_equals(alpha, &BLIS_ZERO))
119131
{

0 commit comments

Comments
 (0)