Skip to content

feat(vpto-bridge): add whitelist-driven pipe family C++ bridge - #1364

Open
kuri780 wants to merge 2 commits into
hw-native-sys:mainfrom
kuri780:feature/vpto-pipe-bridge
Open

feat(vpto-bridge): add whitelist-driven pipe family C++ bridge#1364
kuri780 wants to merge 2 commits into
hw-native-sys:mainfrom
kuri780:feature/vpto-pipe-bridge

Conversation

@kuri780

@kuri780 kuri780 commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

Introduces the VPTO C++ template bridge: pipe family ops (pto.initialize_l2l_pipe, pto.tpush, pto.tpop, pto.tfree) are routed by a YAML whitelist and lowered to calls of generated pto-isa C++ wrapper templates, compiled in-compiler to cube/vector bitcode and merged into the output fatobj.

  • Whitelist resolution chain: pass option -> PTOAS_VPTO_BRIDGE_WHITELIST env var -> built-in default (pipe family)
  • Declarative channel infra (PTO_EnumTokenAttr interface) kept for future tile-op families
  • New passes: PTOLowerPipeFamilyOps, PTOLowerDeclarativeBridgeOps, VPTOBridgeLowering, VPTOBridgeWrapperGen
  • VPTOBridgeTokens: IR-fact -> fully qualified pto-isa C++ spelling mapping
  • ObjectEmission compiles the wrapper and llvm-links it into the fatobj
  • Lit tests for whitelist validation, family/declarative lowering and wrapper rendering; e2e pipe kernel case under test/vpto/cases/kernels

kuri780 and others added 2 commits August 27, 2026 12:57
Introduces the VPTO C++ template bridge: pipe family ops
(pto.initialize_l2l_pipe, pto.tpush, pto.tpop, pto.tfree) are routed by a
YAML whitelist and lowered to calls of generated pto-isa C++ wrapper
templates, compiled in-compiler to cube/vector bitcode and merged into the
output fatobj.

- Whitelist resolution chain: pass option -> PTOAS_VPTO_BRIDGE_WHITELIST
  env var -> built-in default (pipe family)
- Declarative channel infra (PTO_EnumTokenAttr interface) kept for future
  tile-op families
- New passes: PTOLowerPipeFamilyOps, PTOLowerDeclarativeBridgeOps,
  VPTOBridgeLowering, VPTOBridgeWrapperGen
- VPTOBridgeTokens: IR-fact -> fully qualified pto-isa C++ spelling mapping
- ObjectEmission compiles the wrapper and llvm-links it into the fatobj
- Lit tests for whitelist validation, family/declarative lowering and
  wrapper rendering; e2e pipe kernel case under test/vpto/cases/kernels

Co-Authored-By: Claude <noreply@anthropic.com>
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