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

Fix (example/llm): Fix API for newer torch_mlir releases. #1001

Draft
wants to merge 1 commit into
base: dev
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
import torch
from torch._decomp import get_decompositions
import torch_mlir
from torch_mlir import TensorPlaceholder
from torch_mlir.torchscript import TensorPlaceholder
from tqdm import tqdm

from brevitas.backport.fx._symbolic_trace import wrap
Expand Down Expand Up @@ -313,7 +313,7 @@ def compile_to_vmfb(inputs, layers, export_context_manager, export_class, is_fir
if is_first:
ts_g = compile_vicuna_layer(
export_context_manager, export_class, layer, inputs[0], inputs[1], inputs[2])
module = torch_mlir.compile(
module = torch_mlir.torchscript.compile(
ts_g, (hidden_states_placeholder, inputs[1], inputs[2]),
output_type="torch",
backend_legal_ops=["quant.matmul_rhs_group_quant"],
Expand All @@ -330,7 +330,7 @@ def compile_to_vmfb(inputs, layers, export_context_manager, export_class, is_fir
inputs[2],
inputs[3],
inputs[4])
module = torch_mlir.compile(
module = torch_mlir.torchscript.compile(
ts_g,
(
inputs[0],
Expand Down