Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
dgl
Commits
ff9573c4
"...git@developer.sourcefind.cn:renzhc/diffusers_dcu.git" did not exist on "61dc657461130997d3a45929953c122419ee892e"
Unverified
Commit
ff9573c4
authored
May 10, 2023
by
Ilia Taraban
Committed by
GitHub
May 10, 2023
Browse files
[Misc] Disable BF16 LibXSMM SpMM for AVX2 platforms (#5677)
parent
e0d2250e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
7 deletions
+10
-7
src/array/cpu/spmm.h
src/array/cpu/spmm.h
+10
-7
No files found.
src/array/cpu/spmm.h
View file @
ff9573c4
...
@@ -141,9 +141,11 @@ void SpMMSumCsr(
...
@@ -141,9 +141,11 @@ void SpMMSumCsr(
}
}
#if !defined(_WIN32)
#if !defined(_WIN32)
#ifdef USE_LIBXSMM
#ifdef USE_LIBXSMM
const
bool
no_libxsmm
=
bcast
.
use_bcast
||
int
cpu_id
=
libxsmm_cpuid_x86
();
std
::
is_same
<
DType
,
double
>::
value
||
const
bool
no_libxsmm
=
!
dgl
::
runtime
::
Config
::
Global
()
->
IsLibxsmmAvailable
();
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
)
{
if
(
!
no_libxsmm
)
{
SpMMSumCsrLibxsmm
<
IdType
,
DType
,
Op
>
(
bcast
,
csr
,
ufeat
,
efeat
,
out
);
SpMMSumCsrLibxsmm
<
IdType
,
DType
,
Op
>
(
bcast
,
csr
,
ufeat
,
efeat
,
out
);
}
else
{
}
else
{
...
@@ -264,10 +266,11 @@ void SpMMCmpCsr(
...
@@ -264,10 +266,11 @@ void SpMMCmpCsr(
}
}
#if !defined(_WIN32)
#if !defined(_WIN32)
#ifdef USE_LIBXSMM
#ifdef USE_LIBXSMM
int
cpu_id
=
libxsmm_cpuid_x86
();
const
bool
no_libxsmm
=
bcast
.
use_bcast
||
const
bool
no_libxsmm
=
std
::
is_same
<
DType
,
double
>::
value
||
bcast
.
use_bcast
||
std
::
is_same
<
DType
,
double
>::
value
||
!
dgl
::
runtime
::
Config
::
Global
()
->
IsLibxsmmAvailable
();
(
std
::
is_same
<
DType
,
BFloat16
>::
value
&&
cpu_id
<
LIBXSMM_X86_AVX512
)
||
!
dgl
::
runtime
::
Config
::
Global
()
->
IsLibxsmmAvailable
();
if
(
!
no_libxsmm
)
{
if
(
!
no_libxsmm
)
{
SpMMCmpCsrLibxsmm
<
IdType
,
DType
,
Op
,
Cmp
>
(
SpMMCmpCsrLibxsmm
<
IdType
,
DType
,
Op
,
Cmp
>
(
bcast
,
csr
,
ufeat
,
efeat
,
out
,
argu
,
arge
);
bcast
,
csr
,
ufeat
,
efeat
,
out
,
argu
,
arge
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment