Add TinyTorch Profiler Utility

- Add tinytorch.utils.profiler following PyTorch's utils pattern
- Includes SimpleProfiler class for educational performance measurement
- Provides timing, memory usage, and system metrics
- Follows PyTorch's torch.utils.* organizational pattern
- Module 11: Kernels uses profiler for performance demonstrations

Features:
- Wall time and CPU time measurement
- Memory usage tracking (peak, delta, percentages)
- Array information (shape, size, dtype)
- CPU and system metrics
- Clean educational interface for ML performance learning

Import pattern:
  from tinytorch.utils.profiler import SimpleProfiler
This commit is contained in:
Vijay Janapa Reddi
2025-07-14 13:04:44 -04:00
parent 100f0cc3fa
commit 4ea5a4e024
7 changed files with 2919 additions and 0 deletions

View File

@@ -0,0 +1,9 @@
"""
TinyTorch Utils Package
Shared utilities for TinyTorch modules.
"""
from .profiler import SimpleProfiler, profile_function
__all__ = ['SimpleProfiler', 'profile_function']