Skip to content

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

Merged
lsy323 merged 9 commits intomasterfrom
lsiyuan/dynamic-conv
Mar 12, 2024
Merged

Enable unbounded dynamism on conv, softmax, addmm, slice#6494
lsy323 merged 9 commits intomasterfrom
lsiyuan/dynamic-conv

Conversation

@lsy323
Copy link
Copy Markdown
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
Comment thread torch_xla/stablehlo.py Outdated
@lsy323 lsy323 merged commit 97acc14 into master Mar 12, 2024
@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