Skip to content

Improve performance of array metadata transfer to device#912

Merged
oleksandr-pavlyk merged 1 commit intomasterfrom
use-usm-host-allocator
Sep 20, 2022
Merged

Improve performance of array metadata transfer to device#912
oleksandr-pavlyk merged 1 commit intomasterfrom
use-usm-host-allocator

Conversation

@oleksandr-pavlyk
Copy link
Copy Markdown
Contributor

Change to use USM-host allocation for packed shape/strides on the host.
USM-host allocations take less time to copy them into USM-device allocations.

The difference is going to be especially pronounced on discrete GPU devices.

  • 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?

Change to use USM-host allocation for packed shape/strides on the host.
USM-host allocations take less time to copy them into USM-device allocations.

The difference is going to be especially pronounced on discrete GPU devices.
@github-actions
Copy link
Copy Markdown

@coveralls
Copy link
Copy Markdown
Collaborator

Coverage Status

Coverage remained the same at 82.02% when pulling eef632e on use-usm-host-allocator into 0f0c926 on master.

@github-actions
Copy link
Copy Markdown

Array API standard conformance tests failed to run for dpctl=0.14.0dev0=py310h8c27c75_118.

@diptorupd
Copy link
Copy Markdown
Contributor

@oleksandr-pavlyk re: "USM-host allocations take less time to copy them into USM-device allocations."

Less time compared to what? previously were we using regular malloc?

@oleksandr-pavlyk
Copy link
Copy Markdown
Contributor Author

q.copy<T>(standard_alloc_vector.data(), usm_device_ptr, n) is slower than q.copy<T>(usm_host_alloc_vector.data(), usm_device_ptr, n). The PR changes to use the latter.

@oleksandr-pavlyk oleksandr-pavlyk merged commit f56bd7a into master Sep 20, 2022
@oleksandr-pavlyk oleksandr-pavlyk deleted the use-usm-host-allocator branch September 20, 2022 22:45
@github-actions
Copy link
Copy Markdown

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

@github-actions
Copy link
Copy Markdown

Array API standard conformance tests failed to run for dpctl=0.14.0dev0=py310h8c27c75_118.

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.

3 participants