Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[XPU][OptRed] Revamp -tritonintelgpu-optimize-reduction-locality #2800

Merged
merged 1 commit into from
Nov 27, 2024

Conversation

victor-eds
Copy link
Contributor

Original implementation had two critical issues:

  • Functional: It did not preserve register order, so it was computing a different reduction.
  • Performance: When converting back to the original tensor type, it did: reshape(convert_layout(res)). That means the reshape operation served as an anchor and the suboptimal slice layout was propagated.

This was fixed as follows:

  • Keep register order.
  • Do convert_layout(reshape(res)) when converting back to the original type, thus propagating the more optimal layout.

See implementation for further details.

Closes #2752

Original implementation had two critical issues:

- *Functional*: It did not preserve register order, so it was computing
  a different reduction.
- *Performance*: When converting back to the original tensor type, it did:
  `reshape(convert_layout(res))`. That means the `reshape` operation served
  as an anchor and the suboptimal slice layout was propagated.

This was fixed as follows:

- Keep register order.
- Do `convert_layout(reshape(res))` when converting back to the original type,
  thus propagating the more optimal layout.

See implementation for further details.

Signed-off-by: victor-eds <[email protected]>
@victor-eds victor-eds self-assigned this Nov 22, 2024
@victor-eds victor-eds merged commit ee78046 into intel:main Nov 27, 2024
5 checks passed
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.

Revamp -tritonintelgpu-optimize-reduction-locality
2 participants