Add: test_vector_example.py for a5 tensormap_and_ringbuffer#727
Add: test_vector_example.py for a5 tensormap_and_ringbuffer#727ChaoZheng109 merged 1 commit intohw-native-sys:mainfrom
Conversation
Mirror of the a2a3 version; only difference is platforms field uses ["a5sim", "a5"] instead of ["a2a3sim", "a2a3"].
There was a problem hiding this comment.
Code Review
This pull request introduces a new test case, TestVectorExample, for the tensormap-and-ringbuffer runtime, implementing the calculation f = (a+b+1)*(a+b+2) + (a+b). A review comment suggests reducing the block_dim from 3 to 1, as the current orchestration logic does not appear to support data partitioning, which could lead to redundant execution or race conditions for the 128x128 tile size.
| { | ||
| "name": "default", | ||
| "platforms": ["a5sim", "a5"], | ||
| "config": {"aicpu_thread_num": 4, "block_dim": 3}, |
There was a problem hiding this comment.
The block_dim is set to 3, but the orchestration logic in example_orchestration.cpp and the associated kernels do not appear to implement any data partitioning or parallelization across multiple blocks. For a single-tile operation of size 128x128, block_dim should be set to 1 to avoid redundant execution and potential race conditions when writing to the output tensor.
| "config": {"aicpu_thread_num": 4, "block_dim": 3}, | |
| "config": {"aicpu_thread_num": 4, "block_dim": 1}, |
Summary
test_vector_example.pyfor a5tensormap_and_ringbufferruntimeplatformsfield uses["a5sim", "a5"]instead of["a2a3sim", "a2a3"]Testing
a5sim)a5)Related Issues
N/A
Co-Authored-By: Claude Sonnet 4.6 noreply@anthropic.com