-
Notifications
You must be signed in to change notification settings - Fork 50
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Small improvements to searchspaces and simulation mode #251
Conversation
kernel_tuner/util.py
Outdated
# "ngangs", | ||
# "nworkers", | ||
# "vlength", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why are these lines commented?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These block size names were added for OpenACC. The default block sizes were added automatically if the block size is not defined by the user, causing issues with these parameters outside of OpenACC. I spoke with @isazi about this, if I understood correctly these are no longer needed, hence commented pending removal.
kernel_tuner/util.py
Outdated
if isinstance(restrict, Constraint): | ||
restrict = convert_constraint_restriction(restrict) | ||
if not restrict(list(selected_params.values())): | ||
valid = False | ||
break | ||
else: | ||
if not restrict(**selected_params): | ||
valid = False | ||
break |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems our automated linting system 'SonarCloud' isn't too happy about this level of nesting control flow. Maybe we can break things up into smaller chunks?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've refactored this into two separate functions, SonarCloud is happy again.
Quality Gate passedIssues Measures |
Thanks! |
This pull request solves various small issues regarding search spaces and simulation mode:
block_sizes
does not exceedmax_threads
was not added back to the restrictions, which were later rechecked for each configuration ifcheck_restrictions
is enabled, causing a discrepancy.check_restrictions
function.MinProd
constraint was added to the conversion function for backwards compatibility.