Skip to content

Commit efd671a

Browse files
committed
rebased and made setup_onnx_sub explicit
Signed-off-by: Onkar Chougule <[email protected]>
1 parent cc3bb0b commit efd671a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

QEfficient/utils/export_utils.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ def wrapper(self, *args, **kwargs):
5252
# 3. Setup ONNX subfunctions if requested
5353
# TODO: No need of this variable, if export_kwargs contains classes (refer diffusers)
5454
if use_onnx_subfunctions := kwargs.get("use_onnx_subfunctions", False):
55-
_setup_onnx_subfunctions(self, kwargs)
55+
kwargs = _setup_onnx_subfunctions(self, kwargs)
5656

5757
# 4. Execute the actual export
5858
onnx_path = func(self, *args, **kwargs)
@@ -186,6 +186,7 @@ def _setup_onnx_subfunctions(qeff_model, kwargs):
186186
# TODO: Handle this in the modelling class QEFFTransformersBase,remove from here. Refer diffusers implementation
187187
export_kwargs["export_modules_as_functions"] = get_decoder_layer_classes_for_export(qeff_model.model)
188188
kwargs["export_kwargs"] = export_kwargs
189+
return export_kwargs
189190

190191

191192
def _cleanup_onnx_subfunctions(qeff_model):

0 commit comments

Comments
 (0)