This sample supports three networking environments for multi-node GPU testing:
- AWS GB200 / EFA: Uses Elastic Fabric Adapter for inter-node communication. The chart profile configures EFA-specific resources and annotations.
- AWS GB300 / DRA RoCE: Uses AWS network DRA with
roce.networking.k8s.awsclaims for GB300 clusters. - NCP / Mellanox (mlx5): Uses Mellanox ConnectX NICs (mlx5 driver) for RDMA networking. This is the default chart profile and can be reused for any cluster with Mellanox/InfiniBand networking.
Before running the test scripts, you need to configure your NVCF credentials:
- Copy the sample configuration file:
cp config.env.sample config.env- Edit
config.envand replace the placeholder values with your actual credentials:KEY: Your NVIDIA Cloud Functions API key (get it from https://org.ngc.nvidia.com/setup/api-keys)FUNCTION_ID: Your deployed function ID (single-node or multi-node)
Example config.env:
KEY="nvapi-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
FUNCTION_ID="ce460ed1-6f17-4bdc-ad6b-00a569fc780d"Note: The config.env file is gitignored to prevent accidentally committing sensitive API keys.
The container base image is configurable via the BASE_IMAGE build argument. Each environment requires a base image with the appropriate networking stack pre-installed.
AWS GB200 / EFA (default):
docker build -t multi-node-test container/The default base image includes the AWS EFA libraries and NCCL aws-ofi plugin needed for EFA communication.
NCP / Mellanox mlx5:
docker build \
--build-arg BASE_IMAGE=ghcr.io/coreweave/nccl-tests:13.0.2-devel-ubuntu22.04-nccl2.29.2-1-d73ec07 \
-t multi-node-test container/This base image includes Mellanox OFED drivers for RDMA/InfiniBand networking.
| Environment | Networking | Base Image |
|---|---|---|
| AWS GB200 | EFA (vpc.amazonaws.com/efa) |
public.ecr.aws/hpc-cloud/nccl-tests:latest |
| AWS GB300 | DRA RoCE (roce.networking.k8s.aws) |
public.ecr.aws/hpc-cloud/nccl-tests:latest |
| NCP / Mellanox | mlx5 (nvidia.com/mlnxnics) |
ghcr.io/coreweave/nccl-tests:13.0.2-devel-ubuntu22.04-nccl2.29.2-1-d73ec07 |
Copy the single sample override file:
cp override.yaml.sample override.yamlThe sample sets clusterProfile: auto. In auto mode, Helm looks at the target Kubernetes cluster during rendering and selects one of the built-in profiles:
aws-gb300whenDeviceClass/roce.networking.k8s.awsexists inresource.k8s.io/v1aws-gb200when any node advertises allocatablevpc.amazonaws.com/efancp-gb200when any node advertises allocatablenvidia.com/mlnxnics
Auto mode needs render-time permission to read DeviceClass resources and list Node resources. If the renderer cannot use live lookup, set the profile explicitly:
helm template test multi-node-test --set clusterProfile=aws-gb200
helm template test multi-node-test --set clusterProfile=aws-gb300
helm template test multi-node-test --set clusterProfile=ncp-gb200You can also set the same fallback in override.yaml:
clusterProfile: aws-gb200Top-level overrides remain supported for nodesPerInstance, image, resources, podAnnotations, securityContext, and resourceClaimTemplate. Use those only when the built-in profile needs local tuning.
ngc cf function deploy create --org <org> --deployment-specification <cluster>:<gpu-name>:<instance>:1:1 <function-id>:<version-id> --configuration-file override.yamlThe repository includes test scripts that automatically use your configured credentials from config.env:
NCCL Test:
./test_nccl.shBandwidth Test:
./test_bandwidth.shThese scripts will:
- Automatically load your API key and function ID from
config.env - Validate that the configuration is set correctly
- Run the tests against your deployed NVCF function
If you haven't set up config.env yet, the scripts will display an error message with setup instructions.
Sample curl command for single node:
curl -X POST -H "Content-Type: application/json" -d '{"e":"128M", "g": 1, "cluster_type": "ncp-mlx5"}' localhost:8000/nccl-testSample curl command for multi node on NCP/Mellanox clusters (the default):
curl -X POST -H "Content-Type: application/json" -d '{"np": 2, "e":"128M", "g": 2, "cluster_type": "ncp-mlx5"}' localhost:8000/nccl-testSample curl command for multi node on AWS GB200/EFA clusters:
curl -X POST -H "Content-Type: application/json" -d '{"np": 2, "e":"128M", "g": 2, "cluster_type": "aws-gb200"}' localhost:8000/nccl-testSample curl command for multi node on AWS GB300/DRA RoCE clusters:
curl -X POST -H "Content-Type: application/json" -d '{"np": 8, "e":"16G", "npernode": 4, "cluster_type": "aws-gb300"}' localhost:8000/nccl-testThe cluster_type parameter controls which networking environment variables are set for MPI. Use "ncp-mlx5" for Mellanox RDMA, "aws-gb200" for AWS EFA, and "aws-gb300" for AWS network DRA with RoCE.
curl --request POST \
--url https://<function-id>.invocation.api.nvcf.nvidia.com/nccl-test \
--header 'Authorization: Bearer <token>' \
--header 'NVCF-POLL-SECONDS: 300' \
--header 'Content-Type: application/json' \
--data '{
"np": 2, "g": 8, "cluster_type": "ncp-mlx5"
}'np(int, default: 0): Number of MPI processes (0 runs locally without MPI)b(str, default: "8"): Minimum message sizee(str, default: "128M"): Maximum message sizef(str, default: "2"): Message size step factorg(str, default: "1"): Number of GPUs per threadn(str, default: "20"): Number of iterationsnpernode(int, default: 1): Number of MPI processes per nodemnnvl(bool, default: false): Enable NCCL MNNVL modedebug(bool, default: false): Enable NCCL debug loggingcluster_type(str, required): Network fabric type,"ncp-mlx5"for clusters with Mellanox/InfiniBand NICs,"aws-gb200"for AWS clusters with EFA, or"aws-gb300"for AWS GB300 clusters with DRA RoCE
The bandwidth test endpoint uses nvbandwidth to measure GPU bandwidth.
Run all bandwidth tests:
curl -X POST -H "Content-Type: application/json" \
-d '{"bufferSize": 512, "testSamples": 3, "json": true}' \
localhost:8000/bandwidth-testRun specific testcase:
curl -X POST -H "Content-Type: application/json" \
-d '{"testcase": "device_to_device_memcpy_read_ce", "bufferSize": 256, "json": true}' \
localhost:8000/bandwidth-testRun tests by prefix:
curl -X POST -H "Content-Type: application/json" \
-d '{"testcasePrefix": "host_to_device", "bufferSize": 128, "json": true}' \
localhost:8000/bandwidth-testcurl --request POST \
--url https://<function-id>.invocation.api.nvcf.nvidia.com/bandwidth-test \
--header 'Authorization: Bearer <token>' \
--header 'NVCF-POLL-SECONDS: 300' \
--header 'Content-Type: application/json' \
--data '{
"bufferSize": 512,
"testcase": "device_to_device_memcpy_read_ce",
"testSamples": 3,
"json": true
}'bufferSize(int, default: 512): Memory copy buffer size in MiBtestcase(str, optional): Specific testcase to run (e.g., "device_to_device_memcpy_read_ce")testcasePrefix(str, optional): Run all tests matching prefix (e.g., "host_to_device", "multinode")testSamples(int, default: 3): Number of test iterationsuseMean(bool, default: false): Use mean instead of median for resultsskipVerification(bool, default: false): Skip data verification after copydisableAffinity(bool, default: false): Disable automatic CPU affinity controljson(bool, default: true): Return results in JSON formatmultinode(bool, default: false): Run multinode tests (requires MPI)np(int, default: 0): Number of MPI processes for multinode tests
To list available testcases, you can run nvbandwidth -l in the container.
- NCCL tests come from here: https://github.com/NVIDIA/nccl-tests
- Bandwidth tests come from here: https://github.com/NVIDIA/nvbandwidth
- Kubernetes 1.28 or newer is required due to Service using
apps.kubernetes.io/pod-indexlabel selector - Kubernetes 1.32 or newer is required for the AWS GB300 DRA path because the sample renders
ResourceClaimTemplatewithresource.k8s.io/v1 clusterProfile: autorequires Helm rendering against a live cluster. Offline rendering should use the defaultncp-gb200profile or setclusterProfileexplicitly.- The
cluster_typeparameter controls which networking environment variables are set for MPI. Use"aws-gb200"for the EFA fabric provider,"aws-gb300"for AWS network DRA with RoCE, or"ncp-mlx5"for InfiniBand withNCCL_IB_DISABLE=0,NCCL_NVLS_DISABLE=1,NCCL_IB_GID_INDEX=3, andNCCL_NET_GDR_LEVEL=PHB.