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

add decomposes to model to fxgraph #32

Merged
merged 1 commit into from
May 24, 2023

Conversation

ljfitz
Copy link
Collaborator

@ljfitz ljfitz commented May 24, 2023

From sources of failed to legalize operation 'torch.constant.int'

  • torch.ops.aten.cumsum

With the first commit python ./model.py --fxtype tosa --modeltype bf16 --checkpoint xlm-roberta-base --modelname XLMRobertaModel then fails with:

error: "<eval_with_key>.2":23:20: unsupported by backend contract: Unimplemented operator 'aten.scalar_tensor'
note: "<eval_with_key>.2":23:20: see current operation: %246 = "torch.operator"(%0, %3, %0, %221, %4) {name = "aten.scalar_tensor"} : (!torch.int, !torch.int, !torch.int, !torch.Device, !torch.none) -> !torch.tensor

@ljfitz ljfitz requested a review from mgehre-amd May 24, 2023 17:09
@mgehre-amd mgehre-amd merged commit 8ee469e into mgehre.repro May 24, 2023
@mgehre-amd mgehre-amd deleted the ljfitz.add_decomposes_to_model_to_fxgraph branch May 24, 2023 17:20
mgehre-amd added a commit that referenced this pull request May 25, 2023
* Add reproduce() function

* Also reproduce issues that just happen in tosa->linalg

* Use make_fx with decomposition of torch.ops.aten.cumsum (#32)

* Update python/torch_mlir/compiler_utils.py

Co-authored-by: Liam Fitzpatrick <[email protected]>

* Update python/torch_mlir/repro.py

Co-authored-by: Liam Fitzpatrick <[email protected]>

---------

Co-authored-by: Liam Fitzpatrick <[email protected]>
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.

2 participants