Skip to content

Commit

Permalink
Fix (backport): op decomp in make_fx backport
Browse files Browse the repository at this point in the history
Signed-off-by: Alessandro Pappalardo <[email protected]>
  • Loading branch information
volcacius committed Nov 17, 2023
1 parent 6695e8d commit 8b98ac3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/brevitas/backport/fx/experimental/proxy_tensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ def proxy_call(proxy_mode, func, args, kwargs):
# `__torch_dispatch__` is only called on torch ops, which must subclass `OpOverload`
# We treat all other functions as an `external_call`, for instance, a function decorated
# with `@torch.fx.wrap`
external_call = not isinstance(func, backport._ops.OpOverload)
external_call = not isinstance(func, (backport._ops.OpOverload, torch._ops.OpOverload))

def can_handle_tensor(x):
return type(x) in HANDLED_TYPES or has_proxy_slot(x, proxy_mode.tracer)
Expand Down

0 comments on commit 8b98ac3

Please sign in to comment.