Skip to content

Commit

Permalink
Check leaf-ness with util function
Browse files Browse the repository at this point in the history
Signed-off-by: Kyunggeun Lee <[email protected]>
  • Loading branch information
quic-kyunggeu committed Sep 14, 2024
1 parent 80e6f55 commit 2169980
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -1290,7 +1290,7 @@ def _add_jit_trace(model: torch.nn.Module,
missing_modules = self._module_to_name.keys() - module_to_jit_trace.keys()

for m in module_to_jit_trace:
if isinstance(m, tuple(aimet_torch.utils.modules_to_treat_as_leaf)):
if is_leaf_module(m):
missing_modules -= set(m.modules())

if missing_modules:
Expand Down

0 comments on commit 2169980

Please sign in to comment.