Unverified Commit 1a10fa0c authored by Yao Matrix's avatar Yao Matrix Committed by GitHub
Browse files

enhance value guard of _device_agnostic_dispatch (#11553)



enhance value guard
Signed-off-by: default avatarMatrix Yao <matrix.yao@intel.com>
parent 9836f0e0
......@@ -1212,8 +1212,8 @@ def _device_agnostic_dispatch(device: str, dispatch_table: Dict[str, Callable],
# Some device agnostic functions return values. Need to guard against 'None' instead at
# user level
if fn is None:
return None
if not callable(fn):
return fn
return fn(*args, **kwargs)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment