TinyChain-Inc / TinyChain-Inc/ha-ndarray
[CubeCL][P1.1] Implement runtime, device, buffer, transfer, and constructor foundation
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 3
- Forks
- 2
- PR merge metrics
- No merged PRs in 30d
Description
Objective
Implement the reusable CubeCL runtime foundation beneath Array: runtime/device discovery, typed buffers, allocation ownership, host↔device transfer, constructors, and typed unsupported-device/resource errors.
Scope
- CubeCL runtime/client ownership and deterministic backend selection.
- Buffer shape/dtype/layout metadata and allocation lifetime.
- Host upload/download and zero/one/range-style constructors currently supported by the public API.
- Explicit memory accounting hooks and safe cleanup.
- Shared conformance fixtures against host behavior.
Acceptance criteria
- CPU runtime passes constructors and host round-trip fixtures for all supported dtypes/shapes.
- A designated accelerator passes the same fixtures without changing public
Arraysemantics. - Zero-size, overflow, allocation failure, device unavailable/lost, transfer failure and drop cleanup are typed and tested.
- Device selection never silently claims acceleration after falling back.
- Allocation/transfer evidence exposes bytes, device identity and cleanup without leaking raw data.
- No OpenCL code is removed.
Parent: #35
Tembo execution contract
automation:
eligible: true
executor_profile: tembo
readiness: blocked
primary_repository: TinyChain-Inc/ha-ndarray
base_branch: main
writable_scope:
- src/cubecl/runtime/**
- src/cubecl/buffer/**
- src/cubecl/constructors/**
- src/platform.rs
- src/buffer.rs
- tests/conformance/**
prerequisites:
- "#50 designated accelerator validation lane"
- "#34 accepted HAL/runtime contract"
concurrency_group: cubecl-runtime-buffer
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: not-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
Read the prerequisites in #50 and #34 before starting, then inspect src/cubecl/runtime/, src/cubecl/buffer/, src/cubecl/constructors/, src/platform.rs, src/buffer.rs, and tests/conformance/. Run the listed Cargo format and test commands after the runtime contract is available. Done means CPU and designated-accelerator conformance pass, typed failure and cleanup cases are tested, and evidence reports device and allocation details without raw data.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- backend, data
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100