-
Notifications
You must be signed in to change notification settings - Fork 33
Description
A5 Platform Limitations
Issue 1: pipe_barrier(PIPE_V) Not Supported in A5 AIV Kernels
Symptom
Using pipe_barrier(PIPE_V) in AIV kernels fails to compile/run on A5 platform.
Error Message
When compiling pipe_barrier(PIPE_V) targeting dav-c310-vec:
error: the range of 1st parameter must be [4, 6]
pipe_barrier(PIPE_V);
^
Root Cause
A5 AIV (dav-c310-vec) restricts pipe_barrier parameter range to [4, 6], while PIPE_V = 1 is outside this range.
Evidence
Declaration
pipe_barrier is declared in:
/usr/local/Ascend/cann-9.0.0/tools/bisheng_compiler/lib/clang/15.0.5/include/cce_aicore_intrinsics_3101.h
as a clang_builtin_alias mapping to the compiler builtin __builtin_cce_pipe_barrier:
__attribute__((clang_builtin_alias(__builtin_cce_pipe_barrier))) void pipe_barrier(...);
Compiler Diagnostic Template
The range constraint is enforced inside the compiler binary:
/usr/local/Ascend/cann-9.0.0/tools/bisheng_compiler/bin/ccec
Extracted via strings ccec | grep "range of":
the range of %ordinal0 * %ordinal1 parameters must be %2
When targeting dav-c310-vec, the compiler applies ImmRange(4, 6) to the first parameter of __builtin_cce_pipe_barrier.
Affected PIPE Types
| PIPE Type | Value | A2/A3 | A5 |
|---|---|---|---|
PIPE_S |
0 | ✅ | ❌ |
PIPE_V |
1 | ✅ | ❌ |
PIPE_MTE1 |
2 | ✅ | ❌ |
PIPE_MTE2 |
3 | ✅ | ✅ |
PIPE_MTE3 |
4 | ✅ | ✅ |
PIPE_M |
5 | ✅ | ✅ |
PIPE_ALL |
6 | ✅ | ✅ |
Solution
Remove pipe_barrier(PIPE_V) calls as A5 hardware provides ordering guarantees natively.
Note: PIPE_V remains valid in set_flag/wait_flag, only pipe_barrier is restricted.
Related Commit
PR229(#229) for all affected kernel code.
Issue 2: --enable-profiling Not Supported on A5 Platform
Symptom
Running with --enable-profiling flag fails on A5 platform:
[ERROR] initialize: Memory registration failed: 8
[ERROR] run: init_performance_profiling failed: 8
[ERROR] TEST FAILED: launch_runtime failed: 8Root Cause
A5 runs in vAscend virtualization environment, which does not support host-device shared virtual memory (SVM) mapping.
Evidence:
- Kernel modules:
drv_vascend+vfioindicate virtualization - CANN documentation states:
HOST_SVM_MAP_DEV don't support in virt machine halHostRegister()returns error code 8 (memory registration failed)
Comparison
| Environment | A2/A3 | A5 |
|---|---|---|
| Deployment | Bare-metal servers | vAscend virtualization |
| SVM Support | ✅ | ❌ |
| Profiling | ✅ | ❌ |
Impact
- PerformanceCollector initialization fails
- Performance data collection completely unavailable
- Basic runtime functionality unaffected (works without
--enable-profiling)
Workaround
Do not use --enable-profiling flag on A5 platform.