How frikallo/axiom works
Axiom is a native C++ tensor library. A caller creates tensors and chains tensor or operation APIs; lazy operations form a graph, which is compiled and executed on CPU or Metal, and results can be serialized. The graph emphasizes documented capabilities and relationships visible in the README, excerpts, or SOURCE INDEX. Several backend and neural-network implementations were not sampled, so their internal call relationships are omitted where evidence is insufficient.
Main entry points: tensor.hpp Tensor API · operations.cpp Tensor operations · graph_registry.cpp Graph registry · graph_executor.cpp Graph executor
Components 21
Tensor API
- Tensor API
include/axiom/tensor.hpp - Tensor operations
src/tensor/operations.cpp - Shape utilities
include/axiom/shape.hpp - Data types
include/axiom/dtype.hpp
Lazy Compute
- Graph registry
src/graph/graph_registry.cpp - Graph nodes
include/axiom/graph/graph_node.hpp - Graph compiler
src/graph/graph_compiler.cpp - Compiled graph
include/axiom/graph/compiled_graph.hpp - Graph executor
src/graph/graph_executor.cpp - Graph cache
src/graph/graph_cache.cpp - Kernel fusion
src/graph/fused_kernel.cpp
Devices & Storage
- CPU operations
src/backends/cpu/cpu_operations.cpp - Metal operations
src/backends/metal/metal_operations.hpp - CPU storage
src/backends/cpu/cpu_storage.cpp - Metal storage
src/backends/metal/metal_storage.hpp - Unified storage
src/backends/metal/unified_storage.hpp
Library Features
- Neural networks
src/nn - Linear algebra
src/tensor/linalg.cpp - Tensor I/O
src/io/io.cpp - Parallel execution
src/parallel/parallel.cpp
Other components
- C++ caller
Connections 23
- C++ caller → Tensor API: creates and chains
README.md - C++ caller → Tensor I/O: loads or saves
README.md - Tensor API → Tensor operations: invokes operations
README.md - Tensor operations → Graph registry: creates lazy graphs
src/tensor/operations.cpp - Graph registry → Graph nodes: builds graph nodes
- Graph registry → Compiled graph: uses compiled graphs
src/graph/graph_registry.cpp - Graph registry → Graph executor: uses executor
src/graph/graph_registry.cpp - Graph registry → Graph cache: uses cache
src/graph/graph_registry.cpp - Graph compiler → Graph nodes: reads graph nodes
src/graph/graph_compiler.cpp - Graph compiler → Kernel fusion: uses fusion patterns
src/graph/graph_compiler.cpp - Graph executor → Graph nodes: executes graph nodes
src/graph/graph_executor.cpp - Graph executor → Kernel fusion: runs fused kernels
src/graph/graph_executor.cpp - Graph executor → Tensor operations: dispatches operations
src/graph/graph_executor.cpp - Tensor operations → CPU operations: dispatches CPU work
src/tensor/operations.cpp - Tensor operations → Metal operations: dispatches GPU work
src/tensor/operations.cpp - Tensor API → CPU storage: uses storage
- Tensor API → Metal storage: uses storage
- Metal storage → Unified storage: offers unified memory
- Tensor API → Neural networks: supports model APIs
README.md - Tensor API → Linear algebra: supports linear algebra
README.md - Tensor API → Shape utilities: uses shape metadata
include/axiom/tensor.hpp - Tensor API → Data types: uses dtype metadata
include/axiom/tensor.hpp - Tensor operations → Parallel execution: uses parallel runtime