Repository navigation
Conversation
Refs #2102. Route unowned spans through DeviceBuffer.download so integrated devices use its pinned bounce and discrete devices retain their direct copy. Preserve each caller's source, destination and byte count, including developer checks. Release the current thread's bounce and device reading before its driver closes. Exercise every changed copy expression on both fake device classes, plus chunk offsets, tails and driver lifetime.
…test does, so Windows builds it
Owner
Author
|
GLM-5.3-Flash NVFP4 at TP=2 on two GB10s, main's merge base against this PR's tree (same patch as the current head), runs ordered base, new, new, base,
Tokens: 52 equal, 0 unequal, 0 unverified, and no cell had unequal streams. The six-turn chat with the default cache qualified on both binaries, thinking on and off, with the same |
Owner
Author
|
/atc exchange f4207260c61d8a0241a6eb0acabf6abd4d14b77e7bec32c321178ddaef8a417e |
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.
Part of #2102. #2103 made
DeviceBuffer.downloadstage through a per-thread pinned buffer on integrated GPUs such as the GB10, where a synchronous copy into pageable memory can miss pages. Discrete cards keep the direct copy.This moves every other synchronous device-to-host copy on main onto the same path. There are 54, not the 18 we first counted: 27 in family code and developer tools, and 27 in device tests. Each destination is stack or allocator memory, so on a GB10 each had the exposure
downloadhad. They now go throughcuda.memory.download, a borrowed device span handed toDeviceBuffer.download. The shared path keeps both driver calls it already had: the direct copy on discrete cards, and the copy into the pinned bounce on integrated ones. The attribute gate, the 4 MiB pieces, per-thread reuse and host accounting are as #2103 left them.Bytes copied don't change. Each replaced call is checked against its original source address, destination and byte count. Host tests cover the routing on a fake driver, integrated against discrete.
Not run yet: any device. Our GB10 run against main comes before this lands. Large copies get slower on an idle GB10, as #2103's own table shows (212 µs instead of 85 µs at 4 MiB), so the run checks the families that copy most.