You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The project is currently in **Phase 11**, offering a high-fidelity software emulator and **ASIC-ready synthesizable RTL**.
77
+
The project is currently in **Phase 15**, offering deep integration with PyTorch and GGUF, alongside native hardware acceleration for advanced kernels.
Copy file name to clipboardExpand all lines: TFMBS_DEVICE_SPEC.md
+15-24Lines changed: 15 additions & 24 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -40,46 +40,37 @@ The primary workload for llama.cpp acceleration.
40
40
-**Semantics:** Performs $y = Wx$, where $W$ is ternary, $x$ is typically binary/FP (quantized to ternary by the fabric if necessary), and $y$ is binary (accumulated results).
41
41
42
42
### 3.2 Async vs Sync
43
-
- The interface supports both synchronous (blocking) and asynchronous (polling/interrupt) execution.
44
-
-`fabric_exec_gemv` initiates the operation.
45
-
- Completion is signalled via a status register or callback.
43
+
- The interface supports both synchronous (blocking) and asynchronous (polling/interrupt) execution via IOCTL.
44
+
-`TFMBS_IOC_SUBMIT` initiates the operation using a TFD.
45
+
-`TFMBS_IOC_WAIT` blocks until completion.
46
+
- Completion can also be polled via the `DONE` bit in the control register.
46
47
47
48
---
48
49
49
-
## 4. Host API (C ABI)
50
+
## 4. Host API (UAPI / IOCTL)
50
51
51
-
The following functions define the standard interface for the Fabric Device:
52
+
The normative interface for the Fabric Device is mediated via the `/dev/tfmbs` character device using the following IOCTLs:
52
53
53
54
```c
54
55
/**
55
-
* Allocate memory in the Fabric pool.
56
-
* Returns a handle/pointer to Fabric-resident memory.
56
+
* Submit a Ternary Frame Descriptor for execution.
Copy file name to clipboardExpand all lines: USER_MANUAL.md
+8-8Lines changed: 8 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,11 +1,11 @@
1
-
# Ternary Fabric User Manual (v0.1)
1
+
# Ternary Fabric User Manual (v0.2)
2
2
3
3
Welcome to the **Ternary Fabric** user manual. This documentation is designed to help hardware designers, software developers, and researchers understand and utilize the ternary-native acceleration substrate.
4
4
5
5
## 📖 Table of Contents
6
6
7
7
1.**[Project Overview](docs/00_OVERVIEW.md)**
8
-
What is the Ternary Fabric? Design philosophy, core innovation, and Phase 6b status.
8
+
What is the Ternary Fabric? Design philosophy, core innovation, and Phase 15 status.
9
9
2.**[Installation & Setup](docs/01_INSTALL.md)**
10
10
Dependencies, build instructions, and environment setup.
11
11
3.**[Quick Start Guide](docs/02_QUICK_START.md)**
@@ -17,17 +17,17 @@ Welcome to the **Ternary Fabric** user manual. This documentation is designed to
17
17
6.**[TFD & Execution Hints](docs/05_TFD.md)**
18
18
The binary interface specification, kernel flags, and packing formats.
19
19
7.**[Kernel Reference](docs/06_KERNELS.md)**
20
-
Usage details for Production (T-GEMM, T-CONV) and Experimental (T-LSTM, T-ATTN) kernels.
20
+
Usage details for accelerated kernels (T-GEMM, T-CONV3D, T-LSTM, T-ATTN).
21
21
8.**[Software API Guide](docs/07_API.md)**
22
22
Comprehensive guide to the `pytfmbs` Python library.
When running with the interposer, the Fabric provides real-time telemetry to `stderr`:
57
+
When running with the interposer or Python API, the Fabric provides real-time telemetry:
58
58
59
59
***Zero-Skips:** The number of operations eliminated because an operand was zero. Typically 50-75% for LLM workloads.
60
60
***Pool Usage:** Current consumption of the 128MB emulation pool.
@@ -63,7 +63,7 @@ When running with the interposer, the Fabric provides real-time telemetry to `st
63
63
64
64
---
65
65
66
-
## 🧠 Memory Management (Phase 7 & 8)
66
+
## 🧠 Memory Management
67
67
68
68
### LRU Paging
69
69
The Fabric emulator manages a fixed 128MB pool of "Fabric Memory". If an allocation exceeds this or the pool is full, the system uses a **Least Recently Used (LRU)** policy to evict resident PT-5 frames. Evicted frames are transparently re-hydrated if accessed again by the host.
Copy file name to clipboardExpand all lines: WHITE_PAPER.md
+5-3Lines changed: 5 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -49,11 +49,13 @@ Ternary Fabric sits at the intersection of Ternary Neural Networks (TNNs) and do
49
49
***MIT Eyeriss:** A research-focused spatial accelerator that prioritizes data movement efficiency. Like the Ternary Fabric, it values energy efficiency but remains centered on binary-encoded weights.
50
50
***AMD XDNA (AI Engine):** A tile-based architecture for Ryzen processors. XDNA offers high flexibility, but the Ternary Fabric's specialization in balanced-ternary allows for the complete elimination of multipliers, a step further in architectural optimization.
51
51
52
-
## 5. Future Directions & Experimental Kernels
53
-
With the core multi-tile architecture (Phase 6b) now validated, the project is expanding into complex recurrent and attention-based structures. Current experimental kernels include **T-LSTM** and **T-Attention**, which are undergoing functional verification in the software reference layer before being committed to RTL.
52
+
## 5. Framework Integration & Native Kernels
53
+
As of Phase 15, the Ternary Fabric has achieved deep integration with high-level frameworks like PyTorch and native hardware acceleration for complex structures.
54
+
-**PyTorch Integration:** The `TFMBSLinear` module enables seamless acceleration of deep learning models with automatic quantization and residency management.
55
+
-**Native RTL Kernels:** Recurrent and attention-based structures, including **T-LSTM**, **T-Attention**, and **T-CONV3D**, are now natively supported in hardware, providing extreme throughput for diverse AI workloads.
54
56
55
57
## 6. Conclusion
56
-
The Ternary Fabric provides a scalable, efficient, and high-throughput substrate for the next generation of ternary-quantized neural networks. The successful implementation of Phase 6b demonstrates that ternary-native computing can scale to meet the demands of modern AI while maintaining a fraction of the power and area overhead of binary systems.
58
+
The Ternary Fabric provides a scalable, efficient, and high-throughput substrate for the next generation of ternary-quantized neural networks. The successful completion of Phase 15 demonstrates that ternary-native computing can scale to meet the demands of modern AI, from LLMs to computer vision, while maintaining a fraction of the power and area overhead of binary systems.
Copy file name to clipboardExpand all lines: docs/00_OVERVIEW.md
+15-12Lines changed: 15 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -20,22 +20,25 @@ To save bandwidth, data is stored in a high-density **PT-5** format (5 trits per
20
20
### Multi-Tile Scalability
21
21
The architecture is parameterized to scale from a single tile to a large matrix of tiles. Each tile operates in lock-step, sharing a frame controller but maintaining private SRAM for local data storage and high-throughput parallel execution.
22
22
23
-
## 3. Project Status (Phase 9)
23
+
## 3. Project Status (Phase 15)
24
24
25
25
The project has evolved through several key phases:
26
26
27
27
***Phases 1-2:** Specification of the TFMBS ABI and development of the PT-5 codec.
28
-
***Phase 3:** RTL design of the Vector Engine and TPE lanes.
29
-
***Phase 4:** Integration with Python via `pytfmbs` and development of the quantization toolkit.
30
-
***Phase 5:** Implementation of hardware profiling counters and dynamic lane masking.
***Phase 7:** LRU-based Paging and block eviction for large models.
33
-
***Phase 8:** Asynchronous execution with a background command queue.
34
-
***Phase 9 (Current):** Integrated telemetry and proof-of-concept acceleration for binary hosts.
35
-
36
-
## 4. Experimental Kernels
37
-
38
-
Beyond the core hardware kernels, the fabric currently supports experimental reference implementations for **T-Conv3D**, **T-LSTM**, and **T-Attention**. These are wired into the `pytfmbs` API and TFMBS header, allowing for software-level verification and architectural exploration before full RTL acceleration.
28
+
***Phase 3-4:** RTL design of the Vector Engine and integration with Python via `pytfmbs`.
29
+
***Phase 5-6:** Hardware profiling, multi-tile scaling, and ASIC-ready SRAM wrappers.
30
+
***Phase 7-9:** LRU-based Paging, asynchronous execution, and integrated telemetry.
31
+
***Phase 10-11:** Transition to kernel-space IOCTL interface and multi-tile scaling.
32
+
***Phase 12-14:** PyTorch integration, large-model batching, and native GGUF support.
33
+
***Phase 15 (Current):** Native RTL acceleration for CONV3D, LSTM, and Attention kernels.
34
+
35
+
## 4. Accelerated Hardware Kernels
36
+
37
+
As of Phase 15, the fabric supports native RTL-accelerated kernels for:
38
+
***T-GEMM:** General Matrix Multiply for LLM offloading.
39
+
***T-Conv3D:** 3D Convolution with squared-stride address calculation.
40
+
***T-LSTM:** Recurrent ternary operations with hardware-managed state persistence.
41
+
***T-Attention:** Multi-head attention projections with persistent key-value caching support.
Copy file name to clipboardExpand all lines: docs/03_HARDWARE.md
+5Lines changed: 5 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -68,6 +68,11 @@ Since trits are restricted to $\{-1, 0, 1\}$, multiplication is trivial:
68
68
* If both are non-zero and have the same sign, the result is $+1$ (Increment Accumulator).
69
69
* If they have different signs, the result is $-1$ (Decrement Accumulator/Two's Complement).
70
70
71
+
### Native Kernel Support (Phase 15)
72
+
The Vector Engine includes specialized logic for advanced kernels:
73
+
***Squared-Stride Addressing (CONV3D):** Automatic offset calculation for 3D spatial traversal.
74
+
***State Persistence (LSTM/ATTN):** When the `BIAS_EN` hint is set, the accumulator persists its value across frame descriptors, enabling efficient recurrent and attention-based state management.
75
+
71
76
## 4. Pipeline Execution Flow
72
77
73
78
1.**Submission:** The Host writes a TFD to the AXI registers.
0 commit comments