Skip to content

TensorFlow 0.1.3: context-bound constants and default transpose - #16

Merged
rextio merged 1 commit into
0.1.3from
feat/013-resident-execution
Jul 26, 2026
Merged

rextio merged 1 commit into
0.1.3from
feat/013-resident-execution

Conversation

@rextio

@rextio rextio commented Jul 26, 2026

Copy link
Copy Markdown
Owner

Summary

  • prepare rextio-tensorflow 0.1.3 as an Unreleased candidate and add the 0.1.3 integration branch to CI
  • add an exact fail-closed CPU float32 rank-2 tf.transpose(x) lowering using same-wheel TFE Transpose with default [1, 0] permutation only
  • add a per-BorrowedContext RAII prepared-constant table for reduction axes, ArgMax axes, and the rank-2 transpose permutation
  • explicitly clear cached TFE handles before Python eager-context anchors are released
  • preserve TensorHandle payload sharing, TensorFlow 2.21.0 and CPython 3.11 ABI pins, existing operation semantics, and all CUDA non-claims
  • keep the CUDA-derived runtime buildable and update new 0.1.3 manual evidence identity without rewriting the historical 0.1.2 record

Safety and evidence boundaries

Prepared handles are never process-global and are never shared across distinct BorrowedContext values, even when separate extracts observe the same raw eager-context pointer. Reuse is limited to repeated operations in one generated native ownership graph. Drop for BorrowedContext drains the prepared table while the strong Python context and capsule anchors are still alive.

The real-Cargo coverage uses a non-square 2x3 tensor, proves 3x2 transpose parity, exercises double transpose and repeated reduction helper paths, checks special values and boundary rejection, and verifies returned tensors remain valid after inputs and Rust locals are released. It does not claim an observed cache-hit rate or speedup.

Verification

  • focused candidate suite after review fixes: 389 passed
  • focused real-Cargo transpose/RAII test: 1 passed
  • earlier full non-GPU suite: 433 passed, 1 skipped, 8 deselected
  • earlier full real-Cargo suite: 8 passed
  • supervisor recheck: prepared/package 11 passed; transpose claim/lower 11 passed; CUDA identity/static contracts 3 passed
  • Ruff: clean
  • mypy: clean across 30 source files
  • staged diff whitespace check: clean

Deliberate limitations

  • no graph or FunctionDef fusion
  • no cross-generated-function residency or process-wide cache
  • no explicit permutation, conjugate, name, rank-1, non-float32, or CUDA transpose lowering
  • no performance or speedup claim
  • CUDA remains build-only and non-promoting with support_claim=false and certification_ready=false

This PR targets the 0.1.3 integration branch. It does not tag, release, publish, or merge to main.

@rextio
rextio merged commit 346ca58 into 0.1.3 Jul 26, 2026
16 checks passed
@rextio
rextio deleted the feat/013-resident-execution branch July 26, 2026 12:46
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