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

[torchlib] TracedONNXFunction promotes python constants to tensors in evaluator function call #1914

Open
titaiwangms opened this issue Oct 23, 2024 · 0 comments
Assignees
Labels
topic: torch_lib Related to the torch/aten function lib in development

Comments

@titaiwangms
Copy link
Contributor

Currently, TracedONNXFunction does not support prmoting python constant to tensors when inputs and attributes enters the function. The challenge arises when dynamic shapes is involved, since dynamic shapes could potentially turn python constants to torch.SymInt (torch.fx.Node), which makes writing torchlib more complicated. The solution would be let the well-defined (the function has op signature) TracedONNXFunction be able to promote python constants to tensors before entering the function, while the function without good annotations staying fully tracing.

@titaiwangms titaiwangms added the topic: torch_lib Related to the torch/aten function lib in development label Oct 23, 2024
@titaiwangms titaiwangms self-assigned this Oct 23, 2024
titaiwangms added a commit that referenced this issue Oct 25, 2024
The firs step of #1914,
this is setting up onnxscript CI to test whether traced_only function
has enough information to process inputs to tensors.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: torch_lib Related to the torch/aten function lib in development
Projects
None yet
Development

No branches or pull requests

1 participant