NCCL NVLS CUDA failure 1: invalid argument
This NCCL warning occurs while the NVLink SHARP transport is creating or registering multicast resources. The line identifies the failing NVLS path, but it does not prove whether the owner is application input, NCCL, CUDA, Fabric Manager, or the NVSwitch domain.
Capture the first NVLS warning from every rank, compare the same collective with NVLS disabled, and inspect Fabric Manager and GPU health before changing the production stack. NCCL_NVLS_ENABLE=0 is a diagnostic control, not proof of the final cause.
- Symptom
transport/nvls.cc:598 NCCL WARN Cuda failure 1 'invalid argument'- Root cause
- The direct failure is an invalid CUDA operation or resource passed while NCCL configures the NVLS multicast path. The underlying owner remains one of several possibilities until a control separates software compatibility, NVLS support, resource state, and fabric health. A later collective timeout or communicator abort is downstream evidence and should not replace the first NVLS warning in the incident record.
- Recommended fix
NCCL_DEBUG=INFO- How Denpex helps
- Denpex investigates NCCL NVLS CUDA failure 1: invalid argument using the evidence you provide or your connected workload collects. Earlier rank, host or application evidence is needed to distinguish an initiating failure from a downstream report.
What this failure is
The signature transport/nvls.cc ... Cuda failure 1 'invalid argument' is emitted from NCCL's NVLink SHARP setup path. NVIDIA documents NVLS as an NVSwitch offload for supported Hopper and later systems. The surrounding warning, selected topology, rank, and fabric state are required to determine why the CUDA operation rejected an argument.
Is this what broke your run? Paste your log.
You're reading about NCCL NVLS CUDA failure 1: invalid argument. Paste your own traceback and relevant evidence for an investigation of your workload, with a next action or a specific missing fact. A reference entry does not establish your cause. No account or card for the free diagnosis. Review data handling before submitting sensitive logs.
Before uploading, review cloud data handling and local options.
Upload your log file. Large files are processed in your browser. Only selected evidence is submitted when you run diagnosis.
Why it happens (the mechanism)
NCCL can enter the NVLS path only when the detected GPU, NVSwitch, driver, and runtime state support multicast setup. An invalid-argument warning at that point can reflect an unsupported or inconsistent resource, a software compatibility defect, or unhealthy fabric state. The warning alone is not evidence that the user's collective parameters are wrong, because it is emitted inside the NVLS transport rather than at the original collective call.
What you'll observe
- Communicator initialization or the first collective fails while NCCL is configuring NVLS.
- The same workload can succeed after NVLS is disabled, which proves path ownership but not the specific failed component.
- Aggregated framework errors can hide the first rank and first NVLS warning.
Common symptoms and what they mean
Check possible explanations against the incident evidence. A matching symptom alone does not establish its cause.
| Symptom | Possible explanation |
|---|---|
| transport/nvls.cc:598 NCCL WARN Cuda failure 1 'invalid argument' | The direct failure is an invalid CUDA operation or resource passed while NCCL configures the NVLS multicast path. |
| NVLS warnings appear during communicator initialization before useful training or serving work begins. | The underlying owner remains one of several possibilities until a control separates software compatibility, NVLS support, resource state, and fabric health. |
| One or more ranks report a later NCCL failure after the first NVLS warning. | A later collective timeout or communicator abort is downstream evidence and should not replace the first NVLS warning in the incident record. |
Which systems are affected
- Hopper or later GPUs on supported NVSwitch systems
- NCCL communicators that select NVLink SHARP
- Multi-process jobs where rank-local logs are written separately
How to confirm this is the problem
Use this checklist to test the hypothesis against a small reproduction. No single line proves the root cause, so preserve the preceding events and compare one variable at a time.
- ✓Find the first NCCL WARN line containing nvls.cc and preserve at least 100 preceding lines for the same rank.
- ✓Confirm from NCCL_DEBUG_SUBSYS=GRAPH,NVLS that NCCL selected the NVLS path.
- ✓Repeat one minimal collective with the same ranks, message size, and topology while changing only NCCL_NVLS_ENABLE from automatic selection to 0.
- ✓If the failure follows NVLS, compare stack versions and Fabric Manager or NVSwitch health with a known-good node.
- ✓Require communicator initialization and the same collective to pass after the targeted correction before resuming the job.
Root cause
- The direct failure is an invalid CUDA operation or resource passed while NCCL configures the NVLS multicast path.
- The underlying owner remains one of several possibilities until a control separates software compatibility, NVLS support, resource state, and fabric health.
- A later collective timeout or communicator abort is downstream evidence and should not replace the first NVLS warning in the incident record.
The fix and how to prevent it
How to fix it
- Preserve per-rank logs with NCCL_DEBUG=INFO, NCCL_DEBUG_SUBSYS=INIT,GRAPH,NVLS, and NCCL_DEBUG_FILE=/tmp/nccl_%h_%p.log.
- Run the same minimal collective once with NCCL_NVLS_ENABLE=0. If it succeeds, keep the incident localized to the NVLS path and continue the fabric and stack investigation.
- Record the GPU model, driver, CUDA runtime, NCCL version, Fabric Manager status, and NVSwitch health from both the failing node and a known-good node.
- Use the supported NVIDIA diagnostic path for the platform. Do not permanently disable NVLS or change multiple software versions until one controlled comparison identifies the owner.
Step-by-step remediation
- 1Enable the INIT, GRAPH, and NVLS logging subsystems and keep separate files for every process.
- 2Repeat the same minimal collective with NCCL_NVLS_ENABLE=0 and no other change.
- 3Record driver, CUDA, NCCL, Fabric Manager, GPU, and NVSwitch state on failing and known-good nodes.
- 4Correct the identified software or fabric difference without changing the workload.
- 5Require communicator initialization and the original collective to pass with the intended production NVLS setting.
How to prevent it
- Canary communicator initialization and a production-sized all-reduce after driver, CUDA, NCCL, or Fabric Manager changes.
- Retain rank-specific NCCL logs so the first warning is not lost behind a framework timeout.
- Run NCCL active diagnostics where the deployed NCCL version supports them.
- Treat NCCL_NVLS_ENABLE=0 as a rollback control and document the throughput change before using it as temporary containment.
Save this diagnosis and catch the next crash automatically
All root cause, fix, and prevention steps above are free to read. Create a free account with any email or GitHub to keep your saved diagnosis history across the encyclopedia and run cloud checks, or use a work email below for the 30-day Team evaluation. No card required.
Or start a 30-day free Team trial (work email)
Verified work email unlocks all 14 fleet diagnostic tools, Slack alerts, and team history for 30 days. No card and no automatic charge.
Searchable error signature
transport/nvls.cc:598 NCCL WARN Cuda failure 1 'invalid argument'Use this text as a lookup key in logs and upstream issue trackers. It is not presented as a captured customer log. Confirm the cause from your own preceding events, versions, configuration and the cited references.
Diagnose your own log automatically
The root cause and fix steps above stay free. Create a free account to analyze full job logs, attribute the first failed rank, and keep saved incident history.
Sign up free. Analyze your cluster logsNo credit card. Daily allowance follows verified trust tier. Instant access.
Why the recommended fix works
The NVLS-off control changes one transport decision while keeping the workload and topology fixed. A pass localizes the incident to multicast setup without claiming which NVLS component failed. Version and fabric comparisons then distinguish a software mismatch from unhealthy system state.
Code examples
export NCCL_DEBUG=INFO
export NCCL_DEBUG_SUBSYS=INIT,GRAPH,NVLS
export NCCL_DEBUG_FILE=/tmp/nccl_%h_%p.log
# Run the same minimal collective once as the control
export NCCL_NVLS_ENABLE=0
<same-nccl-test-command>
# Preserve platform state
nvidia-smi -q
systemctl status nvidia-fabricmanagerThis snippet illustrates the entry-specific check. Verify the installed versions, permissions, target and workload context before using it. A command or API example is not proof of recovery.
Best practices by model family
| Model / Stack | Recommendation | Notes |
|---|---|---|
| Evidence capture | Write one NCCL log per host and process | The first NVLS warning and emitting rank carry more causal value than the final framework exception. |
| Diagnostic control | Disable NVLS for one identical replay | A pass localizes the path. It does not by itself justify a permanent production setting. |
| Recovery | Re-enable only after the same collective passes | Verify both correctness and expected bandwidth before returning the node to service. |
With the fix vs without the fix
| Dimension | With the fix | Without the fix |
|---|---|---|
| Failure with NVLS automatic | The same invalid-argument warning recurs | The collective completes with NVLS disabled |
| Interpretation | NVLS path remains implicated | Application-level collective arguments are less likely to be the owner |
| Next discriminator | Compare fabric state and stack versions | Do not stop at the workaround |
Diagnostic note
“Do not label every invalid argument in an NCCL job as an application bug. The file and subsystem in the first warning matter. A warning from transport/nvls.cc should be tested as an NVLS-path failure before changing collective shapes or training code.”
Visual fingerprint
first nvls.cc warning
|
v
same collective, NVLS off
|
+-- passes --> inspect NVLS stack and fabric
+-- fails --> inspect earlier CUDA or application evidence
|
v
repeat after one targeted correctionDiagnose this failure in VS Code
Select the traceback or open the failed terminal, then run Denpex locally to inspect matched failure patterns, supporting evidence and next checks without uploading the log. Verify recommendations against your workload before changing production.
Install the free VS Code extensionNCCL errors in context
An NCCL error can follow an earlier worker failure. The hub connects documented collective errors with their interpretation limits, worker evidence and configuration checks.
Compare related nccl errorsRelated failures to investigate next
Frequently asked questions
Questions engineers and on-call staff commonly ask about this failure.
Does Cuda failure 1 invalid argument prove my collective arguments are wrong?
Should I permanently set NCCL_NVLS_ENABLE=0?
What logs should I collect?
When is the incident resolved?
Don't just read the fix, diagnose your run
The encyclopedia explains documented failure patterns. Denpex investigates your logs, configuration and stack, shows the supporting evidence, and asks for missing details when needed.