feat(a5): add URMA deferred completion demo for tensormap_and_ringbuffer - #1421
Conversation
📝 WalkthroughWalkthroughAdds a two-rank URMA deferred-completion demo with asynchronous producer and tiled consumer AICore kernels, orchestration that chains both tasks, and an A5 Python smoke test with pytest and CLI execution paths. ChangesURMA deferred completion workflow
Estimated code review effort: 4 (Complex) | ~45 minutes Sequence Diagram(s)sequenceDiagram
participant Orchestration
participant ProducerKernel
participant URMA
participant ConsumerKernel
Orchestration->>ProducerKernel: submit input and CommContext
ProducerKernel->>URMA: submit asynchronous peer TGET
URMA-->>ProducerKernel: transfer data to intermediate tensor
Orchestration->>ConsumerKernel: submit intermediate tensor
ConsumerKernel->>ConsumerKernel: add 1.0 to each tile
ConsumerKernel-->>Orchestration: write final result
Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Code Review
This pull request introduces a new URMA deferred completion demo and smoke test for the a5 platform, consisting of a producer kernel initiating asynchronous TGET operations, a consumer kernel processing the data, orchestration logic, and a Python validation test. Feedback is provided regarding the orchestration argument validation, which should explicitly verify the counts of tensors and scalars separately to prevent potential out-of-bounds access.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
There was a problem hiding this comment.
🧹 Nitpick comments (1)
examples/a5/tensormap_and_ringbuffer/urma_deferred_completion_demo/test_urma_deferred_completion_demo.py (1)
67-67: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low valuePrefer iterable unpacking over list concatenation.
Static analysis (Ruff RUF005) flags this concatenation pattern.
🧹 Proposed fix
- extra_includes = list(include_dirs) + [str(kc.project_root / "src" / "common")] + extra_includes = [*include_dirs, str(kc.project_root / "src" / "common")]🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@examples/a5/tensormap_and_ringbuffer/urma_deferred_completion_demo/test_urma_deferred_completion_demo.py` at line 67, Update the extra_includes assignment to use iterable unpacking instead of list concatenation, preserving the existing include_dirs entries followed by the common source directory path and satisfying Ruff RUF005.Source: Linters/SAST tools
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In
`@examples/a5/tensormap_and_ringbuffer/urma_deferred_completion_demo/test_urma_deferred_completion_demo.py`:
- Line 67: Update the extra_includes assignment to use iterable unpacking
instead of list concatenation, preserving the existing include_dirs entries
followed by the common source directory path and satisfying Ruff RUF005.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 14602917-7590-4feb-b6b9-227af6c7909e
📒 Files selected for processing (4)
examples/a5/tensormap_and_ringbuffer/urma_deferred_completion_demo/kernels/aiv/kernel_consumer.cppexamples/a5/tensormap_and_ringbuffer/urma_deferred_completion_demo/kernels/aiv/kernel_urma_tget_async.cppexamples/a5/tensormap_and_ringbuffer/urma_deferred_completion_demo/kernels/orchestration/urma_deferred_completion_orch.cppexamples/a5/tensormap_and_ringbuffer/urma_deferred_completion_demo/test_urma_deferred_completion_demo.py
d26c1c8 to
9900a03
Compare
- Add a minimal two-rank URMA TGET deferred-completion example - Reuse the SDMA demo structure with one producer and one consumer - Keep the pytest path skipped unless SIMPLER_ENABLE_PTO_URMA_WORKSPACE is enabled
9900a03 to
29c3579
Compare
Summary
examples/a5/tensormap_and_ringbuffer/urma_deferred_completion_demoDetails
This demo mirrors the existing SDMA deferred-completion smoke test shape, but uses the URMA backend:
UrmaTgetfrom the peer rank's input window into localoutoutand computesresult = out + 1outandresultagainst the peer inputThe pytest case skips unless
SIMPLER_ENABLE_PTO_URMA_WORKSPACEis enabled, so the demo can land before CI enables the URMA workspace overlay by default.Testing
python3 -m py_compile examples/a5/tensormap_and_ringbuffer/urma_deferred_completion_demo/test_urma_deferred_completion_demo.pySIMPLER_ENABLE_PTO_URMA_WORKSPACE=OFF .venv/bin/python -m pytest -q examples/a5/tensormap_and_ringbuffer/urma_deferred_completion_demo/test_urma_deferred_completion_demo.py->1 skippedSIMPLER_ENABLE_PTO_URMA_WORKSPACE=ON PTO_ISA_ROOT=/home/hdy/simpler/build/pto-isa python examples/a5/tensormap_and_ringbuffer/urma_deferred_completion_demo/test_urma_deferred_completion_demo.py -p a5 -d 0,1->max_out=0.000e+00 max_result=0.000e+00on both ranks