Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add peak memory usage and footprint measurement (#34)
Summary: Fix #28 Add `gpu_peak_mem,mem_footprint,cpu_peak_mem` to `--metrics`. Pull Request resolved: #34 Test Plan: ``` % python run.py --op fused_linear_cross_entropy --num-inputs 4 --metrics latency,gpu_peak_mem,mem_footprint,cpu_peak_mem 100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 4/4 [03:13<00:00, 48.38s/it] x_val LMHeadCE-gpu_peak_mem LMHeadCE-cpu_peak_mem LMHeadCE-latency LigerLMHeadCE-gpu_peak_mem LigerLMHeadCE-mem_footprint LigerLMHeadCE-cpu_peak_mem LigerLMHeadCE-latency inductor_fused_linear_cross_entropy-gpu_peak_mem inductor_fused_linear_cross_entropy-mem_footprint inductor_fused_linear_cross_entropy-cpu_peak_mem inductor_fused_linear_cross_entropy-latency ------- ----------------------- ----------------------- ------------------ ---------------------------- ----------------------------- ---------------------------- ----------------------- -------------------------------------------------- --------------------------------------------------- -------------------------------------------------- --------------------------------------------- 0 8.506082304 85.0289 145.928 6.66886 1.27549 93.7701 537.321 6.40477 1.32809 96.5104 166.69 1 12.775916544 96.5116 285.919 7.00013 1.8251 96.5116 1007.9 8.57329 1.4902 96.5722 290.965 2 21.315585024 96.5722 579.465 7.66267 2.78175 97.0613 6807.01 12.9103 1.65105 97.1784 583.152 3 CUDA OOM 8.98984 97.6245 3416.81 21.5844 97.7367 1219.02 ``` Reviewed By: xuzhao9 Differential Revision: D65302730 Pulled By: FindHao fbshipit-source-id: de29e60e03965a7a98e0d5ba8ff5b32d60a8a85f
- Loading branch information