Skip to content

feat: testbench core infrastructure (PLENAProgram, DeveloperCompiler, SubMatrixManager)#4

Open
booth-algo wants to merge 1 commit intomainfrom
kev/aten-testbench
Open

feat: testbench core infrastructure (PLENAProgram, DeveloperCompiler, SubMatrixManager)#4
booth-algo wants to merge 1 commit intomainfrom
kev/aten-testbench

Conversation

@booth-algo
Copy link
Copy Markdown
Collaborator

@booth-algo booth-algo commented Mar 31, 2026

Summary

3-layer compilation stack for generating PLENA ISA from high-level tensor operations:
(Developed by @gaoziqian123)

  • PLENAProgram (1.5k lines): tensor proxy API, HBM auto-allocation, scoped naming, @ operator overloading
  • DeveloperCompiler (2.7k lines): register allocation, ISA string emission, ASM template invocation
  • SubMatrixManager (2k lines): VRAM/MRAM/HBM memory layout, sub-block addressing, virtual memory allocators

Supporting infrastructure:

  • symbol_table.py — tensor metadata tracking
  • config_utils.py — plena_settings.toml read/write
  • emulator_runner.py — build + run emulator, compare against golden
  • check_mem.py — VRAM/golden comparison with allclose metrics
  • Rust emulator: new opcodes (V_SHFT_V, H_STORE_V_PART)
  • justfile: test recipes for all operator tests
  • CLAUDE.md: project context + CI check instructions

Architecture

PLENAProgram (tensor proxy API, HBM allocation)
  → DeveloperCompiler (register allocation, ISA emission)
    → SubMatrixManager (VRAM/MRAM/HBM memory layout)
      → ISA code string

Test plan

⚠️ nix-build CI fails due to pre-existing DNS issue. Unrelated to this PR.

…ler, SubMatrixManager)

3-layer compilation stack for generating PLENA ISA from high-level ops:
- PLENAProgram: tensor proxy API, HBM auto-allocation, scoped naming
- DeveloperCompiler: register allocation, ISA string emission, ASM templates
- SubMatrixManager: VRAM/MRAM/HBM memory layout, sub-block addressing

Supporting infrastructure:
- symbol_table, config_utils, emulator_runner, check_mem
- Rust emulator: new opcodes (V_SHFT_V, H_STORE_V_PART)
- justfile: test recipes for all operator tests
- CLAUDE.md: project context + CI check instructions

Co-Authored-By: Ziqian Gao <zg1223@ic.ac.uk>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant