agentleFS
AWSKnown publisheraws/aws-ofi-nccl/AGENTS.md

aws-ofi-nccl

AGENTS.md235 starsChanged 7 months agoApache-2.0View on GitHub

AWS OFI NCCL is a plugin that enables NVIDIA NCCL, AMD RCCL, and AWS Neuron applications to use libfabric as a network provider. It maps NCCL's connection-oriented transport APIs to libfabric's connection-less reliable interface (FI_EP_RDM). The project uses GNU autotools (autoconf, automake, libtool). If a compile_commands.json file does not exist, you should run make clean ; bear -- make in order to generate a compile_commands.json to build a database for clangd. Unit tests are in tests/unit/. They run without special…

  • Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about checking a change actually works.

    Of the AGENTS.md files we read, the 11,773 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.

The file

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

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

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈0

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 4

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    If a compile_commands.json file does not exist, you should run make clean .

    line 23
  2. Very specific:

    After any code change, run both the unit tests (make check) and, if in a Slurm allocation (SLURM_JOBID is set), the functional tests …

    line 71
  3. Very specific:

    Use Doxygen-style @brief comments for public API documentation

    line 102
  4. Very specific:

    Use NCCL_OFI_WARN / NCCL_OFI_INFO / NCCL_OFI_TRACE macros for logging

    line 114

≈ “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

AGENTS.md

Project Overview

AWS OFI NCCL is a plugin that enables NVIDIA NCCL, AMD RCCL, and AWS Neuron applications to use libfabric as a network provider. It maps NCCL's connection-oriented transport APIs to libfabric's connection-less reliable interface (FI_EP_RDM).

Build System

The project uses GNU autotools (autoconf, automake, libtool).

Building from a git checkout

./autogen.sh
./configure
make
make install

If a compile_commands.json file does not exist, you should run make clean ; bear -- make in order to generate a compile_commands.json to build a database for clangd.

Key configure options

  • --with-libfabric=PATH — Path to libfabric (required, >= 1.18.0)
  • --with-cuda=PATH — Path to CUDA installation (mutually exclusive with ROCm and Neuron)
  • --with-rocm=PATH — Path to ROCm installation (mutually exclusive with CUDA and Neuron)
  • --enable-neuron — Enable AWS Neuron support (mutually exclusive with CUDA and ROCm)
  • --with-hwloc=PATH — Path to hwloc installation (required)
  • --with-mpi=PATH — Path to MPI (needed for functional tests)
  • --enable-debug — Enable debug build
  • --enable-trace — Enable trace-level log messages
  • --enable-asan — Enable AddressSanitizer
  • --with-valgrind[=PATH] — Enable valgrind memory checks
  • --enable-thread-analysis - Enable Clang thread static analysis

Testing

Unit tests

make check

Unit tests are in tests/unit/. They run without special hardware and do not require MPI. Each test is a standalone binary linked against the internal plugin library.

Functional tests

Functional tests are in tests/functional/ and require MPI and actual hardware (EFA, CUDA/Neuron). They are not run by make check in typical development environments. Detailed instructions can be found in tests/functional/README.md.

Most developers will be developing on a system that uses Slurm for batch scheduling. You can tell if you are operating in a Slurm allocation by looking for the SLURM_JOBID environment variable. If you see such an environment variable, run the functional tests with commands like:

% mpirun -np 2 <functional test name>

Verification after changes

After any code change, run both the unit tests (make check) and, if in a Slurm allocation (SLURM_JOBID is set), the functional tests (mpirun -np 2 <test> for each binary in tests/functional/) before considering the change complete.

Coding Conventions

Coding conventions are documented in doc/coding-standards.md

Code Formatting

Key style rules:

  • Tabs for indentation, 8-space tab width
  • 100 column limit
  • Opening braces on same line for control structures, next line for functions
  • Pointer/reference alignment: right (char *ptr, int &ref)

Language

C++17 with -fno-rtti. No RTTI (dynamic_cast, typeid) is available.

Naming

  • Classes/structs: snake_case (e.g., nccl_ofi_idpool)
  • Functions/methods: snake_case
  • Macros/constants: UPPER_SNAKE_CASE
  • File names: snake_case with .cpp/.h extensions

Header files

  • Include guard format: #ifndef NCCL_OFI_FILENAME_H_ / #define / #endif
  • Use Doxygen-style @brief comments for public API documentation

Source files

  • First include after the copyright header is "config.h"
  • Standard library includes use angle brackets
  • Project includes use double quotes

Error handling

  • Internal functions throw std::runtime_error on unrecoverable errors
  • Functions that interface with NCCL return integer error codes (0 for success)
  • Use NCCL_OFI_WARN / NCCL_OFI_INFO / NCCL_OFI_TRACE macros for logging

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.