Answer a cross-boundary copy with a Memcpy, or refuse it - #2561
Merged
Conversation
Auto returned `MappedTasklet` for every in-kernel multi-element copy without looking at the storages, and again as the host-level fallback for anything the CUDA branch's storage set did not cover. The expansion then rejected the copy as its own limitation and pointed at `MemcpyCUDA1D`, which device code cannot issue either. Inside a kernel a copy that crosses the boundary has no implementation at all -- device code can neither address host memory nor issue a Memcpy -- so selection refuses it and says the copy does not belong in the kernel. At host level it is always a Memcpy: the refinement already answers with the pitched 2-D form or a loop of `cudaMemcpyAsync` per contiguous chunk, and it is now reached for a `Register` endpoint too, which is host memory there but sits outside the storage set the branch tested.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
CopyLibraryNode's Auto selection returnedMappedTaskletfor every in-kernel multi-element copy without looking at the storages, and again as the host-level fallback for anything the CUDA branch's storage set did not cover, so the expansion then rejected the copy as its own limitation and pointed atMemcpyCUDA1D— which device code cannot issue either. Inside a kernel a cross-boundary copy has no implementation at all and is now refused at selection with a message naming the kernel, while at host level it always resolves to a Memcpy, including for aRegisterendpoint that sits outside the storage set the branch tested.