Skip to content

Commit

Permalink
clean up nvidia check
Browse files Browse the repository at this point in the history
  • Loading branch information
matthiasdiener committed Mar 3, 2025
1 parent 7497898 commit eeeb8e8
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions pyopencl/invoker.py
Original file line number Diff line number Diff line change
Expand Up @@ -336,13 +336,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_limit = _get_max_parameter_size(dev)
if dev_limit != 4352:
# Only warn if the limit is the default value for Nvidia GPUs
# (4352 bytes), because failures have been observed only on such
# devices.
from pyopencl.characterize import nv_compute_capability
if nv_compute_capability(dev) is None:
# Only warn on Nvidia GPUs, because actual failures related to
# the device limit have been observed only on such devices.
continue

dev_limit = _get_max_parameter_size(dev)

dev_ptr_size = int(dev.address_bits / 8)

total_arg_size = 0
Expand Down

0 comments on commit eeeb8e8

Please sign in to comment.