-
Notifications
You must be signed in to change notification settings - Fork 22
Open
Description
What?
Let's provide more utilities for TICO users, which makes getting model 'signature' easy and circle model structure easy (with multiple subgraphs), inference.
It doesn't take much effort because most of work is to revise the code and export api in proper form.
EXAMPLE
import tico
m = tico.load_circle('mymodel.circle')
sig = m.signature # help us to provide inputs
sample_args = (torch.randn(1,3,3,4),)
result = tico.infer(m, sample_args, backend="onert")
print(result)Background
So far, our tico package has focused mainly on the convert APIs:
from tico.config import CompileConfigV1, get_default_config
from tico.utils.convert import convert, convert_from_exported_program, convert_from_pt2
__all__ = [
"CompileConfigV1",
"get_default_config",
"convert",
"convert_from_exported_program",
"convert_from_pt2",
]While these cover model conversion essentials, the functionality around Circle models has been quite limited.
What we want to achieve
We want to extend our utilities to cover a more complete flow involving Circle models, including but not limited to:
- Loading Circle models easily
- Integrating with
oneccfor optimization and quantization workflows (advanced steps) - Running inference conveniently
In particular, the inference step is currently cumbersome. We want a utility that:
- Parses the input signature shape 👍
- Automatically accepts inputs as
torch.Tensorornumpy.ndarray - Provides a smooth, user-friendly API for feeding inputs to the model
mhs4670go and jinevening
Metadata
Metadata
Assignees
Labels
No labels