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

[XLA:GPU] Replace dynamic-slice with slice during autotuning #67160

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

copybara-service[bot]
Copy link

[XLA:GPU] Replace dynamic-slice with slice during autotuning

Dynamic slice requires specific values for the indices that it takes in as operands. However, under computation extraction in the autotuner, all operands are replaced with random parameter values (which then represent incorrect/invalid offsets.) In order to avoid this, we replace dynamic-slice instructions with static slice instructions indexed at 0 along all dimensions.

This CL is needed for a later CL which will add support for fusing dynamic-slice into triton fusions.

The original author of this CL is jvstokes and I rewrote it a bit.

FUTURE_COPYBARA_INTEGRATE_REVIEW=openxla/xla#12161 from jaro-sevcik:serialize-as-stream-executor-executable 818765f7b1f5f7282d3f2756b2a03ac556201a6c

Dynamic slice requires specific values for the indices that it takes in as operands. However, under computation extraction in the autotuner, all operands are replaced with random parameter values (which then represent incorrect/invalid offsets.) In order to avoid this, we replace dynamic-slice instructions with static slice instructions indexed at 0 along all dimensions.

This CL is needed for a later CL which will add support for fusing dynamic-slice into triton fusions.

The original author of this CL is jvstokes and I rewrote it a bit.

FUTURE_COPYBARA_INTEGRATE_REVIEW=openxla/xla#12161 from jaro-sevcik:serialize-as-stream-executor-executable 818765f7b1f5f7282d3f2756b2a03ac556201a6c
PiperOrigin-RevId: 631438546
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.

None yet

1 participant