Trains a simple CNN on CIFAR-10 using DeepSpeed with AIHWKIT-Lightning's analog layers. Based on the DeepSpeed CIFAR example.
cd examples/deepspeed_cifar10
uv sync
uv run deepspeed cifar10_deepspeed.py --dtype=fp16 --log-interval=100 --epochs=5Add --use-triton to use Triton kernels for AIHWKIT-Lightning.
- Requires CUDA (uses
deepspeed.init_distributedwith NCCL backend) - The
data_pathin the script defaults to~/scratch/aihwkit-lightning-example/— change it if needed - DeepSpeed uses its own optimizer, so weight clipping is done manually after each step
- See
run_ds.shfor a multi-GPU launch script (adjust--master_portif needed)