Skip to content

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

@titaiwangms

Description

@titaiwangms

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.

Sub-issues

Metadata

Metadata

Assignees

Labels

module: torchlibRelated to the torch/aten function lib in development

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions