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

Enable unbounded dynamism on conv, softmax, addmm, slice #6494

Merged
merged 9 commits into from
Mar 12, 2024

Conversation

lsy323
Copy link
Collaborator

@lsy323 lsy323 commented Feb 7, 2024

Support to lowering with unbounded dynamic shape input:

  • Conv: broadcast bias by mhlo.dynamic_broadcast_in_dim
  • Softmax: broadcast reduced logits by mhlo.dynamic_broadcast_in_dim
  • addmm: broadcast bias by mhlo.dynamic_broadcast_in_dim
  • slice: Use mhlo.real_dynamic_slice when input shape is dynamic

Test:

  • Pass dynamic_shapes instead of constraints to torch.export
  • Verifying numerical result by inferencing the exported saved model in TF.

@lsy323 lsy323 force-pushed the lsiyuan/dynamic-conv branch 3 times, most recently from ac4bd78 to 9821072 Compare February 29, 2024 03:18
@lsy323 lsy323 changed the title Enable unbounded dynamism on conv, softmax, addmm Enable unbounded dynamism on conv, softmax, addmm, slice Feb 29, 2024
@lsy323 lsy323 marked this pull request as ready for review February 29, 2024 22:38
@lsy323 lsy323 requested review from qihqi and sdasgup3 February 29, 2024 22:38
@lsy323 lsy323 force-pushed the lsiyuan/dynamic-conv branch from 1efc5c1 to d439dae Compare February 29, 2024 23:11
Siyuan Liu added 8 commits March 5, 2024 04:39
format

fix comment for skipped tests

cover mul

(cherry picked from commit f55abc88ae361e89da675a1aa1e4a19e7a5c762a)

cover mul

(cherry picked from commit 30abe2be43defc25db8954c525d34f7f3de35292)

add missing tests to ci scripts

yapf

fix scalar type

(cherry picked from commit 8526b2091ffafccf6972ecba3c111d1b0869621e)

disable addmm test

disable mark pattern api in gh ci, due to tf dep

enable conv dynamism

support addmm

enable softmax dynamism

update comment for slice

add slice support, need converter change
@lsy323 lsy323 force-pushed the lsiyuan/dynamic-conv branch from d439dae to 5aa729c Compare March 5, 2024 04:39
torch_xla/stablehlo.py Outdated Show resolved Hide resolved
@lsy323 lsy323 merged commit 97acc14 into master Mar 12, 2024
17 of 18 checks passed
@lsy323 lsy323 deleted the lsiyuan/dynamic-conv branch March 12, 2024 05:47
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.

3 participants