-
Notifications
You must be signed in to change notification settings - Fork 117
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
[OpenCL] Add bounds checking to the Enqueue memory operations. #1049
[OpenCL] Add bounds checking to the Enqueue memory operations. #1049
Conversation
Also merge urQueueCreate InvalidValueProperties test into InvalidQueueProperties test.
Normally OpenCL limits fill type operations to a max pattern size of 128, this patch includes a workaround to extend that.
Also ignore flags in no-op urEnqueueUSMPrefetch hint.
Also return RESULT_SUCCESS for no-op UR_KERNEL_EXEC_INFO_CACHE_CONFIG hint.
Also includes a few other GetInfo related fixes: * Add missing device info queries * Add mapping of CL command type to UR command type * Correct mapping of UR_QUEUE_INFO_FLAGS * Add mapping of cl_command_queue_properties to ur_queue_flags_t * Add mapping of cl_unified_shared_memory_type_intel to ur_usm_type_t * Add UNSUPPORTED_ENUMERATION path to KernelGeGroupInfo tests. And a fix related to one of the fixed queries: * Populate pfnReadHostPipe and pfnWriteHostPipe ddi table entries.
I had to base this on the mega fix branch as there was a non-trivial overlap in EnqueueMemBufferFill. Only the top commit is relevant. |
(and by top commit I mean most recent... which on github is the bottom commit) |
7fdc688
to
27349dc
Compare
This allows us to return UR_ERROR_INVALID_SIZE when we should. Extra checks are only performed on a non-success error code. Also adds a missing bounds check to urMemBufferPartition
27349dc
to
f65473d
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.
LGTM
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.
LGTM, just a small nit
This allows us to return UR_ERROR_INVALID_SIZE when we should. Extra
checks are only performed on a non-success error code.