-
Notifications
You must be signed in to change notification settings - Fork 59
Open
Labels
Description
In the code fragment below, the instance won't be None in line 764 because the function dev.create_kernel_instance(_) returns either InvalidConfig or KernelInstance.
When I make a problem in the thread block settings, the return value in line 763 is an instance of InvalidConfig, which has no attribute name, bypasses the if statement, and will cause error AttributeError: 'InvalidConfig' object has no attribute 'name' in line 768. This error message is not that clear for me to figure out what the real problem is.
kernel_tuner/kernel_tuner/interface.py
Lines 763 to 768 in 5d8e636
| instance = dev.create_kernel_instance(kernelsource, kernel_options, params, False) | |
| if instance is None: | |
| raise RuntimeError("cannot create kernel instance, too many threads per block") | |
| # see if the kernel arguments have correct type | |
| util.check_argument_list(instance.name, instance.kernel_string, arguments) |