Skip to content

[SYCL] Test memory allocated by buffer creation API. #3156

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

Closed
wants to merge 2 commits into from

Conversation

rdeodhar
Copy link
Contributor

@rdeodhar rdeodhar commented Feb 4, 2021

This change enables testing whether buffers on integrated / discrete devices are created in host / device memory as expected.
Signed-off-by: rdeodhar [email protected]

@rdeodhar rdeodhar requested review from smaslov-intel and a team as code owners February 4, 2021 05:08
@@ -0,0 +1,26 @@
// REQUIRES: gpu,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.

this test needs to be E2E and go into llvm-test-suite

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, that is the plan. It is here so it can be reviewed.
Later, after the plugin change has been merged, the test will be moved to llvm-test-suite.

Copy link
Contributor

Choose a reason for hiding this comment

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

OK

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I am closing this PR since with no plugin change required, the test can go to llvm-test-suite directly.

if (DeviceIsIntegrated)
zePrint("Buffer Create: Integrated GPU will use zeMemAllocHost\n");
else
zePrint("Buffer Create: Discrete GPU will use zeMemAllocDevice\n");
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think we need to pollute the traces with these pritns. Note that ZE_CALL macro already prints the L0 calls being made, just use those.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

From the existing L0 calls we cannot tell if discrete or integrated GPU is detected.

Copy link
Contributor

Choose a reason for hiding this comment

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

you can query the device if it is integrated or not, from the sycl program

@rdeodhar rdeodhar closed this Feb 4, 2021
jsji pushed a commit that referenced this pull request May 30, 2025
Example use: /backport llvm_release_190

Expected behaviour:
IF user input != /backport llvm_release<digits>
THEN
  out << Invalid backport command. Expected /backport llvm_release_<digits>
  STOP

out << Attempting to create PR to <target>...

IF merge_conflict
THEN
   out << Backport to <target> failed due to conflicts on commit <sha>. Please backport manually.
   STOP
ELSE
  create_pr AND out << Success. Backport PR created: <PR_URL>
SUCCESS

Signed-off-by: Sidorov, Dmitry <[email protected]>

Original commit:
KhronosGroup/SPIRV-LLVM-Translator@5cf776c1fb980d7
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.

2 participants