Skip to content

Commit f8a6562

Browse files
louie-tsaimalfet
andcommitted
Update recipes_source/recipes/profiler_recipe.py
Co-authored-by: Nikita Shulga <2453524+malfet@users.noreply.github.com>
1 parent 8ed3e9a commit f8a6562

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

recipes_source/recipes/profiler_recipe.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -172,14 +172,9 @@
172172
import sys
173173
sys.exit(0)
174174

175-
activities = [ProfilerActivity.CPU]
175+
activities = [ProfilerActivity.CPU, ProfilerActivity.CUDA, ProfilerActivity.XPU]
176176
sort_by_keyword = device + "_time_total"
177177

178-
if device == 'cuda':
179-
activities.append(ProfilerActivity.CUDA)
180-
elif device == 'xpu':
181-
activities.append(ProfilerActivity.XPU)
182-
183178
model = models.resnet18().to(device)
184179
inputs = torch.randn(5, 3, 224, 224).to(device)
185180

0 commit comments

Comments
 (0)