-
Notifications
You must be signed in to change notification settings - Fork 506
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
[TorchToLinalg]Lower torch.gcd to linalg and scf #3732
base: main
Are you sure you want to change the base?
[TorchToLinalg]Lower torch.gcd to linalg and scf #3732
Conversation
7673a8f
to
0815cd1
Compare
force push: added math::cttz instead of counting trailing zeros manually |
projects/pt1/python/torch_mlir_e2e_test/test_suite/elementwise.py
Outdated
Show resolved
Hide resolved
Add verify() method to check if tensors are of integer type. Also check if tensors are of same shape, or if the second tensor is a single element tensor. Add e2e tests. Put them into onnx and stablehlo xfailed sets.
0815cd1
to
53b1ec3
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @bratislavSyrmia, I would like you to explore a non-loop path for this lowering, since these kind of lowerings usually causes issues in the downstream pipeline especially the code-generation part.
@vivekkhandelwal1 out of curiosity, do you have an algorithm/solution in mind? The best I could think of was to use |
Hi @IanWood1, I did not spend time on thinking about it that's why I asked @bratislavSyrmia to explore the possibility of any such solution. But if there exists a solution based on |
I have thought about it but I have no idea how I would find the greatest common divisor between two numbers without using loops |
Add verify() method to check if tensors are of
integer type. Also check if tensors are of same shape, or if the second tensor is a single element tensor.
Add e2e tests. Put them into onnx and stablehlo
xfailed sets.