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

Implement lowering of torch.aten.renorm #3388

Merged
merged 6 commits into from
Jun 17, 2024

Conversation

BaneTrifa
Copy link
Contributor

@BaneTrifa BaneTrifa force-pushed the torch-aten-renorm branch 3 times, most recently from 3b8c9ef to 51d098a Compare May 29, 2024 19:45
Copy link
Collaborator

@zjgarvey zjgarvey left a comment

Choose a reason for hiding this comment

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

Hey, thanks for the PR!

lib/Dialect/Torch/Transforms/DecomposeComplexOps.cpp Outdated Show resolved Hide resolved
lib/Dialect/Torch/Transforms/DecomposeComplexOps.cpp Outdated Show resolved Hide resolved
lib/Dialect/Torch/Transforms/DecomposeComplexOps.cpp Outdated Show resolved Hide resolved
lib/Dialect/Torch/Transforms/DecomposeComplexOps.cpp Outdated Show resolved Hide resolved
lib/Dialect/Torch/IR/TorchOps.cpp Outdated Show resolved Hide resolved
lib/Dialect/Torch/IR/TorchOps.cpp Outdated Show resolved Hide resolved
lib/Dialect/Torch/IR/TorchOps.cpp Show resolved Hide resolved
@BaneTrifa BaneTrifa force-pushed the torch-aten-renorm branch 2 times, most recently from 2838f84 to a319a8f Compare June 3, 2024 21:45
@BaneTrifa BaneTrifa requested a review from zjgarvey June 14, 2024 16:25
Copy link
Collaborator

@zjgarvey zjgarvey left a comment

Choose a reason for hiding this comment

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

This looks good to me.

Before merging, it might be good to get someone's opinion about adding verifiers, since I haven't seen one added in torch-mlir before (perhaps since any torch code which would result in a violation likely throws an error when importing in the first place).

Copy link
Collaborator

@ramiro050 ramiro050 left a comment

Choose a reason for hiding this comment

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

Thanks for this! Below is a review of the verifier

lib/Dialect/Torch/IR/TorchOps.cpp Outdated Show resolved Hide resolved
lib/Dialect/Torch/IR/TorchOps.cpp Outdated Show resolved Hide resolved
lib/Dialect/Torch/IR/TorchOps.cpp Outdated Show resolved Hide resolved
@BaneTrifa BaneTrifa force-pushed the torch-aten-renorm branch 2 times, most recently from 7aacd9b to 3af823c Compare June 15, 2024 00:33
@BaneTrifa BaneTrifa requested a review from ramiro050 June 15, 2024 00:34
Copy link
Collaborator

@ramiro050 ramiro050 left a comment

Choose a reason for hiding this comment

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

LGTM!

@ramiro050 ramiro050 merged commit 676fa8c into llvm:main Jun 17, 2024
3 checks passed
// Arragne reduce_dims tensor (vector), [0, 1, ... , dim-1, dim+1, ... ,
// ndim-1]
llvm::SmallVector<Value> reduceDimsVector;
for (u_int64_t i = 0; i < ndim; i++) {
Copy link
Member

Choose a reason for hiding this comment

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

This does not build on MSVC. The portable type name (also used in other parts of this file) is uint64_t.

torch-mlir\lib\Dialect\Torch\Transforms\DecomposeComplexOps.cpp(2420): error C2065: 'u_int64_t': undeclared identifier

Sent a fix: #3519

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.

torch.aten.renorm
4 participants