From 35174a608ad920afe76f51f479376b4c89de7e12 Mon Sep 17 00:00:00 2001 From: Victor Perez Date: Wed, 27 Nov 2024 16:15:26 +0100 Subject: [PATCH 1/3] [XPU] Enable reduction optimization by default Add reduction optimization pass to the pipeline by default. --- third_party/intel/backend/compiler.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/third_party/intel/backend/compiler.py b/third_party/intel/backend/compiler.py index 58ef08a019..ccebf622db 100644 --- a/third_party/intel/backend/compiler.py +++ b/third_party/intel/backend/compiler.py @@ -252,9 +252,7 @@ def make_ttgir(mod, metadata, opt, properties): passes.common.add_cse(pm) passes.ttgpuir.add_prefetch(pm) passes.ttgpuir.add_optimize_dot_operands(pm, True) - if os.getenv("TRITON_INTEL_OPTIMIZE_REDUCTION_LOCALITY", "0") == "1": - intel.passes.ttgpuir.add_optimize_reduction_locality(pm) - intel.passes.ttgpuir.add_optimize_elementwise_parallelism(pm) + intel.passes.ttgpuir.add_optimize_reduction_locality(pm) intel.passes.ttgpuir.add_remove_layout_conversions(pm) intel.passes.ttgpuir.add_reduce_data_duplication(pm) passes.ttgpuir.add_reorder_instructions(pm) From 7d84faededf4e1d4bcf350882ed2e4f447b73166 Mon Sep 17 00:00:00 2001 From: Victor Perez Date: Wed, 27 Nov 2024 16:35:26 +0100 Subject: [PATCH 2/3] Add flag --- .github/workflows/triton-benchmarks.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/triton-benchmarks.yml b/.github/workflows/triton-benchmarks.yml index 29792b6af3..0d631fd8b0 100644 --- a/.github/workflows/triton-benchmarks.yml +++ b/.github/workflows/triton-benchmarks.yml @@ -255,7 +255,7 @@ jobs: cd benchmarks/triton_kernels_benchmark TRITON_INTEL_ADVANCED_PATH=0 \ TRITON_INTEL_ENABLE_ADDRESS_PAYLOAD_OPT=1 \ - IGC_VISAOptions=" -enableBCR" \ + IGC_EnableVector8LoadStore=1 IGC_VISAOptions=" -enableBCR" \ python flash_attention_fwd_benchmark.py --reports $REPORTS TAG="${TAG}-dflt" From 13a17dfd9a3e820c793b2b42b55ed5871189bbfc Mon Sep 17 00:00:00 2001 From: Victor Perez Date: Wed, 27 Nov 2024 17:35:11 +0100 Subject: [PATCH 3/3] Update triton-benchmarks.yml --- .github/workflows/triton-benchmarks.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/triton-benchmarks.yml b/.github/workflows/triton-benchmarks.yml index 0d631fd8b0..29792b6af3 100644 --- a/.github/workflows/triton-benchmarks.yml +++ b/.github/workflows/triton-benchmarks.yml @@ -255,7 +255,7 @@ jobs: cd benchmarks/triton_kernels_benchmark TRITON_INTEL_ADVANCED_PATH=0 \ TRITON_INTEL_ENABLE_ADDRESS_PAYLOAD_OPT=1 \ - IGC_EnableVector8LoadStore=1 IGC_VISAOptions=" -enableBCR" \ + IGC_VISAOptions=" -enableBCR" \ python flash_attention_fwd_benchmark.py --reports $REPORTS TAG="${TAG}-dflt"