Skip to content

[Draft] Redmule platform#67

Draft
runwangdl wants to merge 9 commits intopulp-platform:develfrom
runwangdl:redmule_platform
Draft

[Draft] Redmule platform#67
runwangdl wants to merge 9 commits intopulp-platform:develfrom
runwangdl:redmule_platform

Conversation

@runwangdl
Copy link
Copy Markdown
Contributor

@runwangdl runwangdl commented May 8, 2025

Redmule Platform
(Rebased on Picolib imf PR and CCT optim PR)

Added

  • Redmule Platform, Engine, Tiler, Deployer, Binding
  • Matmul with Redmule tileConstraint, template, kernel
  • Conv Im2col with Redmule tileConstraint, template, kernel
  • Pass for Conv im2col weighttranspose

PR Merge Checklist

  1. The PR is rebased on the latest devel commit and pointing to devel.
  2. Your PR reviewed and approved.
  3. All checks are passing.
  4. The CHANGELOG.md file has been updated.
  5. If the docker was modified, change back its link after review.

@runwangdl runwangdl force-pushed the redmule_platform branch 3 times, most recently from 985a645 to 9ef9cc2 Compare May 9, 2025 14:05
@Victor-Jung Victor-Jung added Feature Addition of new features Milestone labels May 18, 2025
@Victor-Jung Victor-Jung removed this from Deeploy May 22, 2025
@Xeratec Xeratec added this to Deeploy May 22, 2025
@Xeratec Xeratec added this to the Release 0.2.0 milestone May 22, 2025
@Xeratec Xeratec removed the Milestone label May 22, 2025
@Victor-Jung Victor-Jung moved this to In review in Deeploy May 22, 2025
@Victor-Jung Victor-Jung moved this from In review to In progress in Deeploy Jun 19, 2025
@Xeratec Xeratec modified the milestones: Release xxx, Release 0.3.0 Nov 19, 2025
Minimal port of RedMulE-platform code from the user's redmule_platform
branch (which had accumulated unrelated CCT_Optim merges) onto a clean
devel base.

What landed:
- New target Deeploy/Targets/Redmule/ (Platform, Engine, Deployer,
  Bindings, Parsers, Tiler, Templates, TileConstraints,
  TopologyOptimizationPasses).
- FP32 RedMulE matmul kernel TargetLibraries/PULPOpen/src/Matmul_fp32_Redmule.c
- Test runner DeeployTest/testRunner_tiled_siracusa_w_redmule.py plus
  Float test fixtures (testFloat{Matmul,MatmulLarge,MatmulLarge256,2DConvolution,2dConvLarge,GEMM,GEMMtransB}).
- Wiring in platformMapping.py, top-level CMakeLists.txt,
  DeeployTest/CMakeLists.txt, TargetLibraries/PULPOpen/CMakeLists.txt.
- Makefile: GVSOC_COMMIT_HASH points at runwangdl/gvsoc fork 35d00d1
  (carries the light_redmule vendored copy + Siracusa cluster wiring).

Fixes / portings required for devel compatibility:
- Deeploy/Targets/PULPOpen/Templates/FloatGemmTemplate.py: define
  float32_tPtr locally (unresolved import left on devel).
- Deeploy/Targets/Redmule/TopologyOptimizationPasses/Passes.py: switch
  from the retired _permuteLastTwoDims / _appendTransposeNode helpers
  to upstream's _appendTranspose.
- Add empty __init__.py to Targets/{Chimera,Redmule,SoftHier}.

What intentionally did NOT land:
- CCT_Optim-era edits to PULPOpen Templates (Add/Conv/GELU/Layernorm/
  MatMul/MaxPool/Relu/Softmax), Generic Layers.py computeOps, CCT test
  suites, parallel/unroll rewrites.
- Buggy -march=rv32imc inside meson-build-script-rv32imf.txt.
- Hard-to-merge edits to DeeployTest/Platforms/Siracusa/src/deeploytest.c.
- The old-style .github/workflows/TestRunnerTiledSiracusaWithRedmule.yml;
  new-style ci-platform-siracusa-redmule-tiled.yml TBD.

Verified end-to-end: testFloatMatmul on GVSoC (runwangdl/gvsoc@35d00d1,
pulp submodule @ 371772c) passes with 'Errors: 0 out of 256'.
The Tests/ directory layout on devel was reorganized into Kernels/,
Models/, Others/ subdirectories. Drop the flat-path Float test inputs
ported from redmule_platform; they'll be re-added under the new
structure in a follow-up.
Mirrors the neureka-tiled pattern:
- DeeployTest/test_siracusa_redmule_tiled_config.py with empty
  L2_{SINGLE,DOUBLE}BUFFER_KERNELS dicts (to be populated once Float
  kernel test fixtures land under Tests/Kernels/Float/).
- conftest.py: register 'siracusa_redmule_tiled' pytest marker.
- test_platforms.py: two parametrized test functions (L2 single- and
  double-buffer) for the redmule platform.
- .github/workflows/_runner-siracusa-redmule-tiled.yml: reusable runner
  mirroring _runner-siracusa-neureka-tiled.yml.
- .github/workflows/ci-platform-siracusa-redmule-tiled.yml: top-level
  trigger, defaults to ghcr.io/runwangdl/deeploy:redmule Docker image.

With empty configs the tests collect and skip cleanly (pytest 'got
empty parameter set'). No wmem variants since RedMulE does not use
Neureka weight memory.
- yapf / isort / autoflake / trailing-whitespace across the Redmule
  Python target and platformMapping wiring.
- clang-format over TargetLibraries/PULPOpen/src/Matmul_fp32_Redmule.c.
- Add SPDX/license header to Matmul_fp32_Redmule.c (reuse hook).
The GAP9 CI uses ghcr.io/pulp-platform/deeploy-gap9:devel, which is
only pullable with pulp-platform org credentials. On a fork the job
fails at 'Initialize containers'. Add github.repository_owner guard
so forks skip the jobs cleanly.
The docs workflow publishes to gh-pages, which on a fork races with
external pushes and lacks origin remote setup. Gate on
github.repository_owner == 'pulp-platform' so only upstream publishes.
Point the redmule tiled CI config at existing upstream FP32 kernel
test fixtures under Tests/Kernels/FP32/GEMM (Regular, TransB). Both
single-buffer and double-buffer variants verified locally end-to-end
on GVSoC (Errors: 0 / 256, runtime ~4k cycles).
Without this fallback _select-env.yml resolves to the upstream
pulp-platform/deeploy:devel image, which ships a GVSoC build that
does not include the light_redmule model — the redmule test runner
then hangs. Point the default at the fork's custom image so push
events get the correct GVSoC build.
ghcr.io/runwangdl/deeploy:redmule is a private package; add
credentials block using the workflow's GITHUB_TOKEN so the runner
container step can pull it.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Feature Addition of new features

Projects

Status: In progress

Development

Successfully merging this pull request may close these issues.

3 participants