Skip to content

Emit torch.vtensor.literal for small initializers#36

Open
jtuyls wants to merge 1 commit intoiree-org:mainfrom
jtuyls:vtensor-literal-constants-v2
Open

Emit torch.vtensor.literal for small initializers#36
jtuyls wants to merge 1 commit intoiree-org:mainfrom
jtuyls:vtensor-literal-constants-v2

Conversation

@jtuyls
Copy link
Copy Markdown
Contributor

@jtuyls jtuyls commented Mar 30, 2026

Small initializers (<=256 bytes) now emit torch.vtensor.literal instead of flow.tensor.constant + torch_c.from_builtin_tensor. This allows torch-mlir conversion patterns to directly match constant values.

@jtuyls jtuyls force-pushed the vtensor-literal-constants-v2 branch from 7af0aec to 63efe40 Compare March 30, 2026 08:13
Small initializers (<=256 bytes) now emit torch.vtensor.literal instead
of flow.tensor.constant + torch_c.from_builtin_tensor. This allows
torch-mlir conversion patterns to directly match constant values.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Jorn <jorn.tuyls@gmail.com>
@jtuyls jtuyls force-pushed the vtensor-literal-constants-v2 branch from 63efe40 to 13d7348 Compare March 30, 2026 08:18
@jtuyls jtuyls requested review from Groverkss and IanWood1 March 30, 2026 08:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant