Skip to content

Commit 71d99ad

Browse files
authored
Metal: Run ExpandReductions pass. (#549)
1 parent a95fd25 commit 71d99ad

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ InteractiveUtils = "1"
1919
Libdl = "1"
2020
Logging = "1"
2121
UUIDs = "1"
22-
LLVM = "6.4"
22+
LLVM = "6.6"
2323
Scratch = "1"
2424
TimerOutputs = "0.5"
2525
julia = "1.8"

src/metal.jl

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,13 @@ function finish_ir!(@nospecialize(job::CompilerJob{MetalCompilerTarget}), mod::L
182182
end
183183
end
184184

185+
# perform codegen passes that would normally run during machine code emission
186+
# XXX: codegen passes don't seem available in the new pass manager yet
187+
@dispose pm=ModulePassManager() begin
188+
expand_reductions!(pm)
189+
run!(pm, mod)
190+
end
191+
185192
return functions(mod)[entry_fn]
186193
end
187194

0 commit comments

Comments
 (0)