All skills
nvidia avatar

/cuopt-developer

@e37c0a0
by NVIDIA Corporationnvidia/skills3.5k stars
424

Modify, build, test, debug, and contribute to NVIDIA cuOpt (C++/CUDA, Python, server, CI). Use for solver internals, PRs, DCO, and code conventions.

Use this Skill: https://skilld.dev/gh/nvidia/skills/cuopt-developer

This session only. Nothing lands on disk.

referencesconventions.md

≈468 tokens on demand. Your agent reads this file only when SKILL.md points to it.

Coding Conventions, Error Handling, and Memory Management

Read this for cuOpt code style: naming, file extensions, include order, error handling, memory management, and test impact.

C++ Naming

Element Convention Example
Variables snake_case num_locations
Functions snake_case solve_problem()
Classes snake_case data_model
Test cases PascalCase SolverTest
Device data d_ prefix d_locations_
Host data h_ prefix h_data_
Template params _t suffix value_t
Private members _ suffix n_locations_

File Extensions

Extension Usage
.hpp C++ headers
.cpp C++ source
.cu CUDA source (nvcc required)
.cuh CUDA headers with device code

Include Order

  1. Local headers
  2. RAPIDS headers
  3. Related libraries
  4. Dependencies
  5. STL

Python Style

  • Follow PEP 8
  • Use type hints
  • Tests use pytest

Error Handling

Runtime Assertions

CUOPT_EXPECTS(condition, "Error message");
CUOPT_FAIL("Unreachable code reached");

CUDA Error Checking

RAFT_CUDA_TRY(cudaMemcpy(...));

Memory Management

// ❌ WRONG
int* data = new int[100];

// ✅ CORRECT - use RMM
rmm::device_uvector<int> data(100, stream);
  • All operations should accept cuda_stream_view
  • Views (*_view suffix) are non-owning

Read existing code in cpp/src/ for real examples of RMM allocation, stream-ordering, RAFT utilities, and kernel launch patterns.

Test Impact Check

Before any behavioral change, ask:

  1. What scenarios must be covered?
  2. What's the expected behavior contract?
  3. Where should tests live?
    • C++ gtests: cpp/tests/
    • Python pytest: python/.../tests/

Add at least one regression test for new behavior.

Source: SKILL.md on GitHub

1 alert3mo3 checks · Risk SAFE
  • Gen Agent Trust Hub3mo

    The cuopt-developer skill is a comprehensive and secure development environment guide for the NVIDIA cuOpt project. It incorporates robust safety guardrails, including explicit prohibitions against privileged operations (sudo), system-level modifications, and insecure coding practices such as the use of 'eval()' on user input or remote script execution via 'curl | bash'. The skill emphasizes reproducible, user-space environment management using conda and standard project tools.

  • Socket3mo

    No alerts

  • Snyk3mo

    Risk: CRITICAL · 1 issue

Signed by skilld at e37c0a0. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub yesterday.

Activeupdated 3 months ago
version
26.08.00
Other metadata
metadata
{
  "author": "NVIDIA cuOpt Team",
  "tags": [
    "cuopt",
    "development",
    "contributing",
    "cpp-cuda",
    "python-bindings"
  ]
}

README badge

README badge for nvidia/skills/cuopt-developer