Comprehensive benchmarking of UNet training on NVIDIA A100 (CUDA) vs Intel Gaudi (Lazy & Eager modes).
unet_cuda.py- NVIDIA A100 / CUDA trainingunet_gaudi_lazy.py- Intel Gaudi Lazy mode trainingunet_gaudi_eager.py- Intel Gaudi Eager mode training
submit_cuda.sh- Submit CUDA job (A100, public QOS)submit_gaudi_lazy.sh- Submit Gaudi Lazy job (class_gaudi QOS)submit_gaudi_eager.sh- Submit Gaudi Eager job (class_gaudi QOS)
prepare_dataset.py- Download CARLA dataset, create crops, generate splitsrun_benchmark.sh- Master script: prepare data + submit all jobscompare_results.py- Compare results from all three platformsverify_enhanced.sh- Verify all files are present
scp *.py *.sh <asurite>@sol.asu.edu:~/Gaudi/ssh <asurite>@sol.asu.edu
cd ~/Gaudi
./run_benchmark.shThis will:
- Download CARLA dataset (if needed)
- Generate random crops (384x512)
- Create train/val/test splits
- Submit all 3 training jobs to SLURM
watch -n 5 'squeue -u $USER'tail -f cuda_unet_*.out
tail -f gaudi_lazy_unet_*.out
tail -f gaudi_eager_unet_*.outAfter all jobs complete:
python3 compare_results.pyIf you prefer to run steps manually:
# 1. Prepare dataset once
python3 prepare_dataset.py
# 2. Submit training jobs
sbatch submit_cuda.sh
sbatch submit_gaudi_lazy.sh
sbatch submit_gaudi_eager.sh
# 3. After completion
python3 compare_results.py- Total training time (sec, min)
- Average epoch time
- Average/Min/Max batch time
- Throughput (samples/sec)
- Model memory footprint (GB)
- Peak memory allocated (GB)
- Peak memory reserved (GB)
- Average memory allocated (GB)
- Best train/val loss and IoU
- Per-epoch: loss, accuracy, IoU, F1, learning rate
- Test: accuracy, IoU, precision, recall, F1, per-class IoU
After training completes:
results_cuda.json- Comprehensive CUDA resultsresults_gaudi_lazy.json- Gaudi Lazy mode resultsresults_gaudi_eager.json- Gaudi Eager mode resultsbest_unet_cuda.pth- Best CUDA model checkpointbest_unet_gaudi_lazy.pth- Best Gaudi Lazy checkpointbest_unet_gaudi_eager.pth- Best Gaudi Eager checkpointdataset_splits.json- Train/val/test split information
All scripts use identical configuration:
- Image size: 384x512
- Batch size: 16
- Epochs: 20
- Learning rate: 1e-4
- Workers: 4
- Classes: 20 (CARLA semantic segmentation)
- Random seed: 42 (for reproducibility)
- Requires Kaggle credentials in
~/.kaggle/kaggle.json - Dataset: CARLA Vision Dataset from Kaggle
- All platforms use identical train/val/test splits for fair comparison
- Results saved in JSON format for easy analysis