Skip to content

Commit

Permalink
Apply canonicalize for unpacking int4 (#1644)
Browse files Browse the repository at this point in the history
- tested it unpacks int4 as expected
- tested it doesn't make difference on int8
  • Loading branch information
jinchen62 authored Jul 12, 2023
1 parent 3b8f7cc commit 247f69c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions apps/language_models/scripts/vicuna.py
Original file line number Diff line number Diff line change
Expand Up @@ -578,7 +578,7 @@ def compile_to_vmfb_one_model(
print(f"[DEBUG] converting torch to linalg")
run_pipeline_with_repro_report(
module0,
"builtin.module(torch-backend-to-linalg-on-tensors-backend-pipeline)",
"builtin.module(func.func(canonicalize),torch-backend-to-linalg-on-tensors-backend-pipeline)",
description="Lowering Torch Backend IR -> Linalg-on-Tensors Backend IR",
)
else:
Expand Down Expand Up @@ -623,7 +623,7 @@ def compile_to_vmfb_one_model(
print(f"[DEBUG] converting torch to linalg")
run_pipeline_with_repro_report(
module1,
"builtin.module(torch-backend-to-linalg-on-tensors-backend-pipeline)",
"builtin.module(func.func(canonicalize),torch-backend-to-linalg-on-tensors-backend-pipeline)",
description="Lowering Torch Backend IR -> Linalg-on-Tensors Backend IR",
)
else:
Expand Down Expand Up @@ -1022,7 +1022,7 @@ def compile_first_vicuna(self):
print(f"[DEBUG] converting torch to linalg")
run_pipeline_with_repro_report(
module,
"builtin.module(torch-backend-to-linalg-on-tensors-backend-pipeline)",
"builtin.module(func.func(canonicalize),torch-backend-to-linalg-on-tensors-backend-pipeline)",
description="Lowering Torch Backend IR -> Linalg-on-Tensors Backend IR",
)
else:
Expand Down Expand Up @@ -1191,7 +1191,7 @@ def compile_second_vicuna(self):
print(f"[DEBUG] converting torch to linalg")
run_pipeline_with_repro_report(
module,
"builtin.module(torch-backend-to-linalg-on-tensors-backend-pipeline)",
"builtin.module(func.func(canonicalize),torch-backend-to-linalg-on-tensors-backend-pipeline)",
description="Lowering Torch Backend IR -> Linalg-on-Tensors Backend IR",
)
else:
Expand Down

0 comments on commit 247f69c

Please sign in to comment.