Skip to content

[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

Merged
merged 16 commits into from
Jun 11, 2020

Conversation

againull
Copy link
Contributor

@againull 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

againull added 4 commits June 8, 2020 11:45
* Create check target for the Level Zero
* Add level0 backend support to lit.py

Signed-off-by: Artur Gainullin <[email protected]>
@againull againull requested review from smaslov-intel and a team as code owners June 8, 2020 18:48
@@ -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]):
Copy link
Contributor

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?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are right, fixed.

@bjoernknafla
Copy link
Contributor

+1

Signed-off-by: Artur Gainullin <[email protected]>
@bjoernknafla
Copy link
Contributor

The CUDA build is probably fixed by commit 4a8c432 ?

@@ -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.
Copy link
Contributor

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, fixed.

@againull againull requested a review from smaslov-intel June 10, 2020 17:44
@againull
Copy link
Contributor Author

The CUDA build is probably fixed by commit 4a8c432 ?

Yes, true.

@againull againull requested a review from rbegam June 10, 2020 18:26
@againull againull merged commit a33ffb5 into intel:sycl Jun 11, 2020

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]
Copy link
Contributor

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

@againull againull deleted the enable_lit_for_l0 branch December 3, 2022 00:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants