-
Notifications
You must be signed in to change notification settings - Fork 53
Open
Labels
frontendPull requests that update the frontendPull requests that update the frontend
Description
Happened upon this by chance, but it appears to me the following line is erroneous:
if len(args) > 0: |
args
is defined up here and always consists of two elements, the args tuple and the kwargs dict:
catalyst/frontend/catalyst/compiled_functions.py
Lines 296 to 304 in 834b582
args_data, args_shape = tree_flatten((args, kwargs)) | |
for arg in args_data: | |
numpy_arg = np.asarray(arg) | |
numpy_arg_buffer.append(numpy_arg) | |
c_abi_ptr = ctypes.pointer(get_ranked_memref_descriptor(numpy_arg)) | |
c_abi_args.append(c_abi_ptr) | |
args = tree_unflatten(args_shape, c_abi_args) |
My guess is maybe the author intended to check the length of args_data
, but I'm not 100% sure. Apparently this mistake doesn't cause any issues (except when I was messing around with the CompiledFunction internals directly).
Metadata
Metadata
Assignees
Labels
frontendPull requests that update the frontendPull requests that update the frontend