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

Aten_LocalScalarDense conversion to linalg #2925

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

Max191
Copy link
Contributor

@Max191 Max191 commented Feb 19, 2024

This is added as a ConvertAtenTensorToScalarLikeOp conversion in torch to linalg, lowering into a tensor.extract.

@Max191
Copy link
Contributor Author

Max191 commented Feb 19, 2024

I'm not sure how to create an e2e test for this that will actually generate an aten._local_scalar_dense operation. Is there a torch function I can use in a test that will generate this? (item() does not seem to work).

@rsuderman
Copy link
Contributor

Please add a test to the torch test suite

Copy link
Contributor

@rsuderman rsuderman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks fine however having a test would give me a better idea if it works

@Max191
Copy link
Contributor Author

Max191 commented Feb 23, 2024

Looks fine however having a test would give me a better idea if it works

I tried to add a test, but it didn't seem to generate the _local_scalar_dense op. Do you know what torch op would generate this when we export it? When I ran into the op it was generated by item(), but I couldn't get that to generate the right op in my test.

@rsuderman
Copy link
Contributor

calar_dense op. Do you know what torch op would generate this when we export it? When I ran into the op it was generated by

Having trouble generating the test. Seems like it depends on tracing. I'll stamp as it does not seem worth the additional hassle.

@rsuderman rsuderman self-requested a review February 23, 2024 21:43
@Max191 Max191 force-pushed the torch_aten_local_scalar_dense_support branch from a58e6f0 to 2232780 Compare February 23, 2024 22:05
@Max191
Copy link
Contributor Author

Max191 commented Feb 23, 2024

rebased

@Max191 Max191 enabled auto-merge (squash) February 23, 2024 22:06
@Max191
Copy link
Contributor Author

Max191 commented Feb 26, 2024

@rsuderman I don't understand the build failure here, and I'm unable to reproduce it on my machine. Do you know what the failure is?

@Max191 Max191 disabled auto-merge February 26, 2024 16:32
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