-
Notifications
You must be signed in to change notification settings - Fork 221
Added test to verify negative result of clSetKernelArg with CL_INVALID_DEVICE_QUEUE #2462
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
base: main
Are you sure you want to change the base?
Added test to verify negative result of clSetKernelArg with CL_INVALID_DEVICE_QUEUE #2462
Conversation
|
close/open to retrigger CI/CD |
| // Setup the test | ||
| error = create_single_kernel_helper(context, &program, nullptr, 1, | ||
| &sample_queue_test_kernel, "queue_test", | ||
| build_opts.c_str()); | ||
| test_error(error, "Unable to build test program"); | ||
|
|
||
| queue_arg_kernel = clCreateKernel(program, "queue_test", &error); | ||
| test_error(error, "Unable to get queue_test kernel for built program"); |
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.
This doesn't work - we either need the kernel name to be nullptr, or the kernel handle must not be nullptr.
Since I can't think of a reason not to do so, I'd recommend just using the harness to create the kernel also, and pass a non-nullptr kernel handle.
| // Setup the test | |
| error = create_single_kernel_helper(context, &program, nullptr, 1, | |
| &sample_queue_test_kernel, "queue_test", | |
| build_opts.c_str()); | |
| test_error(error, "Unable to build test program"); | |
| queue_arg_kernel = clCreateKernel(program, "queue_test", &error); | |
| test_error(error, "Unable to get queue_test kernel for built program"); | |
| // Setup the test | |
| error = create_single_kernel_helper(context, &program, &queue_arg_kernel, 1, | |
| &sample_queue_test_kernel, "queue_test", | |
| build_opts.c_str()); | |
| test_error(error, "Unable to create test kernel"); |
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.
Corrected
Related to #2282, according to work plan from here