-
Notifications
You must be signed in to change notification settings - Fork 790
[SYCL] Move device handling to Unified Runtime #8088
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
Conversation
@bso-intel , @igchor , @jandres742 : please review |
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.
Couple of comments, but otherwise looks good.
sycl/plugins/unified_runtime/ur/adapters/level_zero/ur_level_zero.cpp
Outdated
Show resolved
Hide resolved
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
+1 |
// TODO: promote all of the below extensions to the Unified Runtime | ||
// and get rid of these ZER_EXT constants. | ||
const int ZER_EXT_DEVICE_INFO_END = ZER_DEVICE_INFO_FORCE_UINT32; | ||
const int ZER_EXT_DEVICE_INFO_BUILD_ON_SUBDEVICE = ZER_EXT_DEVICE_INFO_END - 1; | ||
const int ZER_EXT_DEVICE_INFO_MAX_WORK_GROUPS_3D = ZER_EXT_DEVICE_INFO_END - 2; | ||
const int ZER_EXT_DEVICE_INFO_ATOMIC_MEMORY_SCOPE_CAPABILITIES = | ||
ZER_EXT_DEVICE_INFO_END - 3; | ||
const int ZER_EXT_DEVICE_INFO_BFLOAT16_MATH_FUNCTIONS = | ||
ZER_EXT_DEVICE_INFO_END - 4; | ||
const int ZER_EXT_DEVICE_PARTITION_BY_CSLICE = ZER_EXT_DEVICE_INFO_END - 5; | ||
const int ZER_EXT_DEVICE_INFO_MAX_MEM_BANDWIDTH = ZER_EXT_DEVICE_INFO_END - 6; | ||
const int ZER_EXT_DEVICE_INFO_GPU_HW_THREADS_PER_EU = | ||
ZER_EXT_DEVICE_INFO_END - 7; | ||
const int ZER_EXT_DEVICE_INFO_GPU_EU_COUNT_PER_SUBSLICE = | ||
ZER_EXT_DEVICE_INFO_END - 8; | ||
const int ZER_EXT_DEVICE_INFO_GPU_SLICES = ZER_EXT_DEVICE_INFO_END - 9; | ||
const int ZER_EXT_DEVICE_INFO_MAX_COMPUTE_QUEUE_INDICES = | ||
ZER_EXT_DEVICE_INFO_END - 10; | ||
const int ZER_EXT_DEVICE_INFO_MEMORY_BUS_WIDTH = ZER_EXT_DEVICE_INFO_END - 11; | ||
const int ZER_EXT_DEVICE_INFO_MEMORY_CLOCK_RATE = ZER_EXT_DEVICE_INFO_END - 12; | ||
const int ZER_EXT_DEVICE_INFO_FREE_MEMORY = ZER_EXT_DEVICE_INFO_END - 13; | ||
const int ZER_EXT_DEVICE_INFO_DEVICE_ID = ZER_EXT_DEVICE_INFO_END - 14; | ||
const int ZER_EXT_DEVICE_INFO_IMAGE_MAX_ARRAY_SIZE = | ||
ZER_DEVICE_INFO_IMAGE_MAX_ARRAR_SIZE; | ||
|
||
const int ZER_EXT_RESULT_END = 0x1000; | ||
const zer_result_t ZER_EXT_RESULT_ADAPTER_SPECIFIC_ERROR = | ||
zer_result_t(ZER_EXT_RESULT_END - 1); | ||
|
||
const int ZER_EXT_USM_CAPS_ACCESS = 1 << 0; | ||
const int ZER_EXT_USM_CAPS_ATOMIC_ACCESS = 1 << 1; | ||
const int ZER_EXT_USM_CAPS_CONCURRENT_ACCESS = 1 << 2; | ||
const int ZER_EXT_USM_CAPS_CONCURRENT_ATOMIC_ACCESS = 1 << 3; | ||
|
||
const zer_device_partition_property_flag_t | ||
ZER_EXT_DEVICE_PARTITION_PROPERTY_FLAG_BY_CSLICE = | ||
zer_device_partition_property_flag_t( | ||
ZER_DEVICE_PARTITION_PROPERTY_FLAG_FORCE_UINT32 - 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.
@pbalcer: please note these UR extensions and make sure there are issues created to follow up
LGTM. Just FYI, the were some changes in the UR API (mostly ZER prefix was changed to UR) since this code was created: https://github.com/oneapi-src/unified-runtime/blob/main/include/ur_api.h Is the plan to update the code in llvm to the newest UR version after this PR is merged? |
Right. We have to update to the latest UR. |
we are checking out at fd711c920acc4434cb52ff18b078c082d9d7f44d from the UR repo,
@smaslov-intel I'm working on integrating with the UR loader (https://github.com/intel/llvm/blob/sycl/sycl/plugins/unified_runtime/CMakeLists.txt#L32). I can do it on the same patch if you'd want me to. |
Thanks for volunteering! |
/verify with intel/llvm-test-suite#1544 |
The remaining test failure
Is covered with intel/llvm-test-suite#1544 |
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.
+1
thanks @smaslov-intel . LGTM Question: if all that we were doing here was to move code from one PI to UR, why were tests failing? just some misses in the porting, or something else major? |
@jandres742 : The move from Pi to UR is straightforward. |
Note also that the remaining PI interfaces are mostly the same between UR and PI and so will require minimum to no translation. |
Signed-off-by: Sergey V Maslov <[email protected]>
Signed-off-by: Sergey V Maslov <[email protected]>
Signed-off-by: Sergey V Maslov <[email protected]>
Signed-off-by: Sergey V Maslov <[email protected]>
Signed-off-by: Sergey V Maslov <[email protected]>
Signed-off-by: Sergey V Maslov <[email protected]>
Signed-off-by: Sergey V Maslov <[email protected]>
Signed-off-by: Sergey V Maslov <[email protected]>
Signed-off-by: Sergey V Maslov <[email protected]>
Signed-off-by: Sergey V Maslov <[email protected]>
Signed-off-by: Sergey V Maslov <[email protected]>
Signed-off-by: Sergey V Maslov <[email protected]>
Signed-off-by: Sergey V Maslov <[email protected]>
487f982
to
050936b
Compare
Signed-off-by: Sergey V Maslov <[email protected]>
@intel/llvm-gatekeepers : please merge this |
Working now on updating CMakeLists to user UR loader. |
The changes although being large, are just move of the code with modifications necessary to being able to share it with L0 Plugin. Signed-off-by: Sergey V Maslov <[email protected]> --------- Signed-off-by: Sergey V Maslov <[email protected]>
The changes although being large, are just move of the code with modifications necessary to being able to share it with L0 Plugin.
Signed-off-by: Sergey V Maslov [email protected]