Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Permute the pass pipeline to coalesce before setting up the matmul
Browse files Browse the repository at this point in the history
alexbaden committed Dec 6, 2024
1 parent 281cfd0 commit f11732c
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions third_party/intel/backend/compiler.py
Original file line number Diff line number Diff line change
@@ -239,15 +239,17 @@ def make_ttgir(mod, metadata, opt, properties):
return XPUBackend.AdvancedPath.make_ttgir(mod, metadata, opt)

passes.ttir.add_convert_to_ttgpuir(pm, "xpu", opt.num_warps, opt.threads_per_warp, opt.num_ctas)
# optimize TTGIR
intel.passes.ttgpuir.add_coalesce(pm)
intel.passes.ttgpuir.add_remove_layout_conversions(pm)

intel.passes.ttgpuir.add_accelerate_matmul(pm)
intel.passes.ttgpuir.add_remove_layout_conversions(pm)
intel.passes.ttgpuir.add_materialize_block_pointer(pm)
if os.getenv("TRITON_INTEL_REWRITE_TENSOR_POINTER", "0") == "1":
intel.passes.ttgpuir.add_rewrite_tensor_pointer(pm)
intel.passes.ttgpuir.add_pipeline(pm, opt.num_stages, False)

intel.passes.ttgpuir.add_coalesce(pm)
intel.passes.ttgpuir.add_remove_layout_conversions(pm)
passes.ttgpuir.add_optimize_thread_locality(pm)
passes.ttgpuir.add_optimize_dot_operands(pm, True)
passes.common.add_cse(pm)

0 comments on commit f11732c

Please sign in to comment.