TinyChain-Inc / TinyChain-Inc/ha-ndarray
[Fusion][F2] Implement fusion legality, CubeCL lowering, and bounded plan cache
Open
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 3
- Forks
- 2
- PR merge metrics
- No merged PRs in 30d
Description
Objective
Fuse compatible IR subgraphs at runtime, lower them to CubeCL kernels, and cache compiled plans with deterministic keys and bounded storage.
Acceptance criteria
- A documented legality table covers operations, layouts, broadcasting, aliases, devices, errors and materialization boundaries.
- A representative chain of at least three compatible operations dispatches one kernel.
- Fused/unfused differential and property tests agree for results and typed failures.
- Unsupported or illegal graphs visibly fall back to unfused execution.
- Plan keys include graph, shape/dtype specialization, runtime/device capabilities, CubeCL/compiler versions and relevant options.
- Hits, misses, compile time, eviction, invalidation and fallback are observable; memory/disk growth is bounded.
- Fusion can be disabled to provide an independent oracle.
Parent: #37
Tembo execution contract
automation:
eligible: true
executor_profile: tembo
readiness: blocked
primary_repository: TinyChain-Inc/ha-ndarray
base_branch: main
writable_scope:
- src/fusion/**
- src/ir/**
- src/cubecl/**
- tests/fusion/**
- benches/**
prerequisites:
- "#50 designated accelerator validation lane"
- "#46"
- "#42"
- "#43"
concurrency_group: array-fusion-runtime
required_commands:
- "cargo fmt --all -- --check"
- "cargo test --no-default-features --features cubecl"
- "cargo test --all-features"
evidence:
cpu_conformance: required
accelerator_conformance: required-on-designated-runner
actual_browser: not-required
benchmark_report: required
exact_hardware_and_driver_identity: required
external_actions: none
draft_pr_only: true
completion_authority: human
budget:
size: large
max_revisions: 3
max_wall_minutes: 180
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading the existing code under src/fusion/, src/ir/, and src/cubecl/, then inspect tests/fusion/ and the required Cargo test commands. The acceptance criteria define done: legal chains fuse and lower to one kernel, illegal graphs fall back, differential tests agree, plan-cache behavior is observable and bounded, and fusion can be disabled; work is currently blocked on #50, #46, #42, and #43.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- backend, compilers, performance, testing
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100