Skip to content

Commit

Permalink
Rename flag_gpu_args to flat_gpu_args in core.py
Browse files Browse the repository at this point in the history
  • Loading branch information
stijnh committed May 9, 2023
1 parent 681d6ca commit 095bf0d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion kernel_tuner/accuracy.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ def __init__(
# We convert the array into a `np.ndarray` by using `np.array`.
# However, if the value is a numpy scalar, then we do not want to
# convert it into an array but instead keep the original value
if not np.isinstance(array, np.generic)
if not isinstance(array, np.generic):
array = np.array(array)

arrays[precision] = array.astype(dtype)
Expand Down
6 changes: 3 additions & 3 deletions kernel_tuner/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -607,19 +607,19 @@ def ready_argument_list(self, arguments):
else:
flat_args.append(argument)

flag_gpu_args = iter(self.dev.ready_argument_list(flat_args))
flat_gpu_args = iter(self.dev.ready_argument_list(flat_args))

# Unflatten the arguments back into arrays.
gpu_args = []
for argument in arguments:
if isinstance(argument, Tunable):
arrays = dict()
for key in argument:
arrays[key] = next(flag_gpu_args)
arrays[key] = next(flat_gpu_args)

gpu_args.append(Tunable(argument.param_key, arrays))
else:
gpu_args.append(next(flag_gpu_args))
gpu_args.append(next(flat_gpu_args))

return gpu_args

Expand Down

0 comments on commit 095bf0d

Please sign in to comment.