-
Notifications
You must be signed in to change notification settings - Fork 788
[SYCL] Enable LIT testing for Level Zero #1839
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
againull
commented
Jun 8, 2020
- Support discovery of Level Zero devices in get_device_count_by_type tool
- Support Level Zero backend in the lit scripts
- Add check-level0 make target
- Fix obvious mistake in the plugin in addMapping function
- Disable lit tests failing for Level Zero
Signed-off-by: Artur Gainullin <[email protected]>
* Create check target for the Level Zero * Add level0 backend support to lit.py Signed-off-by: Artur Gainullin <[email protected]>
Signed-off-by: Artur Gainullin <[email protected]>
Signed-off-by: Artur Gainullin <[email protected]>
Signed-off-by: Artur Gainullin <[email protected]>
Signed-off-by: Artur Gainullin <[email protected]>
Signed-off-by: Artur Gainullin <[email protected]>
Signed-off-by: Artur Gainullin <[email protected]>
Signed-off-by: Artur Gainullin <[email protected]>
Signed-off-by: Artur Gainullin <[email protected]>
sycl/test/lit.cfg.py
Outdated
@@ -105,10 +106,16 @@ def getDeviceCount(device_type): | |||
if re.match(r".*cuda", result[1]): | |||
is_cuda = True; | |||
|
|||
# if we have found gpu and there is additional information, let's check | |||
# whether this is CUDA device or not | |||
if device_type == "gpu" and value > 0 and len(result[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.
Would it make sense to also move the CUDA check above into this condition?
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 are right, fixed.
+1 |
Signed-off-by: Artur Gainullin <[email protected]>
The CUDA build is probably fixed by commit 4a8c432 ? |
sycl/test/lit.cfg.py
Outdated
@@ -181,8 +188,8 @@ def getDeviceCount(device_type): | |||
config.substitutions.append( ('%ACC_RUN_PLACEHOLDER', acc_run_substitute) ) | |||
config.substitutions.append( ('%ACC_CHECK_PLACEHOLDER', acc_check_substitute) ) | |||
|
|||
# PI API either supports OpenCL or CUDA. | |||
if not cuda and found_at_least_one_device: | |||
# PI API either supports OpenCL or CUDA or Level Zero. |
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.
Comment is misleading, PI can support multiple plugins simultaneously. It is LIT infrastructure that only runs with single backend.
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, fixed.
Signed-off-by: Artur Gainullin <[email protected]>
Signed-off-by: Artur Gainullin <[email protected]>
Yes, true. |
Signed-off-by: Artur Gainullin <[email protected]>
Signed-off-by: Artur Gainullin <[email protected]>
|
||
if err: | ||
lit_config.warning("getDeviceCount {TYPE} {BACKEND} stderr:{ERR}".format( | ||
TYPE=device_type, BACKEND=backend, ERR=err)) | ||
return [value,is_cuda] | ||
return [value,is_cuda,is_level0] |
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.
Please, fix return value type at line 93.
https://github.com/intel/llvm/runs/760440987