Skip to content

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 requested review from a team, chengjunlu and whitneywhtsang November 22, 2024 14:43
@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