mirror of
https://github.com/MLSysBook/TinyTorch.git
synced 2026-05-31 07:12:03 -05:00
Replace manual test calls with automatic discovery
This commit is contained in:
@@ -1817,18 +1817,8 @@ Time to test your implementation! This section uses TinyTorch's standardized tes
|
||||
# =============================================================================
|
||||
|
||||
if __name__ == "__main__":
|
||||
# Unit tests
|
||||
test_compression_metrics()
|
||||
test_magnitude_pruning()
|
||||
test_quantization()
|
||||
test_distillation()
|
||||
test_structured_pruning()
|
||||
test_comprehensive_comparison()
|
||||
# Integration tests
|
||||
test_compression_integration()
|
||||
test_comprehensive_compression_integration()
|
||||
|
||||
from tito.tools.testing import run_module_tests_auto
|
||||
|
||||
# Automatically discover and run all tests in this module
|
||||
success = run_module_tests_auto("Compression")
|
||||
|
||||
|
||||
@@ -1404,18 +1404,8 @@ Time to test your implementation! This section uses TinyTorch's standardized tes
|
||||
# =============================================================================
|
||||
|
||||
if __name__ == "__main__":
|
||||
# Unit tests
|
||||
test_matmul_baseline()
|
||||
test_vectorized_operations()
|
||||
test_cache_friendly_matmul()
|
||||
test_parallel_processing()
|
||||
test_simple_kernel_timing()
|
||||
test_compressed_kernels()
|
||||
final_performance_test()
|
||||
# Integration test
|
||||
test_module_kernel_sequential_model()
|
||||
|
||||
from tito.tools.testing import run_module_tests_auto
|
||||
|
||||
# Automatically discover and run all tests in this module
|
||||
success = run_module_tests_auto("Kernels")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user