Commit Graph

2 Commits

Author SHA1 Message Date
Vijay Janapa Reddi
522946ecfd Add comprehensive unit tests for gradient flow regression prevention
- test_spatial_gradient_flow.py: Tests Conv2d and MaxPool2d backward function attachment and gradient propagation
- test_embedding_gradient_flow.py: Tests Embedding backward function attachment and gradient propagation
- Tests verify _grad_fn attachment to prevent .data bypass issues
- Tests validate gradient flow to all parameters (weight, bias)
- Tests check end-to-end gradient chains
- All tests pass (8/8 spatial, 6/6 embedding)
2025-11-22 17:43:02 -05:00
Vijay Janapa Reddi
6f86460ec0 Rename test directories to match source module names exactly
- module_01 → 01_tensor
- module_02 → 02_activations
- module_03 → 03_layers
- module_04 → 04_losses
- module_05 → 05_autograd
- module_06 → 06_optimizers
- module_07 → 07_training
- module_08 → 08_dataloader
- module_09 → 09_spatial
- module_10 → 10_tokenization
- module_11 → 11_embeddings
- module_12 → 12_attention
- module_13 → 13_transformers
- module_14 → 14_kvcaching
- module_15 → 15_profiling

This prevents misalignment between source and test directories.
Tests now mirror the exact structure of modules/source/.
2025-09-30 12:24:48 -04:00