Skip to content

Commit 20fae7d

Browse files
committed
Add comment explaining why use OptimizationLevel0
1 parent 9ca2b24 commit 20fae7d

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

lib/mpsgraphs/matmul.jl

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
1-
1+
#=
2+
Creates a default MPSGraphExecutionDescriptor with a MPSGraphCompilationDescriptor
3+
set to use optimization level 0 instead of 1. This is because level 1 causes operations
4+
on eltypes <= 16 bytes to be executed on the ANE instead of the GPU, leading to worse
5+
performance and hangs when the matrices are too big
6+
=#
27
@static if isdefined(Base, :OncePerProcess) # VERSION >= v"1.12.0-DEV.1421"
38
const default_exec_desc = OncePerProcess{MPSGraphExecutionDescriptor}() do
49
compDesc = MPSGraphCompilationDescriptor()

0 commit comments

Comments
 (0)