Skip to content

Commit ea7ca58

Browse files
fix whitespace issues
1 parent 41693f0 commit ea7ca58

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

kernel_tuner/searchspace.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,8 @@ def __init__(
5252
restrictions = restrictions if restrictions is not None else []
5353
self.tune_params = tune_params
5454
self.restrictions = restrictions
55-
self._modified_restrictions = restrictions # the searchspace can add commonly used constraints (e.g. maxprod(blocks) <= maxthreads)
55+
# the searchspace can add commonly used constraints (e.g. maxprod(blocks) <= maxthreads)
56+
self._modified_restrictions = restrictions
5657
self.param_names = list(self.tune_params.keys())
5758
self.params_values = tuple(tuple(param_vals) for param_vals in self.tune_params.values())
5859
self.params_values_indices = None
@@ -318,7 +319,7 @@ def __add_restrictions(self, parameter_space: Problem) -> Problem:
318319
restriction, required_params = restriction
319320
if callable(restriction) and not isinstance(restriction, Constraint):
320321
restriction = FunctionConstraint(restriction)
321-
322+
322323
# add the Constraint
323324
if isinstance(restriction, FunctionConstraint):
324325
parameter_space.addConstraint(restriction, required_params)

kernel_tuner/util.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -892,7 +892,6 @@ def is_or_evals_to_number(s: str) -> Optional[Union[int, float]]:
892892
except Exception:
893893
# it's not a solvable subexpression, return None
894894
return None
895-
896895

897896
# either the left or right side of the equation must evaluate to a constant number
898897
left_num = is_or_evals_to_number(left)
@@ -1064,7 +1063,7 @@ def compile_restrictions(restrictions: list, tune_params: dict, monolithic = Fal
10641063
# return the restrictions and used parameters
10651064
if len(restrictions_ignore) == 0:
10661065
return compiled_restrictions
1067-
1066+
10681067
# use the required parameters or add an empty tuple for unknown parameters of ignored restrictions
10691068
noncompiled_restrictions = []
10701069
for r in restrictions_ignore:

0 commit comments

Comments
 (0)