Skip to content

bring-example-ptx-back #32

Merged
yunwei37 merged 10 commits intomainfrom
example-ptx
May 24, 2025
Merged

bring-example-ptx-back #32
yunwei37 merged 10 commits intomainfrom
example-ptx

Conversation

@yunwei37
Copy link
Copy Markdown
Member

This pull request introduces enhancements and documentation updates to support PTX generation for CUDA on GPUs using the llvmbpf library. It includes changes to the main documentation, a new example program, and build configurations to demonstrate and facilitate this functionality.

Documentation Updates:

  • Updated README.md to clarify the PTX generation feature, including renaming a section to "PTX generation for CUDA on GPU" and adding a new table of contents entry for this feature. [1] [2] [3]
  • Added a detailed README.md in the example/ptx directory, explaining the workflow, components, and usage of the PTX example program. This includes instructions for building and running the example, as well as a comprehensive code explanation.

Code and Build Enhancements:

  • Added a new example program (ptx_test) in example/ptx to demonstrate generating and running PTX code for eBPF programs on CUDA-capable GPUs. This includes a complete workflow from eBPF to PTX compilation, CUDA binary generation, and execution.
  • Updated CMakeLists.txt in example/ptx to include build configurations for the new ptx_test program, with options for specifying the CUDA installation path and linking necessary libraries.

@yunwei37 yunwei37 requested a review from Copilot May 24, 2025 07:14
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds support and documentation for generating and running PTX code on NVIDIA GPUs using the llvmbpf library.

  • Refactored main README.md to clarify and rename the PTX/CUDA feature and update the table of contents.
  • Introduced a new PTX example under example/ptx, complete with a detailed README and a ptx_test program.
  • Added CMake configuration in example/ptx to build ptx_test with CUDA path options and necessary library links.

Reviewed Changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 5 comments.

File Description
example/ptx/README.md Added detailed README for the PTX example, covering setup and code explanations
example/ptx/CMakeLists.txt New CMakeLists for ptx_test, including CUDA path option and library/link settings
README.md Renamed PTX section to “PTX generation for CUDA on GPU” and added TOC entry

@codecov
Copy link
Copy Markdown

codecov bot commented May 24, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 78.96%. Comparing base (486e7b1) to head (6148b53).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main      #32   +/-   ##
=======================================
  Coverage   78.96%   78.96%           
=======================================
  Files           5        5           
  Lines        1193     1193           
  Branches      124      124           
=======================================
  Hits          942      942           
  Misses        251      251           
Flag Coverage Δ
bpf_conformance 66.30% <ø> (ø)
unittests 52.13% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

yunwei37 and others added 5 commits May 24, 2025 00:16
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@yunwei37 yunwei37 changed the title bring-example-ptx-back bring-example-ptx-back and add CI for it May 24, 2025
@yunwei37 yunwei37 changed the title bring-example-ptx-back and add CI for it bring-example-ptx-back May 24, 2025
@yunwei37 yunwei37 merged commit 0cbc9cb into main May 24, 2025
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants