Draft
Conversation
This was referenced Dec 1, 2025
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.
This pull request introduces a new GPU per-thread timing distribution demo under the
example/gpu/per-thread-timing-distdirectory. The demo includes a CUDA kernel that runs a synthetic workload, an eBPF program that collects per-thread timing data, and a user-space application to display timing distributions and summary statistics. The changes provide a complete workflow for measuring and visualizing the runtime distribution of GPU threads using eBPF.New Demo Implementation:
Makefileto automate building the CUDA kernel, eBPF program, and user-space application, including support for third-party dependencies and environment setup.timed_work_kernel.cuCUDA kernel that runs a synthetic workload with varying iterations per thread to generate a non-trivial timing distribution.eBPF Program for Timing Collection:
timing-dist.bpf.ceBPF program to trace entry/exit of the CUDA kernel, record per-thread start times, and update a log2-based histogram and summary statistics using custom GPU helper functions.User-space Application for Visualization:
timing-dist.cuser-space program that attaches the eBPF program, periodically prints the timing distribution histogram and summary statistics, and handles graceful termination via signals.Project Structure and Build Artifacts:
.gitignoreto exclude build outputs and binaries for the new demo.Please try to use the copilot to summary your PR. You don't need to fill all info below, just it can help giving your a checklist.