TinyChain-Inc / TinyChain-Inc/ha-ndarray

Support bounded streams of Array blocks through CubeCL and fusion

Open
#38 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
3
Forks
2
PR merge metrics
No merged PRs in 30d

Description

Objective

Execute an ordered asynchronous stream of Array blocks through one reusable CubeCL/fusion plan with bounded host/device memory, backpressure, cancellation, and typed per-stream failure behavior.

Contract

Define a public, backend-neutral adapter for a fallible stream of Array blocks. Blocks may vary only along explicitly declared streaming dimensions; dtype/rank/shape violations fail visibly. Preserve input order unless an API explicitly opts into reordering.

Procedure

  1. Specify stream shape/dtype metadata and terminal/error/cancellation semantics.
  2. Plan and compile compatible operations once, then reuse the plan across blocks.
  3. Bound in-flight blocks, host buffers, device allocations, and compilation work.
  4. Overlap transfer/compute only when the runtime supports it and ordering remains correct.
  5. Release buffers promptly on cancellation, downstream drop, or error.

Acceptance criteria

  • A stream larger than device memory completes with bounded measured peak allocation.
  • Backpressure prevents unbounded buffering when the consumer is slow.
  • Fused plans are reused across compatible blocks without recompiling each block.
  • Ordering, partial-progress, cancellation, upstream/downstream error, and cleanup tests pass.
  • Incompatible block metadata returns a typed error naming the offending block.
  • Results match equivalent sequential Array execution.

Parent: #33

Tembo-sized implementation issues

  • #48 — ordered Array-block stream contract and bounded backpressure
  • #49 — fused CubeCL block-stream execution and memory validation

Dependency order: #48 plus accepted fusion #47 → #49. Host sequential execution remains the result oracle.

Tembo program boundary

This parent is a non-executable acceptance rollup. Tembo must be assigned to the child issues, and may not close this issue from a child PR.

automation:
  eligible: false
  executor_profile: tembo
  readiness: rollup
  primary_repository: TinyChain-Inc/ha-ndarray
  base_branch: main
  writable_scope: []
  prerequisites: ["#48", "#49"]
  concurrency_group: cubecl-stream-rollup
  required_commands: []
  external_actions: none
  draft_pr_only: true
  completion_authority: human

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

This is a non-executable acceptance rollup; start by reading child issues #48 and #49, then review the host sequential execution used as the result oracle. The work is done when the child contracts and fused CubeCL execution satisfy the listed bounded-memory, backpressure, ordering, error, cancellation, cleanup, and equivalence tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
hpc
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.