Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 0 additions & 29 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -360,37 +360,8 @@ jobs:

steps:
- name: Checkout repository
if: runner.os != 'Windows'
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6

- name: Checkout repository (Windows sparse)
if: runner.os == 'Windows'
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
with:
sparse-checkout: |
/CMakeLists.txt
/CMakePresets.json
/cmake/**
/include/**
/src/**
/core/**
/vm/**
/experimental/**
/runtime/**
/kernel/**
/tooling/**
/lang/**
/examples/**
/tools/**
/tests/**
/scripts/**
/benchmarks/**
/spec/**
/third_party/**
/README.md
/LICENSE
sparse-checkout-cone-mode: false

- name: Start log capture
run: mkdir -p .github/logs

Expand Down
1 change: 1 addition & 0 deletions README.es.md
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,7 @@ Dado que todo el TISC ISA es nativo ternario, el **Axion Governance Kernel** pue
- Un modelo de seguridad que es fundamentalmente más inspeccionable que la ejecución binaria de caja negra.

Estas ventajas se combinan en dominios donde **la reproducibilidad**, **la inferencia de baja complejidad**, **la ejecución gobernada** y **la simetría matemática** importan más — exactamente los casos de uso objetivo de la arquitectura T81.
Todas las afirmaciones de determinismo deben estar estrictamente limitadas por el Registro de Superficie de Determinismo.

---

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ t81 code run inference.t81 --policy secure_model.apl --weights-model model.t81w
- GUI-first or general-purpose desktop OS
- Running on real ternary hardware (none exists)

T81 prioritizes **verifiability, determinism, and governance** over broad compatibility.
T81 prioritizes **verifiability, determinism, and governance** over broad compatibility. All determinism claims must be strictly bounded by the Determinism Surface Registry.

## License

Expand Down
1 change: 1 addition & 0 deletions README.pt-BR.md
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,7 @@ Como todo o TISC ISA é ternário nativo, o **Axion Governance Kernel** pode int
- Um modelo de segurança que é fundamentalmente mais inspecionável do que a execução binária de caixa preta.

Essas vantagens se combinam em domínios em que **reprodutibilidade**, **inferência de baixa complexidade**, **execução governada** e **simetria matemática** são mais importantes — exatamente os casos de uso de destino da arquitetura T81.
Todas as reivindicações de determinismo devem ser estritamente limitadas pelo Registro de Superfície de Determinismo.

---

Expand Down
1 change: 1 addition & 0 deletions README.ru.md
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,7 @@ ctest --test-dir build --output-on-failure
- Модель безопасности, которая принципиально более открыта для проверки, чем стандартное бинарное выполнение «черного ящика».

Эти преимущества объединяются в областях, где **воспроизводимость**, **вывод низкой сложности**, **управляемое выполнение** и **математическая симметрия** имеют наибольшее значение — именно это и является целевыми вариантами использования архитектуры T81.
Все заявления о детерминизме должны быть строго ограничены Реестром поверхности детерминизма.

---

Expand Down
1 change: 1 addition & 0 deletions README.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,7 @@ IEEE 754 浮点数存在破坏可重复性的平台特定舍入模式、结合
- 一个从根本上比黑盒二进制执行更具可检查性的安全模型。

这些优势在那些最看重 **再现性**、**低复杂度推理**、**受控执行** 和 **数学对称性** 的领域中产生了叠加效应 — 这正是 T81 架构旨在解决的核心应用场景。
所有确定性声明必须受到确定性表面注册表的严格限制。

---

Expand Down
2 changes: 1 addition & 1 deletion fs/block_backed_driver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ std::vector<std::byte> serialize_cap(const CapabilityGrant& g) {
return out;
}

CapabilityGrant deserialize_cap(std::span<const std::byte> raw) {
[[maybe_unused]] CapabilityGrant deserialize_cap(std::span<const std::byte> raw) {
CapabilityGrant g;
if (raw.size() < kCapBytes) return g;
const std::byte* p = raw.data();
Expand Down
37 changes: 35 additions & 2 deletions include/t81/types/T81Int128.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,39 @@
#if defined(_MSC_VER) && defined(_WIN64)
#include <intrin.h>

#if defined(__clang__)
inline uint64_t clang_udiv128(uint64_t high, uint64_t low, uint64_t divisor, uint64_t* remainder) {
if (divisor == 0) {
if (remainder) *remainder = 0;
return 0;
}
if (high >= divisor) {
if (remainder) *remainder = 0;
return 0; // Overflow condition not fully handled as per _udiv128 spec, but we mimic MSVC's
// constraint
}

uint64_t q = 0;
uint64_t r = high;
for (int i = 0; i < 64; ++i) {
uint64_t next_bit = (low >> 63) & 1;
low <<= 1;
r = (r << 1) | next_bit;
if (r >= divisor) {
r -= divisor;
q = (q << 1) | 1;
} else {
q <<= 1;
}
}
if (remainder) *remainder = r;
return q;
}
#define T81_UDIV128 clang_udiv128
#else
#define T81_UDIV128 _udiv128
#endif

namespace t81::v1::detail {
struct int128_t {
uint64_t lo;
Expand Down Expand Up @@ -64,7 +97,7 @@ struct int128_t {
if (num.hi >= (uint64_t)d) {
return {0, 0};
}
uint64_t q = _udiv128(num.hi, num.lo, (uint64_t)d, &rem);
uint64_t q = T81_UDIV128(num.hi, num.lo, (uint64_t)d, &rem);
int128_t res = {q, 0};
return neg ? -res : res;
}
Expand All @@ -80,7 +113,7 @@ struct int128_t {
if (num.hi >= (uint64_t)d) {
return {0, 0};
}
_udiv128(num.hi, num.lo, (uint64_t)d, &rem);
T81_UDIV128(num.hi, num.lo, (uint64_t)d, &rem);
int128_t res = {rem, 0};
return neg ? -res : res;
}
Expand Down
2 changes: 1 addition & 1 deletion spec/rfcs/RFC-0055-hardware-target-profile-template.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# RFC-0055 Hardware Target Profile Template

**Status:** draft
**Status:** accepted
**Type:** hardware-profile
**Applies-To:** [target device or family]
**Created:** [YYYY-MM-DD]
Expand Down
2 changes: 1 addition & 1 deletion spec/rfcs/RFC-0056-google-axion-hardware-profile.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# RFC-0056 Google Axion Hardware Target Profile

**Status:** draft
**Status:** accepted
**Type:** hardware-profile
**Applies-To:** Google Axion Processor (C4A/N4A instances)
**Created:** 2026-03-19
Expand Down
82 changes: 28 additions & 54 deletions spec/rfcs/RFC_TEMPLATE_COMPLIANCE_AUDIT.md
Original file line number Diff line number Diff line change
@@ -1,66 +1,40 @@
# RFC Template Compliance Audit Report
# T81 Foundation RFC Consistency Audit
**Date:** 2026-03-24
**Scope:** `spec/rfcs/` directory and standard templates

## Audit Status: ✅ COMPLETED
This document presents a brief gap analysis and consistency audit of the current RFC catalog against the T81 Foundation standard template requirements.

### ✅ All RFCs Now Fully Compliant
- RFC-00A0: AI Experiment Sandbox - FULLY COMPLIANT
- RFC-00A1: Deterministic Evidence Protocol - FULLY COMPLIANT
- RFC-00A2: AI Benchmark Spec - FULLY COMPLIANT
- RFC-00A3: Model Artifact Provenance - FULLY COMPLIANT
- RFC-00A4: Ternary Quantization Codec - FULLY COMPLIANT
- RFC-00A5: LLM Backend Adapter - FULLY COMPLIANT
- RFC-00A6: Axion Policy Hooks - FULLY COMPLIANT
- RFC-00A7: UX Integration - FULLY COMPLIANT
- RFC-00A8: AI-Native VM Opcodes - FULLY COMPLIANT
## 1. Governance Boundary Consistency

## Template Requirements Applied to All RFCs
1. ✅ Version 0.1 — Standards Track
2. ✅ Status: Draft
3. ✅ Author: T81 Foundation Architecture Team
4. ✅ Applies to: [specific components]
5. ✅ Separator lines: ______________________________________________________________________
6. ✅ Standard sections: Summary, Motivation, Proposal, Impact, Alternatives Considered, References
7. ✅ Impact subsections: Backward Compatibility, Performance, Security
The `check_rfc_lifecycle_hygiene.py` CI script enforces alignment between the `spec/rfcs/index.md` status catalog and the `**Status:**` frontmatter inside each individual RFC document.

## Final Architecture Audit Summary
### Identified Gap
- `RFC-0055-hardware-target-profile-template.md`: Marked as **accepted** in the index, but contained `**Status:** draft` in the file.
- `RFC-0056-google-axion-hardware-profile.md`: Marked as **accepted** in the index, but contained `**Status:** draft` in the file.

### Repository Boundary Compliance: ✅ PASS
- All RFCs respect core system boundaries
- Experimental work properly isolated in `/experiments/ai/`
- Only RFC-00A8 requires eventual core modifications (post-promotion)
### Resolution
- The frontmatter in both files was manually updated from `draft` to `accepted` to align with the canonical `index.md` and satisfy the CI check.

### Determinism Risk Analysis: ✅ DOCUMENTED
- Risk levels assessed for each RFC
- Validation mechanisms specified
- High-risk items (00A5, 00A8) clearly identified
## 2. Template Adherence (RFC-0000-template.md)

### UX Consistency: ✅ STANDARDIZED
- CLI command structure reviewed
- Inconsistencies identified and corrected
- Standard format: `t81 ai <command> [options]`
RFCs are required to follow a standard structure:
- **Status:** (draft, proposed, accepted, integrated, superseded, rejected)
- **Type:** (e.g., standard, hardware-profile)
- **Applies-To:**
- **Created:**
- **Updated:**

### Dependency Graph: ✅ ESTABLISHED
- Clear implementation order defined
- Interdependencies mapped
- Safe progression path identified
### Audit Findings
- Recent additions (e.g., RFC-0055, RFC-0056) adhere strictly to this frontmatter format.
- Older RFCs (e.g., RFC-0001 through RFC-0010) often lack the `Type:` and `Applies-To:` fields. This is acceptable legacy drift, but any updates to those documents should enforce the modern template.

## RFCs Recommended for Permanent Experimental Status
- **RFC-00A8**: AI-Native VM Opcodes (highest architectural risk)
## 3. Promotion-Readiness Review

## Final Implementation Order
1. RFC-00A0: AI Experiment Sandbox
2. RFC-00A1: Deterministic Evidence Protocol
3. RFC-00A3: Model Artifact Provenance
4. RFC-00A5: LLM Backend Adapter
5. RFC-00A4: Ternary Quantization Codec
6. RFC-00A6: Axion Policy Hooks
7. RFC-00A2: AI Benchmark Specification
8. RFC-00A7: UX Integration
9. RFC-00A8: AI-Native VM Opcodes (permanent experimental)
Several RFCs are in an "accepted" state but indicate pending implementation or evidence work:
- **RFC-0034 (T81-Native AI Inference):** Implemented in-repo. Pending cross-platform evidence refresh and result-representation optimization before promotion to `integrated`.
- **RFC-0040 (SWAR Formalization) / RFC-0041 (SIMD Formalization):** Implemented in-repo. Pending refreshed x86_64 cross-architecture evidence (waiting on CI runner availability).
- **RFC-0056 (Google Axion Integration):** Phase 1-3 implementation (TISC-to-ARM64 equivalence proof and conformance testing) is listed as post-acceptance work.

## Architecture Risk Summary
- **High Risk**: RFC-00A5 (Backend determinism), RFC-00A8 (VM modifications)
- **Medium Risk**: RFC-00A3 (Model security), RFC-00A4 (Quantization quality)
- **Low Risk**: RFC-00A0, 00A1, 00A2, 00A6, 00A7
## Conclusion

All RFCs are now ready for review and implementation with proper template compliance and architectural safety boundaries.
The active RFC catalog is largely healthy and in compliance with the lifecycle hygiene script following the updates to RFC-0055 and RFC-0056. The primary bottleneck for promotion to `integrated` across several major hardware/acceleration RFCs (0034, 0040, 0041, 0056) is the collection of cross-architecture performance evidence.
4 changes: 4 additions & 0 deletions vm/tensor_helpers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -974,7 +974,11 @@ std::optional<t81::T729DynamicTensor> native_tensor_twmatmul_direct(
weight_trits.data() + static_cast<std::size_t>(p) * static_cast<std::size_t>(n);
// Prefetch next weight row into L2 (read, L2 locality).
if (p + 1 < pend) {
#if defined(__GNUC__) || defined(__clang__)
__builtin_prefetch(wrow + n, 0, 2);
#elif defined(_MSC_VER)
// No direct equivalent for L2 prefetch in MSVC intrin.h _mm_prefetch that compiles everywhere without immintrin.h.
#endif
}
int j = 0;
#ifdef __ARM_NEON
Expand Down
Loading