This directory contains tests and demos for TileXR UDMA registered-memory communication.
UDMA means UnifiedBus DMA. It is based on Huawei's UnifiedBus interconnect. In TileXR, the UDMA test path currently targets A5 hardware, identified in this repository as Ascend950 / 950. It is not expected to work on 910B, 310P, or other non-A5 devices.
Current recommended validation focuses on TileXR-owned APIs:
- host registration of ordinary device memory with
TileXRUDMARegister; - device-side registered-memory access through
tilexr_udma.h; - all-gather style UDMA put;
- UDMA put with signal;
- registry layout and remote-address calculation.
- TileXR
src/commsources do not include or link shmem.
There is no standalone shmem API test in this tree. TileXR UDMA validation should go through TileXR APIs and the registered-memory demo.
tests/udma/
├── CMakeLists.txt
├── build.sh
├── run_tests.sh
├── unit/
│ ├── test_tilexr_udma_registry.cpp
│ └── test_tilexr_udma_transport_layout.cpp
├── integration/
│ └── test_tilexr_udma.cpp # TileXR communicator smoke test
└── demo/
├── tilexr_udma_demo.cpp # host demo, no shmem.h dependency
├── tilexr_udma_demo_kernel.cpp # AICore UDMA put / put-signal demo
├── run_tilexr_udma_demo.sh
├── README.md
└── ASCEND_VERIFICATION.md
Use an A5 / Ascend950 / 950 machine for runtime validation.
npu-smi infoExpected:
- the machine has real Ascend950-class devices;
- at least 2 devices are available for the communication demo;
- CANN and the Ascend driver are installed and visible to
scripts/common_env.sh.
Non-A5 devices may still compile parts of the test tree, but they are not valid targets for UDMA runtime validation.
Build TileXR first:
cd /path/to/TileXR
source scripts/common_env.sh
cmake -S . -B /tmp/tilexr-build-udma -DCMAKE_INSTALL_PREFIX="$PWD/install"
cmake --build /tmp/tilexr-build-udma --target tile-comm -j"$(nproc)"
cmake --install /tmp/tilexr-build-udmaThen build UDMA tests and the demo:
cd /path/to/TileXR/tests/udma
bash build.shExpected useful artifacts:
test -x install/bin/test_tilexr_udma_registry
test -x install/bin/test_tilexr_udma_transport_layout
test -x install/bin/test_tilexr_udma
test -x install/bin/tilexr_udma_demo
test -f install/lib/libtilexr_udma_demo_kernel.soIf bisheng is unavailable, the host-only tests may still build while the AICore demo is skipped.
These are host-only checks for registered-region metadata and UDMA info layout.
cd /path/to/TileXR/tests/udma
./install/bin/test_tilexr_udma_transport_layout
./install/bin/test_tilexr_udma_registryExpected:
TileXR UDMA transport layout checks passed
TileXR UDMA registry checks passed
This confirms TileXR communicator setup and CommArgs access. It does not prove data-plane UDMA transfer.
cd /path/to/TileXR/tests/udma
source ../../scripts/common_env.sh
export LD_LIBRARY_PATH="$PWD/install/lib:../../install/lib:${LD_LIBRARY_PATH:-}"
RANK=0 RANK_SIZE=1 ./install/bin/test_tilexr_udmaExpected:
- exit code 0;
TileXRCommInitRankLocal should succeed;TileXRGetCommArgsHost should succeed;Failed: 0.
Run on an A5 / Ascend950 machine with at least two usable devices:
cd /path/to/TileXR/tests/udma
bash demo/run_tilexr_udma_demo.sh 0 2 16 2 0Expected:
- every rank exits with code 0;
- every rank log contains
TileXR UDMA demo success; - every rank log contains
TileXRUDMARegister success; - result samples include
seg0=1000 seg1=1001; - no log contains
DATA MISMATCH,ERROR, orTileXR UDMA demo failed.
cd /path/to/TileXR/tests/udma
bash demo/run_tilexr_udma_demo.sh 1 2 16 2 0Expected:
- every rank exits with code 0;
- every rank log contains
TileXR UDMA demo success; - signal values are printed;
- non-local signal entries equal
1000; - no log contains
expected non-local signals,DATA MISMATCH,ERROR, orTileXR UDMA demo failed.
latest=$(ls -td logs/tilexr_udma_demo_* | head -n1)
grep -R "TileXR UDMA demo success" "$latest"
grep -R "TileXRUDMARegister success" "$latest"
grep -R "DATA MISMATCH\\|expected non-local signals\\|TileXR UDMA demo failed\\|ERROR" "$latest" || true- Demo host code must not include
shmem.hor call shmem host APIs. - TileXR comm initialization must not include or link shmem.
- Device kernels should use TileXR wrappers from
tilexr_udma.h. - UDMA buffers in the demo are ordinary
aclrtMallocallocations registered withTileXRUDMARegister. - Current runtime validation is hardware-dependent. A CANN-only environment without real A5 devices can verify compilation, but not UDMA transfer.