-
Notifications
You must be signed in to change notification settings - Fork 242
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
only warn about argument sizes on Nvidia GPUs #713
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -315,7 +315,7 @@ def _get_max_parameter_size(dev): | |
dev_limit = dev.max_parameter_size | ||
pocl_version = get_pocl_version(dev.platform, fallback_value=(1, 8)) | ||
if pocl_version is not None and pocl_version < (3, 0): | ||
# Current PoCL versions (as of 04/2022) have an incorrect parameter | ||
# Older PoCL versions (<3.0) have an incorrect parameter | ||
# size limit of 1024; see e.g. https://github.com/pocl/pocl/pull/1046 | ||
if dev_limit == 1024: | ||
if dev.type & cl.device_type.CPU: | ||
|
@@ -332,8 +332,14 @@ def _check_arg_size(function_name, num_cl_args, arg_types, devs): | |
"""Check whether argument sizes exceed the OpenCL device limit.""" | ||
|
||
for dev in devs: | ||
dev_ptr_size = int(dev.address_bits / 8) | ||
dev_limit = _get_max_parameter_size(dev) | ||
if dev_limit != 4352: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm not sure I like this check, it seems too broad. I expect that AMD and Intel GPUs would have some limit as well, but these changes would avoid warnings in those cases, even if they're applicable. I would be more willing to limit this to GPU devices, which is testable via flags in the device info. |
||
# Only warn if the limit is the default value for Nvidia GPUs | ||
# (4352 bytes), because failures have been observed only on such | ||
# devices. | ||
continue | ||
|
||
dev_ptr_size = int(dev.address_bits / 8) | ||
|
||
total_arg_size = 0 | ||
|
||
|
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.
Could you explain the context a bit more? Were there spurious warnings that were bothersome?