Skip to content

Trn2: eager index_add_ with a >4 GiB fp32 source fails (execution timeout, DMA abort TX_DATA_AXI_TIMEOUT_ERROR); correct at 2.35e9 bytes #1503

In review

Description

@scttfrdmn

Summary: on Trn2, eager Tensor.index_add_(0, idx, src) on neuron with a 4.7e9-byte fp32 src hits a runtime execution timeout and a DMA abort, TX_DATA_AXI_TIMEOUT_ERROR (FATAL-RT-UNDEFINED-STATE). The same call with a 2.35e9-byte src is correct, with max relative error 2.7e-7 against fp64. In an earlier run inside a larger harness, the same shape raised NRT status 1203 ("DMA engine unrecoverable error").

Environment: trn2.3xlarge, Deep Learning AMI Neuron torch-neuronx 2.14.0 (Ubuntu 24.04) SDK 2.33.1, torch-neuronx 2.14.3, neuronx-cc 2.28.7631, runtime 2.35.33, LNC=2, one logical core.

Reproduction (python index_add_large_repro.py E F N):

import sys, numpy as np, torch, torch_neuronx  # noqa: F401
E, F, N = int(sys.argv[1]), int(sys.argv[2]), int(sys.argv[3])
rng = np.random.default_rng(0)
src = torch.from_numpy(rng.standard_normal((E, F), dtype=np.float32))
idx = torch.from_numpy(rng.integers(0, N, size=E, dtype=np.int64))
ref = torch.zeros(N, F, dtype=torch.float64).index_add_(0, idx, src.double()).float()
dst = torch.zeros(N, F).to("neuron").index_add_(0, idx.to("neuron"), src.to("neuron"))
got = dst.cpu()
print(f"E={E} F={F} N={N} src_bytes={E*F*4:.3e} max_rel_err={((got-ref).abs().max()/ref.abs().max()).item():.3e}")
  • 114688 5120 4096: src_bytes=2.349e+09 max_rel_err=2.682e-07 (correct).
  • 229376 5120 4096, src_bytes=4.70e9, fails with:
ERROR TDRV:exec_request_process_errors (FATAL-RT-UNDEFINED-STATE) [ND 0][NC 0] execution timeout (30000 ms) on model module.neff, waiting for execution completion notification
ERROR TDRV:exec_print_instruction_pointers [ND 0][NC 0] Instruction pointers [physical (neff)]: Tensor 0x5c0591140 () Scalar 0x5c0571200 () GPSIMD 0x122001140 (7) Vector 0x5c0589200 () Sync 0x5c05a1000 ()
ERROR TDRV:print_dma_abort_matrix Runtime DMA Abort Detected for Engines:
|0 |0 |1 |0 |qActDynamicHW_1 |TX_DATA_AXI_TIMEOUT_ERROR|n/a |

Both logical cores of the LNC=2 pair report the timeout. This looks related to the earlier > 4 GiB DMA issues (#1457, #1459), since the source here is above 2³² bytes.

Context: MLIP graph message aggregation, MACE-style, 4096 atoms × 5120 features. A custom NKI segment-sum kernel handles the same shape correctly in one launch.

Activity

  1. github-actions commented on Nov 25, 2026

    @github-actions

    Hi @scttfrdmn, Thank you for filing the issue! We will take a look and get back to you.

  2. added
    bug
    on Nov 25, 2026
  3. ahoffman-aws commented on Nov 25, 2026

    @ahoffman-aws
    Contributor

    The team reproduced the issue related to memory spans of 4 GB or more on SDK 2.33.1 and are planning to fix in a future release

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Trn2bugtraining

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions