Skip to content

Commit

Permalink
[vicuna.py] Allow to pass extra arguments to iree-compile (#1935)
Browse files Browse the repository at this point in the history
Add a new flag `-Xiree_compile` to forward extra compiler arguments to
`iree-compile`. This flag can be set multiple times to pass more than
one extra argument.
  • Loading branch information
kuhar authored Nov 6, 2023
1 parent 500c4f2 commit 488a172
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion apps/language_models/scripts/vicuna.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,12 @@
default="",
help="Specify target triple for vulkan.",
)
parser.add_argument(
"--Xiree_compile",
action='append',
default=[],
help="Extra command line arguments passed to the IREE compiler. This can be specified multiple times to pass multiple arguments."
)

# Microbenchmarking options.
parser.add_argument(
Expand Down Expand Up @@ -1910,7 +1916,8 @@ def create_prompt(model_name, history):
if __name__ == "__main__":
args, unknown = parser.parse_known_args()

_extra_args = []
_extra_args = list(args.Xiree_compile)

device_id = None
# Process vulkan target triple.
# TODO: This feature should just be in a common utils for other LLMs and in general
Expand Down

0 comments on commit 488a172

Please sign in to comment.