Repository navigation
Stream-ordered frees and send ordering without host fences - #30
Open
AdvaitTahilyani wants to merge 8 commits into
Open
AdvaitTahilyani wants to merge 8 commits into
AdvaitTahilyani wants to merge 8 commits into
Conversation
free_buffer(partition, buf) frees after the chare's compute stream (ordered after its comm stream and the default instance) instead of a device-wide Kokkos::fence; new helpers ct_after_stream (host task after a stream), ct_stream_after/comm_after_compute (event ordering), free_after_compute and upload_words. CONVOLVE/FLIP use them: the FFT temporaries and cuFFT plans are released from a compute-stream callback, and packed sends order the comm stream after the packs instead of fencing per message. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> (cherry picked from commit af00d12bbf06da7964ff3316c3bc4b92cadb6cc2)
adityapb
reviewed
Nov 6, 2026
adityapb
left a comment
Member
There was a problem hiding this comment.
Verdict: approve with nits.
This is a static review. Line numbers are at this PR's head.
I enumerated every fence this PR removes (fft_conv_gpu, send_input, finish_flip, finish_conv, send_bmm_input):
- Each is covered by an event, by same-stream ordering, or by
comm_after_compute. - None of the freed buffers is read later by another stream or by the host.
Node outputs that now complete asynchronously are also covered:
- children start with
join_streams(); - gets fence;
- reuse calls
compute_after_others().
- Nit: the description says the PR replaces the per-message fences and the
free_bufferglobal fences in general. Onlyexecutor_signal.cppis converted:free_buffer(char*)andcompute_fenceremain inexecutor_castscansort.cpp(:220,:634-636) and inexecutor_indexing.cpp. - Nit:
free_buffer(partition, buf)(backend_internal.hpp:602-606) always callscompute_after_others().- That adds false dependencies on the comm stream and the default instance for buffers used only on the compute stream;
fft_conv_gpucalls it four times in a row. - Use
free_after_computethere.
- That adds false dependencies on the comm stream and the default instance for buffers used only on the compute stream;
…er_compute Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Author
|
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Replaces the per-message
Kokkos::fenceandfree_bufferglobal fences inexecutor_signal.cpp(fft_conv, send_input, flip, conv, bmm input) with stream events,comm_free_afterandfree_after_compute.free_buffer(char*)/compute_fenceinexecutor_castscansort.cppandexecutor_indexing.cppare not converted here. This is the base for the next few PRs.🤖 Generated with Claude Code