mirror of
https://github.com/MLSysBook/TinyTorch.git
synced 2026-05-03 15:52:33 -05:00
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:
9
modules/source/utils/__init__.py
Normal file
9
modules/source/utils/__init__.py
Normal file
@@ -0,0 +1,9 @@
|
||||
"""
|
||||
TinyTorch Utils Package
|
||||
|
||||
Shared utilities for TinyTorch modules.
|
||||
"""
|
||||
|
||||
from .profiler import SimpleProfiler, profile_function
|
||||
|
||||
__all__ = ['SimpleProfiler', 'profile_function']
|
||||
Reference in New Issue
Block a user