Skip to content

[RUNTIME] Ensure NDArray.CopyTo(Device) always sync - #16716

Merged
tqchen merged 1 commit into
apache:mainfrom
tqchen:cuda-copyto
Mar 14, 2024
Merged

tqchen merged 1 commit into
apache:mainfrom
tqchen:cuda-copyto

Conversation

@tqchen

@tqchen tqchen commented Mar 13, 2024 •

Copy link
Copy Markdown
Member

This PR ensures that NDArray.CopyTo(Device) always sync.

Prior to this PR, some of the behavior relied on undefined behavior, as the per convention the underlying DeviceAPI may be async, but due to the cuda implementations was sync, we implicitly relied on that behavior.

This PR further clarifies in docs about the contract (that low-level device api is always async) as well as the sync/async nature of each NDArray API.

This PR ensures that NDArray.CopyTo(Device) always sync.
Prior to this PR, the behavior is uncertain as the underlying
DeviceAPI may or maynot sync. This PR further clarifies in
docs about the contract (that low-level device api is always async)
as well as the sync/async nature of each NDArray API.
@tqchen
tqchen merged commit 071fb8a into apache:main Mar 14, 2024
thaisacs pushed a commit to thaisacs/tvm that referenced this pull request Apr 3, 2024
This PR ensures that NDArray.CopyTo(Device) always sync.
Prior to this PR, the behavior is uncertain as the underlying
DeviceAPI may or maynot sync. This PR further clarifies in
docs about the contract (that low-level device api is always async)
as well as the sync/async nature of each NDArray API.
@tqchen
tqchen deleted the cuda-copyto branch February 15, 2025 14:19
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