agentleFS
NVIDIAKnown publisherNVIDIA/cuda-python/cuda_pathfinder/AGENTS.md

cuda-python / cuda_pathfinder

AGENTS.md3.4k starsChanged 4 months agoApache-2.0View on GitHub

This file describes cuda_pathfinder, a Python sub-package of cuda-python. It locates and loads NVIDIA dynamic libraries (CTK, third-party, and driver) across Linux and Windows. - Language: all implementation code in this package is pure Python. - Public API: keep user-facing imports stable via cuda.pathfinder. Internal modules should stay under cuda.pathfinder._*. - Behavior: loader behavior must remain deterministic and explicit. Avoid "best effort" silent fallbacks that mask why discovery/loading failed. - Cross-platform: preserve Linux and Windows behavior parity unless a change…

Trending

More talk lately.thin dataabout the whole repository

Dec 2025: 0 mentionsJan 2026: 0 mentionsFeb 2026: 1 mentionMar 2026: 1 mentionApr 2026: 1 mentionMay 2026: 0 mentionsJun 2026: 0 mentionsJul 2026: 1 mentionAug 2026: 0 mentionsSep 2026: 0 mentionsOct 2026: 2 mentionsNov 2026: 0 mentions
Dec 2025Jun 2026Nov 2026
Mentions a month of the NVIDIA/cuda-python repository that our weekly crawl found: only 12 in all, so this is a hint, not a trend. There is no adoption data for this file yet.

Who's talking about NVIDIA/cuda-python

The biggest 5 of 12 mentions linking to the repository that our crawl found. Each line is their own headline.

See all 12

Talked about on GitHub, Hacker News and Bluesky (12 times).

On GitHub · 10

5 more on GitHub

On Hacker News · 1

On Bluesky · 1

The file

We split this AGENTS.md into the rules it gives an agent

11 rules. About 0 are common, 4 are distinctive, and 7 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈4

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 7

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Language: all implementation code in this package is pure Python.

    line 8
  2. Very specific:

    Public API: keep user-facing imports stable via cuda.pathfinder.

    line 9
  3. Very specific:

    Edit authored descriptors, not derived tables: when adding/changing a library, update descriptor_catalog.py first.

    line 37
  4. Distinctive:

    Do not hardcode host assumptions: avoid baking in machine-local paths, shell-specific quoting, or environment assumptions.

    line 46
  5. Distinctive:

    Prefer focused abstractions: if a change is platform-specific, route it through existing platform abstraction points instead of branching …

    line 48
  6. Very specific:

    Primary command: run pytest tests/ from cuda_pathfinder/.

    line 54
  7. Distinctive:

    Real-loading tests: prefer spawned child-process tests for actual dynamic loading behavior.

    line 55
  8. Very specific:

    Cache-aware tests: if a test patches internals used by load_nvidia_dynamic_lib, call load_nvidia_dynamic_lib.cache_clear().

    line 57
  9. Very specific:

    Negative-case names: use obviously fake names (for example "not_a_real_lib") in unknown/invalid-lib tests.

    line 59
  10. Very specific:

    INFO summary in CI logs: use info_summary_append for useful test-context lines visible in terminal summaries.

    line 61
  11. Very specific:

    Run package tests: pytest tests/

    line 70

≈ “Common” is an estimate: at least 1 in 5 of the 16,595 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
AGENTS.md

This file describes cuda_pathfinder, a Python sub-package of cuda-python. It locates and loads NVIDIA dynamic libraries (CTK, third-party, and driver) across Linux and Windows.

Scope and principles

  • Language: all implementation code in this package is pure Python.
  • Public API: keep user-facing imports stable via cuda.pathfinder. Internal modules should stay under cuda.pathfinder._*.
  • Behavior: loader behavior must remain deterministic and explicit. Avoid "best effort" silent fallbacks that mask why discovery/loading failed.
  • Cross-platform: preserve Linux and Windows behavior parity unless a change is explicitly platform-scoped.

Package architecture

  • Descriptor source-of-truth: cuda/pathfinder/_dynamic_libs/descriptor_catalog.py defines canonical metadata for known libraries.
  • Registry layers:
    • lib_descriptor.py builds the name-keyed runtime registry from the catalog.
    • supported_nvidia_libs.py keeps legacy exported tables derived from the catalog for compatibility.
  • Search pipeline:
    • search_steps.py implements composable find steps (site-packages, CONDA_PREFIX, CUDA_HOME/CUDA_PATH, canary-assisted CTK root flow).
    • search_platform.py and platform_loader.py isolate OS-specific logic.
  • Load orchestration:
    • load_nvidia_dynamic_lib.py coordinates find/load phases, dependency loading, driver-lib fast path, and cache semantics.
  • Process isolation helper:
    • cuda/pathfinder/_utils/spawned_process_runner.py is used where process global dynamic loader state would otherwise leak across tests.

Editing guidance

  • Edit authored descriptors, not derived tables: when adding/changing a library, update descriptor_catalog.py first; keep derived exports in sync through existing conversion logic and tests.
  • Respect cache semantics: load_nvidia_dynamic_lib is cached. Never add behavior that closes returned handles or assumes repeated fresh loads.
  • Keep error contracts intact:
    • unknown name -> DynamicLibUnknownError
    • known but unsupported on this OS -> DynamicLibNotAvailableError
    • known/supported but not found/loadable -> DynamicLibNotFoundError
  • Do not hardcode host assumptions: avoid baking in machine-local paths, shell-specific quoting, or environment assumptions.
  • Prefer focused abstractions: if a change is platform-specific, route it through existing platform abstraction points instead of branching in many call sites.

Testing expectations

  • Primary command: run pytest tests/ from cuda_pathfinder/.
  • Real-loading tests: prefer spawned child-process tests for actual dynamic loading behavior; avoid in-process cross-test interference.
  • Cache-aware tests: if a test patches internals used by load_nvidia_dynamic_lib, call load_nvidia_dynamic_lib.cache_clear().
  • Negative-case names: use obviously fake names (for example "not_a_real_lib") in unknown/invalid-lib tests.
  • INFO summary in CI logs: use info_summary_append for useful test-context lines visible in terminal summaries.
  • Strictness toggle: CUDA_PATHFINDER_TEST_LOAD_NVIDIA_DYNAMIC_LIB_STRICTNESS controls whether missing libraries are tolerated (see_what_works) or treated as failures (all_must_work).

Useful commands

  • Run package tests: pytest tests/
  • Build package docs: cd docs && ./build_docs.sh

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.