https://github.com/iveevi/neural.slang
https://github.com/iveevi/neural.slang
Last synced: 4 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/iveevi/neural.slang
- Owner: iveevi
- Created: 2025-08-01T22:06:23.000Z (11 months ago)
- Default Branch: main
- Last Pushed: 2025-08-21T23:28:27.000Z (10 months ago)
- Last Synced: 2025-08-21T23:48:02.843Z (10 months ago)
- Language: Slang
- Size: 37.1 MB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# neural.slang
**neural.slang** is a [Slang](https://shader-slang.com/) initiative that demonstrates the capabilities of differentiable programming and GPU-accelerated machine learning, with a focus on neural graphics primitives and real-time rendering applications.
## Goal
**neural.slang** provides a high-performance, GPU-native implementation of neural networks that seamlessly integrates with graphics pipelines. By leveraging Slang's automatic differentiation capabilities and GPU compute shaders, this framework enables:
- **Real-time neural rendering**: Train and evaluate neural networks directly on the GPU within rendering pipelines
- **Differentiable programming**: Automatic gradient computation for neural network training
- **Graphics-ML integration**: Native support for neural graphics primitives like Neural Radiance Fields (NeRF) and neural SDFs
- **High performance**: Fully GPU-accelerated training and inference with minimal CPU-GPU transfers
## Features
- Modular neural network components (layers, activations, optimizers, losses)
- Support for both inline and cooperative vector operations for different GPU architectures
- Neural graphics primitives including dense grids and multi-level feature grids
- Integration with traditional graphics pipelines (rasterization, ray tracing)
- Mirrored Python interfaces via slangpy for easy experimentation
## Requirements
- Python 3.10+
- Vulkan-compatible GPU (tested on Vulkan-compatible systems)
- Dependencies listed in `requirements.txt`
## Getting Started
Installing dependencies:
```bash
pip install -r requirements.txt
```
Running examples:
```bash
python -m examples..main
```
## Organization
| Directory | Description |
|-----------|-------------|
| [**neural**](neural) | Core neural network framework modules implementing layers, activations, optimizers, and losses in Slang |
| [**ngp**](ngp) | Neural Graphics Primitives implementation including dense grids and multi-level feature grids |
| [**examples**](examples) | Example applications demonstrating various use cases (SDF learning, deferred shading, texture learning) |
| [**tests**](tests) | Unit tests for validating the framework components |
| [**util**](util) | Utility modules for graphics operations, camera handling, and mesh processing |
| [**resources**](resources) | 3D models and textures used by the example applications |