E526 [AOTInductor] Codegen fix by Dinesh-Mareedu · Pull Request #148664 · pytorch/pytorch · GitHub
[go: up one dir, main page]

Skip to content

Conversation

@Dinesh-Mareedu
Copy link
@Dinesh-Mareedu Dinesh-Mareedu commented Mar 6, 2025

-- Added CPP Codegen support for the List[Optional[Tensor]] data type during function argument conversion from Python, as the existing codegen did not support it.
-- Modified std::vector to c10::ArrayRef to solve below runtime issues due to signature mismatch.

Error Message:
correct signature: std::vector<at::Tensor, std::allocatorat::Tensor > (c10::ArrayRefat::Tensor, c10::ArrayRefat::Tensor, c10::ArrayRef, c10::ArrayRef, c10::ArrayRef, c10::ArrayRef, std::string) accessed/called as: std::vector<at::Tensor, std::allocatorat::Tensor > (std::vector<at::Tensor, std::allocatorat::Tensor >, std::vector<at::Tensor, std::allocatorat::Tensor >, std::vector<double, std::allocator >, std::vector<double, std::allocator >, std::vector<long, std::allocator >, std::vector<long, std::allocator >, std::string)

Function signature:
std::vectorat::Tensor zentorch_function(at::TensorList self, at::TensorList inputs,
at::TensorList weights, at::ArrayRef betas,
at::ArrayRef alphas, at::IntArrayRef fuse,
at::IntArrayRef name)
std::string zentorch_op_name

cc @voznesenskym @penguinwu @EikanWang @jgong5 @Guobing-Chen @XiaobingSuper @zhuhaozhe @blzheng @wenzhe-nrv @jiayisunx @ipiszy @yf225 @chenyang78 @kadeng @muchulee8 @amjames @chauhang @aakhundov

-- Added CPP Codegen support for the List[Optional[Tensor]] data type during function argument conversion from Python, as the existing codegen did not support it.
-- Modified std::vector to c10::ArrayRef to solve below runtime issues due to signature mismatch.

Error Message:
correct signature: std::vector<at::Tensor, std::allocatorat::Tensor > (c10::ArrayRefat::Tensor, c10::ArrayRefat::Tensor, c10::ArrayRef<double>, c10::ArrayRef<double>, c10::ArrayRef<long>, c10::ArrayRef<long>, std::string)
accessed/called as: std::vector<at::Tensor, std::allocatorat::Tensor > (std::vector<at::Tensor, std::allocatorat::Tensor >, std::vector<at::Tensor, std::allocatorat::Tensor >, std::vector<double, std::allocator<double> >, std::vector<double, std::allocator<double> >, std::vector<long, std::allocator<long> >, std::vector<long, std::allocator<long> >, std::string)

Function signature:
std::vector<at::Tensor> zentorch_function(at::TensorList self, at::TensorList inputs,
                         at::TensorList weights, at::ArrayRef<double> betas,
                         at::ArrayRef<double> alphas, at::IntArrayRef fuse,
                         at::IntArrayRef name)
                         std::string zentorch_op_name

Signed-off-by: Dinesh-Mareedu <dmareedu@amd.com>
@pytorch-bot
Copy link
pytorch-bot bot commented Mar 6, 2025

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/148664

Note: Links to docs will display an error until the docs builds have been completed.

❌ 1 New Failure

As of commit 41c3ff8 with merge base 79aa174 (image):

NEW FAILURE - The following job has failed:

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@linux-foundation-easycla
Copy link
linux-foundation-easycla bot commented Mar 6, 2025

CLA Signed

The committers listed above are authorized under a signed CLA.

  • ✅ login: Dinesh-Mareedu (41c3ff8)

@github-actions
Copy link
Contributor
github-actions bot commented Mar 6, 2025

This PR needs a release notes: label

If your changes are user facing and intended to be a part of release notes, please use a label starting with release notes:.

If not, please add the topic: not user facing label.

To add a label, you can comment to pytorchbot, for example
@pytorchbot label "topic: not user facing"

For more information, see
https://github.com/pytorch/pytorch/wiki/PyTorch-AutoLabel-Bot#why-categorize-for-release-notes-and-how-does-it-work.

@colesbury colesbury requested a review from desertfire March 6, 2025 18:33
@colesbury colesbury added the triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module label Mar 6, 2025
Copy link
Contributor
@desertfire desertfire left a comment

Choose a reason for hiding this comment

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

Can you add a test? Thanks.

@Dinesh-Mareedu
Copy link
Author
Dinesh-Mareedu commented Mar 13, 2025

Can you add a test? Thanks.

@desertfire
Can I add test in the following file, test has a custom op which uses list of optional tensors?
pytorch/test/inductor/test_aot_inductor_custom_ops.py

@desertfire
Copy link
Contributor

@desertfire Can I add test in the following file, test has a custom op which uses list of optional tensors? pytorch/test/inductor/test_aot_inductor_custom_ops.py

Feel free to do that.

else:
return f"at::{python_type} const&"

if python_type == "List[Optional[Tensor]]":
Copy link
Contributor

Choose a reason for hiding this comment

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

This convert_arg_type is not used anymore. Are you sure the change here is necessary?

@github-actions
Copy link
Contributor

Looks like this PR hasn't been updated in a while so we're going to go ahead and mark this as Stale.
Feel free to remove the Stale label if you feel this was a mistake.
If you are unable to remove the Stale label please contact a maintainer in order to do so.
If you want the bot to never mark this PR stale again, add the no-stale label.
Stale pull requests will automatically be closed after 30 days of inactivity.

@github-actions github-actions bot added the Stale label May 16, 2025
@github-actions github-actions bot closed this Jun 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

module: inductor open source Stale triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

0