Commit 78a05d4
fix(redmule): unmap Conv from RedMulE engine; drop weight-layout pass
The Siracusa+RedMulE training CI on 1782a88 got past Python codegen but
failed at link time:
ld.lld: error: undefined symbol:
Conv2d_Im2Col_fp32_fp32_fp32_HWC_8_Redmule
>>> referenced by TrainingNetwork.c:5386 in
_node_1_tokenizer_..._Conv_cluster_fork
The original RedMulE PR (pulp-platform/Deeploy#67) shipped only the
matmul kernel TargetLibraries/PULPOpen/src/Matmul_fp32_Redmule.c. The
ConvTemplate references a `Conv2d_Im2Col_..._8_Redmule` kernel that has
no corresponding source in the tree, and 67b754b already deleted the
testFloat2DConvolution / testFloat2dConvLarge fixtures that would have
exercised the Redmule Conv path. So the Conv binding has always been
load-bearing only for non-test models like CCT_train, and on those it
breaks the link.
Two coupled changes route Conv through the existing PULPClusterEngine
(which has a working PULP_Conv2d_Im2Col_fp32_fp32_fp32_HWC):
- Drop 'Conv' from RedmuleMapping. Without it Conv falls through to
the second engine in RedmulePlatform's engine list (PULPCluster).
- Drop RedMuleAdjustWeightMemoryLayoutPass from the lowering passes.
That pass transposed Conv weights from [F,H,W,Cin] to [H,W,Cin,F]
for the RedMulE accelerator's expected layout; once Conv is on the
PULPCluster engine, PULP expects [F,H,W,Cin] and the pre-applied
transpose makes Tiling produce out-of-bounds tile rectangles
(locally repro'd: AssertionError "Rectangle offset should be zero
when the dimensions are the same. Received rectangle
HyperRectangle(offset=(3, 0, 0, 0), dims=(3, 3, 3, 32))" in
TilingCodegen.minimizeRectangle).
Both are clearly marked in-source as "restore when the RedMulE Conv
kernel lands." Locally validated end-to-end:
- testMVPTraining.py -> exit 0 (TrainingNetwork.c emits
PULP_Conv2d_Im2Col_fp32_fp32_fp32_HWC for the tokenizer Conv).
- testMVPOptimizer.py -> exit 0.
Matmul / Gemm continue to bind to RedMulE as before.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 1782a88 commit 78a05d4
2 files changed
Lines changed: 19 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
33 | | - | |
34 | | - | |
| 33 | + | |
35 | 34 | | |
36 | 35 | | |
37 | 36 | | |
| |||
50 | 49 | | |
51 | 50 | | |
52 | 51 | | |
53 | | - | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
54 | 60 | | |
55 | 61 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
42 | | - | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
43 | 52 | | |
44 | 53 | | |
45 | 54 | | |
| |||
0 commit comments