-
Notifications
You must be signed in to change notification settings - Fork 199
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
Strengthen testing of CL_DEVICE_TYPE query and use of CL_DEVICE_TYPE* #1977
Conversation
92a5282
to
9023a0c
Compare
total_errors++; | ||
} | ||
test_assert_error(num_devices > 1, | ||
"clGetDeviceIDs must return at least one device"); |
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.
Condition should either 'num_devices >= 1' or 'num_devices > 0' and not 'num_devices > 1'.
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.
@lakshmih this will be changed to ">=1"
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.
Do we need both the log_error
and the test_assert_error
? Seems redundant. Can we remove the test_assert_error
case?
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.
Need to fix the conditional check in platform.cpp
test_conformance/api/procs.h
Outdated
@@ -89,6 +89,8 @@ extern int test_min_max_language_version(cl_device_id deviceID, cl_contex | |||
extern int test_native_kernel(cl_device_id device, cl_context context, cl_command_queue queue, int n_elems ); | |||
|
|||
extern int test_create_context_from_type(cl_device_id deviceID, cl_context context, cl_command_queue queue, int num_elements); | |||
extern int test_create_context_from_type_device_type_all(cl_device_id deviceID, cl_context context, cl_command_queue queue, int num_elements); | |||
extern int test_create_context_from_type_device_type_default(cl_device_id deviceID, cl_context context, cl_command_queue queue, int num_elements); |
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.
context_from_type goes beyond just creating the context by creating memory objects and enqueueing a kernel etc.
Should these other tests do that as welll?
num_elements seems to be unused in all cases and could be removed.
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.
@lakshmih No, I just wanted to create test scenarios with clCreateContextFromType with TYPE_ALL and TYPE_DEFAULT. I did not find any sufficient place so I put it here.
num_elements is needed by ADD_TEST macro
total_errors++; | ||
} | ||
test_assert_error(num_devices > 1, | ||
"clGetDeviceIDs must return at least one device"); |
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.
Do we need both the log_error
and the test_assert_error
? Seems redundant. Can we remove the test_assert_error
case?
76229dc
to
1681bd0
Compare
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.
Thanks, LGTM!
Merging as discussed in the August 20th teleconference. |
Issue: #1930