"vscode:/vscode.git/clone" did not exist on "8005978e1eebd1b0dbbafb4dada66f5dd504d7ec"
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], ...@@ -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 # Some device agnostic functions return values. Need to guard against 'None' instead at
# user level # user level
if fn is None: if not callable(fn):
return None return fn
return fn(*args, **kwargs) 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