Unverified Commit ff9573c4 authored by Ilia Taraban's avatar Ilia Taraban Committed by GitHub
Browse files

[Misc] Disable BF16 LibXSMM SpMM for AVX2 platforms (#5677)

parent e0d2250e
......@@ -141,9 +141,11 @@ void SpMMSumCsr(
}
#if !defined(_WIN32)
#ifdef USE_LIBXSMM
const bool no_libxsmm = bcast.use_bcast ||
std::is_same<DType, double>::value ||
!dgl::runtime::Config::Global()->IsLibxsmmAvailable();
int cpu_id = libxsmm_cpuid_x86();
const bool no_libxsmm =
bcast.use_bcast || std::is_same<DType, double>::value ||
(std::is_same<DType, BFloat16>::value && cpu_id < LIBXSMM_X86_AVX512) ||
!dgl::runtime::Config::Global()->IsLibxsmmAvailable();
if (!no_libxsmm) {
SpMMSumCsrLibxsmm<IdType, DType, Op>(bcast, csr, ufeat, efeat, out);
} else {
......@@ -264,10 +266,11 @@ void SpMMCmpCsr(
}
#if !defined(_WIN32)
#ifdef USE_LIBXSMM
const bool no_libxsmm = bcast.use_bcast ||
std::is_same<DType, double>::value ||
!dgl::runtime::Config::Global()->IsLibxsmmAvailable();
int cpu_id = libxsmm_cpuid_x86();
const bool no_libxsmm =
bcast.use_bcast || std::is_same<DType, double>::value ||
(std::is_same<DType, BFloat16>::value && cpu_id < LIBXSMM_X86_AVX512) ||
!dgl::runtime::Config::Global()->IsLibxsmmAvailable();
if (!no_libxsmm) {
SpMMCmpCsrLibxsmm<IdType, DType, Op, Cmp>(
bcast, csr, ufeat, efeat, out, argu, arge);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment