Skip to content

Commit

Permalink
Exception Handled II
Browse files Browse the repository at this point in the history
Signed-off-by: Abukhoyer Shaik <[email protected]>
  • Loading branch information
abukhoy committed Jan 16, 2025
1 parent 54b0f18 commit dc5cc20
Showing 1 changed file with 21 additions and 18 deletions.
39 changes: 21 additions & 18 deletions QEfficient/transformers/models/modeling_auto.py
Original file line number Diff line number Diff line change
Expand Up @@ -385,24 +385,27 @@ def compile(
huggingface_config = self.model.config.__dict__
pytorch_transforms = [cls.__name__ for cls in self._pytorch_transforms]
onnx_transforms = [cls.__name__ for cls in self._onnx_transforms]
create_and_dump_qconfigs(
qpc_path,
onnx_path,
huggingface_config,
pytorch_transforms,
onnx_transforms,
prefill_seq_len,
ctx_len,
batch_size,
full_batch_size,
num_devices,
num_cores,
mxfp6_matmul,
mxint8_kv_cache,
num_speculative_tokens,
enable_qnn,
qnn_config,
)
try:
create_and_dump_qconfigs(
qpc_path,
onnx_path,
huggingface_config,
pytorch_transforms,
onnx_transforms,
prefill_seq_len,
ctx_len,
batch_size,
full_batch_size,
num_devices,
num_cores,
mxfp6_matmul,
mxint8_kv_cache,
num_speculative_tokens,
enable_qnn,
qnn_config,
)
except Exception as e:
print(f"Failed to create the qconfig file: {e}")

return qpc_path

Expand Down

0 comments on commit dc5cc20

Please sign in to comment.