-
Notifications
You must be signed in to change notification settings - Fork 70
Device global copy kernel implementation #65
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?
Conversation
a5a6abf
to
e3ca4d1
Compare
fa8b338
to
e45add1
Compare
What is the purpose of the number field in each at each index of the autodiscovery string? I would also think about how to add fields containing information about properties associated with each device_global. |
Thanks @artemrad for the comment!
Autodiscovery format in f89b759: num_dev_global [(num_dev_global_field_1, dev_global_name_1, dev_global_address_1, dev_global_size_1), (num_dev_global_field_2, dev_global_name_2, dev_global_address_2, dev_global_size_2), (...), ...] By number field you mean the bolded part of above? The If the number of attributes associated with each dev global is always going to be the same, then it probably make more sense to make
I think the above mechanism makes sure we can add additional properties for each device global while maintaining forward compatibility? Currently the attributes include |
--------------------------------- Currently the device global pointer is being mocked by passing an actual device allocation into the function. However this should be removed after the pointer is available through autodiscovery string.
----------------------------------------- Currently each kernel will receive the info about device global address and size This is potentially not desired, a better design would be to have device global at autodiscovery device level instead, and kernel query for such information during runtime.
---------------------------------------------------------- The autodiscovery specifies how many device global there are in the device Specify for each device global how many attribute it has (currently 3) The 3 attribute are: device global name, address, size The device global name are used in runtime to get address of device global when given the name in clEnqueueReadGlobalVariableINTEL or clEnqueueWriteGlobalVariableINTEL
------------------------------------ Now the autodiscovery format is changed to num_device_global num_field_in_device_global [(dev_global_name, dev_global_addr, devl_global_size), (dev_global_name, dev_global_addr, devl_global_size), ...] This is because each device global will have same number of field anyways, so itis not necessary ot keep a number of field for each device global
Update milestone to 2022.4 as that is the current target. |
if (status != CL_SUCCESS) { | ||
return status; | ||
} | ||
|
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.
You can insert an assert(kernel)
after checking the status to appease Klocwork.
test/acl_usm_test.cpp
Outdated
// Host USM example | ||
// void* src_ptr = clHostMemAllocINTEL(m_context, NULL, strsize, 1, &status); | ||
// CHECK_EQUAL(CL_SUCCESS, status); | ||
// CHECK(src_ptr != NULL); |
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.
Commented code should be removed; unless you intend to enable this before merge?
Autodiscovery change is separated out into a separate PR (because the full implementation depend on updating upstream khronos header, which depend on the full implementation to be ready in sycl runtime). Autodiscovery change could be merged first Autodiscovery change PR: #100 |
Currently the device global pointer is being mocked by passing an actual device allocation into the function. However this should be removed after the pointer is available through autodiscovery string.
Closes #56