Skip to content

Use stream-aware scratch buffer in CUDA DeformConv - #31642

Open
apsonawane wants to merge 1 commit into
mainfrom
msrc/deformconv-colbuffer-stream-fix
Open

Use stream-aware scratch buffer in CUDA DeformConv#31642
apsonawane wants to merge 1 commit into
mainfrom
msrc/deformconv-colbuffer-stream-fix

Conversation

@apsonawane

Copy link
Copy Markdown
Contributor

This pull request updates the scratch buffer allocation method in the DeformConv CUDA kernel implementation. The main change is a switch from using a generic allocator interface to a more specialized scratch buffer utility, which may improve performance and code clarity.

Memory allocation improvements:

  • Replaced the use of IAllocator::MakeUniquePtr<T> and manual allocator retrieval with GetScratchBuffer<T> for allocating the col_buffer in deform_conv.cc. This streamlines temporary buffer allocation and ensures the buffer is tied to the compute stream.

Replace untagged temp allocation for col_buffer with GetScratchBuffer(..., compute_stream) to preserve StreamAwareBFCArena cross-stream safety.
@apsonawane
apsonawane requested a review from tianleiwu August 4, 2026 22:01
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.

1 participant