Skip to content

Conversation

@victor-eds
Copy link
Contributor

Add reduction optimization pass to the pipeline by default.

Add reduction optimization pass to the pipeline by default.
@victor-eds victor-eds self-assigned this Nov 27, 2024
@victor-eds
Copy link
Contributor Author

Performance gains can be seen under vicenableredopt tag.

@chengjunlu I'd say we go with this for now. You can disable it when doing your current work. This is giving performance now and having this would make testing the followups we have in mind easier. WDYT?

@victor-eds victor-eds marked this pull request as ready for review November 27, 2024 16:35
@victor-eds
Copy link
Contributor Author

Looks like the wide vector flag is giving some better performance, but this is noticeable enough. Just a minor bump from that flag.

@victor-eds
Copy link
Contributor Author

#2748

@victor-eds victor-eds linked an issue Nov 28, 2024 that may be closed by this pull request
@chengjunlu
Copy link
Contributor

Performance gains can be seen under vicenableredopt tag.

@chengjunlu I'd say we go with this for now. You can disable it when doing your current work. This is giving performance now and having this would make testing the followups we have in mind easier. WDYT?

LGTM.

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)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we use if os.getenv("TRITON_INTEL_OPTIMIZE_REDUCTION_LOCALITY", "1") == "1": to allow the user to disable it?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Of course. I'll add that when I finish the investigation

@whitneywhtsang
Copy link
Contributor

From https://github.com/intel/intel-xpu-backend-for-triton/actions/runs/12061551469, it appears that the reduction optimization has a negative geomean impact to FA (causal=false, dhead=64) with the new IGC driver (improved instruction scheduling). Can we investigate it further before enabling it by default?

@victor-eds
Copy link
Contributor Author

From https://github.com/intel/intel-xpu-backend-for-triton/actions/runs/12061551469, it appears that the reduction optimization has a negative geomean impact to FA (causal=false, dhead=64) with the new IGC driver (improved instruction scheduling). Can we investigate it further before enabling it by default?

Yes! I can look into that.

@victor-eds victor-eds marked this pull request as draft November 28, 2024 09:22
@victor-eds
Copy link
Contributor Author

Waiting till regressions are fixed. #2907 is the best attempt we have currently.

@victor-eds victor-eds removed their assignment Feb 8, 2025
@vlad-penkin
Copy link
Contributor

@sommerlukas can we close this draft PR?

@sommerlukas
Copy link
Contributor

@sommerlukas can we close this draft PR?

I think as the performance results were a bit mixed, we agreed with @etiotto and @whitneywhtsang to not enable this by default for now. Closing the PR.

@sommerlukas sommerlukas closed this Mar 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Enable -tritonintelgpu-optimize-reduction-locality by default

7 participants