-
Notifications
You must be signed in to change notification settings - Fork 24.2k
[AOTInductor] Codegen fix #148664
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
base: main
Are you sure you want to change the base?
[AOTInductor] Codegen fix #148664
Conversation
-- 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>
🔗 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 FailureAs of commit 41c3ff8 with merge base 79aa174 ( NEW FAILURE - The following job has failed:
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
|
This PR needs a
|
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.
Can you add a test? Thanks.
@desertfire |
Feel free to do that. |
@@ -135,6 +135,9 @@ def convert_arg_type(arg: torch.Argument) -> str: | |||
else: | |||
return f"at::{python_type} const&" | |||
|
|||
if python_type == "List[Optional[Tensor]]": |
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.
This convert_arg_type
is not used anymore. Are you sure the change here is necessary?
Looks like this PR hasn't been updated in a while so we're going to go ahead and mark this as |
-- 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