How tomh0011/neuralnetworkinc works
DeepC is a C/CUDA neural-network demonstration with a runnable language-model-style pipeline. Its principal workflow generates sample text, tokenizes it with BPE merges, builds token embeddings with positional encodings, then runs GPU self-attention and an MLP before copying the final tensor back to the host for inspection. The graph also shows the tensor and compute layers used by those stages. The README is empty; some subsystem details are inferred from the tree, so uncertain connections are omitted.
Main entry points: pipeline.c Pipeline Orchestrator · tensor.c Tensor Operations · attention.c Self-Attention · mlp.c MLP Layer
Components 15
Input Preparation
- Text Generator
src/data/generator.c - BPE Tokeniser
src/data/tokeniser.c - Positional Encoding
src/data/encoding.c
Model Pipeline
- Pipeline Orchestrator
src/core/pipeline.c - Self-Attention
src/nn/layers/attention.c - MLP Layer
src/nn/modules/mlp.c - Host Output Tensor
src/core/pipeline.c
Tensor Compute
- Tensor Operations
src/core/tensor.c - CUDA Kernels
src/backend/ops_cuda - CPU Softmax
src/backend/ops_cpu/softmax.c
Runtime Support
- CLI Entry
main.c - Configuration
src/core/config.c - Weight Initialization
src/core/init.c
Other components
- Operator
- CUDA Device
Connections 17
- Operator → CLI Entry: starts
- CLI Entry → Pipeline Orchestrator: calls
- Pipeline Orchestrator → Configuration: initializes
- Pipeline Orchestrator → Text Generator: generates text
- Pipeline Orchestrator → BPE Tokeniser: tokenizes text
- Pipeline Orchestrator → Positional Encoding: adds positions
- Pipeline Orchestrator → Weight Initialization: creates weights
- Pipeline Orchestrator → Self-Attention: runs attention
- Pipeline Orchestrator → MLP Layer: runs MLP
- Pipeline Orchestrator → Tensor Operations: allocates and transfers
- Self-Attention → Tensor Operations: calls tensor ops
- MLP Layer → Tensor Operations: calls tensor ops
- Tensor Operations → CUDA Kernels: dispatches GPU ops
- CUDA Kernels → CUDA Device: executes on
- Pipeline Orchestrator → CPU Softmax: uses for CPU softmax
- Pipeline Orchestrator → Host Output Tensor: copies final output
- Host Output Tensor → Operator: displays preview