Skip to content

Conversation

@Sy0307
Copy link
Contributor

@Sy0307 Sy0307 commented Nov 3, 2025

To solve #487

@yunwei37 yunwei37 requested a review from Copilot November 3, 2025 21:04
Copy link
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 refines shared memory open type checks in GPU-related BPF map implementations and introduces a new CI workflow for testing GPU examples. The main change standardizes how server-side vs. agent-side code paths are distinguished using more precise shared memory open type conditions.

  • Updates conditional logic in GPU map implementations to use more accurate open type checks
  • Disables existing CI workflows to conserve resources on the dev/gpu_example branch
  • Adds a comprehensive new workflow for testing GPU examples with CUDA support

Reviewed Changes

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

Show a summary per file
File Description
runtime/src/bpf_map/gpu/nv_gpu_shared_array_map.cpp Changed server/agent side detection from == SHM_CREATE_OR_OPEN to != SHM_OPEN_ONLY to properly handle both server open types (SHM_CREATE_OR_OPEN and SHM_REMOVE_AND_CREATE)
runtime/src/bpf_map/gpu/nv_gpu_ringbuf_map.cpp Updated agent-side detection from != SHM_CREATE_OR_OPEN to != SHM_REMOVE_AND_CREATE
runtime/src/bpf_map/gpu/nv_gpu_array_map.cpp Updated agent-side detection from != SHM_CREATE_OR_OPEN to != SHM_REMOVE_AND_CREATE
.github/workflows/test-gpu-examples.yml Added new GPU examples testing workflow with CUDA 12.6 support and Python test orchestration
.github/workflows/*.yml (8 files) Disabled existing workflows to save CI resources during development

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

{
if (shm_holder.global_shared_memory.get_open_type() !=
shm_open_type::SHM_CREATE_OR_OPEN) {
shm_open_type::SHM_REMOVE_AND_CREATE) {
Copy link

Copilot AI Nov 3, 2025

Choose a reason for hiding this comment

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

Inconsistent agent-side detection logic. This condition checks != SHM_REMOVE_AND_CREATE, which would be true for both SHM_OPEN_ONLY (agent) and SHM_CREATE_OR_OPEN (server). Based on the code at lines 41-43, the else branch should only execute on server side (returning server_gpu_shared_mem). The condition should be == SHM_OPEN_ONLY to match the pattern in nv_gpu_shared_array_map.cpp line 208-209.

Copilot uses AI. Check for mistakes.
{
if (shm_holder.global_shared_memory.get_open_type() !=
shm_open_type::SHM_CREATE_OR_OPEN) {
shm_open_type::SHM_REMOVE_AND_CREATE) {
Copy link

Copilot AI Nov 3, 2025

Choose a reason for hiding this comment

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

Inconsistent agent-side detection logic. This condition checks != SHM_REMOVE_AND_CREATE, which would be true for both SHM_OPEN_ONLY (agent) and SHM_CREATE_OR_OPEN (server). Based on the else branch at line 42 returning local data buffer (which should be server-side behavior), the condition should be == SHM_OPEN_ONLY to match the pattern in nv_gpu_shared_array_map.cpp line 208-209.

Copilot uses AI. Check for mistakes.
@Sy0307 Sy0307 force-pushed the dev/gpu_example branch 2 times, most recently from 5d9b91e to d000b56 Compare November 9, 2025 11:26
@Sy0307 Sy0307 force-pushed the dev/gpu_example branch 2 times, most recently from f2d799c to 39fe2a0 Compare November 12, 2025 19:02
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.

1 participant