Skip to content

Commit

Permalink
Fix (example/llm): Add all rewriters to the list (Xilinx#956)
Browse files Browse the repository at this point in the history
  • Loading branch information
nickfraser authored and Giuseppe5 committed May 31, 2024
1 parent 32f9ffe commit 5ceb7e8
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ def replace_mha_with_quantizable_layers(model, dtype):
for src_module, (quantizable_module, quantizable_module_kwargs) in QUANTIZABLE_MHA_MAP.items():
rewriter = ModuleToModuleByClass(
src_module, quantizable_module, **quantizable_module_kwargs, dtype=dtype)
rewriters.append(rewriter)
rewriters.append(rewriter)
if not rewriters:
warnings.warn(
f"No module to replace was found. Supported modules are {list(QUANTIZABLE_MHA_MAP.keys())}"
Expand Down

0 comments on commit 5ceb7e8

Please sign in to comment.