From 8958f207c292ca36ce4b91b402d5824e67b99a92 Mon Sep 17 00:00:00 2001 From: Shivam Raikundalia Date: Tue, 8 Jul 2025 13:41:31 -0700 Subject: [PATCH 1/3] fix comment --- recipes_source/recipes/profiler_recipe.py | 36 +++++++++++------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/recipes_source/recipes/profiler_recipe.py b/recipes_source/recipes/profiler_recipe.py index 789f504ffc..ef4387d506 100644 --- a/recipes_source/recipes/profiler_recipe.py +++ b/recipes_source/recipes/profiler_recipe.py @@ -5,31 +5,31 @@ """ ###################################################################### -""" -This recipe explains how to use PyTorch profiler and measure the time and -memory consumption of the model's operators. +# +# This recipe explains how to use PyTorch profiler and measure the time and +# memory consumption of the model's operators. -Introduction ------------- -PyTorch includes a simple profiler API that is useful when user needs -to determine the most expensive operators in the model. +# Introduction +# ------------ +# PyTorch includes a simple profiler API that is useful when user needs +# to determine the most expensive operators in the model. -In this recipe, we will use a simple Resnet model to demonstrate how to -use profiler to analyze model performance. +# In this recipe, we will use a simple Resnet model to demonstrate how to +# use profiler to analyze model performance. -Prerequisites ---------------- -- ``torch >= 1.9`` +# Prerequisites +# --------------- +# - ``torch >= 1.9`` -Setup ------ -To install ``torch`` and ``torchvision`` use the following command: +# Setup +# ----- +# To install ``torch`` and ``torchvision`` use the following command: -.. code-block:: sh +# .. code-block:: sh - pip install torch torchvision +# pip install torch torchvision -""" +# ###################################################################### # Steps From 4e4133d0bc1b7764832a26434a363c3a06d4d997 Mon Sep 17 00:00:00 2001 From: Shivam Raikundalia Date: Tue, 8 Jul 2025 13:58:26 -0700 Subject: [PATCH 2/3] fix comment --- recipes_source/recipes/profiler_recipe.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes_source/recipes/profiler_recipe.py b/recipes_source/recipes/profiler_recipe.py index ef4387d506..a031ac6ab7 100644 --- a/recipes_source/recipes/profiler_recipe.py +++ b/recipes_source/recipes/profiler_recipe.py @@ -19,7 +19,7 @@ # Prerequisites # --------------- -# - ``torch >= 1.9`` +# - ``torch >= 2.3.0`` # Setup # ----- From 8bcb30799a92948a03822b214d816224ef87d789 Mon Sep 17 00:00:00 2001 From: Shivam Raikundalia Date: Tue, 8 Jul 2025 15:42:39 -0700 Subject: [PATCH 3/3] fix --- recipes_source/recipes/profiler_recipe.py | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/recipes_source/recipes/profiler_recipe.py b/recipes_source/recipes/profiler_recipe.py index a031ac6ab7..a8d1a4dc6b 100644 --- a/recipes_source/recipes/profiler_recipe.py +++ b/recipes_source/recipes/profiler_recipe.py @@ -5,30 +5,28 @@ """ ###################################################################### -# # This recipe explains how to use PyTorch profiler and measure the time and # memory consumption of the model's operators. - +# # Introduction # ------------ -# PyTorch includes a simple profiler API that is useful when user needs +# PyTorch includes a simple profiler API that is useful when the user needs # to determine the most expensive operators in the model. - +# # In this recipe, we will use a simple Resnet model to demonstrate how to -# use profiler to analyze model performance. - +# use the profiler to analyze model performance. +# # Prerequisites # --------------- # - ``torch >= 2.3.0`` - +# # Setup # ----- # To install ``torch`` and ``torchvision`` use the following command: - +# # .. code-block:: sh - +# # pip install torch torchvision - # ######################################################################