Skip to content

Adjusted test for reconstruction of USM host allocation from SUAI #846

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 1 commit into from
May 24, 2022

Conversation

oleksandr-pavlyk
Copy link
Contributor

The dpctl.MemoryUSM* Python object representing USM allocation are
reconstructed from an object exposing __sycl_usm_array_interface__
use USM-pointer queries. When SUAI provides sycl::context object,
the device is inferred using get_pointer_device. For host
allocations this may not need to return the device in the queue used
to make the allocation. It will return the first device in the context
to which the allocation is bound instead (per SYCL 2020 spec).

This change will not affect test suite outcome on configurations where
platforms only have a single device it them.

  • Have you provided a meaningful PR description?
  • Have you added a test, reproducer or referred to an issue with a reproducer?
  • Have you tested your changes locally for CPU and GPU devices?
  • Have you made sure that new changes do not introduce compiler warnings?
  • If this PR is a work in progress, are you filing the PR as a draft?

The dpctl.MemoryUSM* Python object representing USM allocation are
reconstructed from an object exposing __sycl_usm_array_interface__
use USM-pointer queries. When SUAI provides sycl::context object,
the device is inferred using `get_pointer_device`. For host
allocations this may not need to return the device in the queue used
to make the allocation. It will return the first device in the context
to which the allocation is bound instead (per SYCL 2020 spec).
@github-actions
Copy link

@coveralls
Copy link
Collaborator

Coverage Status

Coverage remained the same at 82.898% when pulling c11580f on fix-usm-memory-test into e132320 on master.

@oleksandr-pavlyk oleksandr-pavlyk merged commit 2d2426e into master May 24, 2022
@oleksandr-pavlyk oleksandr-pavlyk deleted the fix-usm-memory-test branch May 24, 2022 17:15
@github-actions
Copy link

Deleted rendered PR docs from intelpython.github.com/dpctl, latest should be updated shortly. 🤞

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