Skip to content

[Fusion][F1] Define deferred execution IR and explicit materialization boundaries #46

Description

@code-tc

Objective

Introduce a backend-neutral, typed execution IR for deferred Array expressions without performing automatic fusion yet.

Scope

Operation nodes, inputs/dependencies, shape/dtype/layout metadata, device placement, pure-versus-materializing classification, graph validation, deterministic identity and explicit evaluation/materialization. Preserve eager observable behavior where the public API requires it.

Acceptance criteria

  • IR schema/version and supported-node inventory are documented.
  • Graph identity is deterministic for equivalent supported expressions.
  • Cycles, invalid shapes/dtypes, unsupported operations and cross-device edges fail before dispatch.
  • Aliasing, externally visible reads, transfers, reductions and mutation establish explicit materialization boundaries.
  • IR and direct execution pass the same result/error/property fixtures.
  • IR construction alone does not execute kernels or retain unbounded input data.

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/ir/**
    - src/array.rs
    - src/ops.rs
    - tests/ir/**
    - docs/**
  prerequisites:
    - "#42"
    - "#43"
  concurrency_group: array-execution-ir
  required_commands:
    - "cargo fmt --all -- --check"
    - "cargo test --no-default-features --features cubecl"
    - "cargo test --all-features"
  evidence:
    cpu_conformance: required
    accelerator_conformance: not-required
    actual_browser: not-required
    benchmark_report: not-required
    exact_hardware_and_driver_identity: not-required
  external_actions: none
  draft_pr_only: true
  completion_authority: human
  budget:
    size: large
    max_revisions: 3
    max_wall_minutes: 180

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions