Skip to content

Commit b0fcfdd

Browse files
louie-tsaidvrogozh
andcommitted
Update recipes_source/recipes/profiler_recipe.py
Co-authored-by: Dmitry Rogozhkin <dmitry.v.rogozhkin@intel.com>
1 parent ae7d176 commit b0fcfdd

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

recipes_source/recipes/profiler_recipe.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,9 @@
168168
elif torch.xpu.is_available():
169169
device = 'xpu'
170170
else:
171-
device = 'cpu'
171+
print('Neither CUDA nor XPU devices are available to demonstrate profiling on acceleration devices')
172+
import sys
173+
sys.exit(0)
172174

173175
activities = [ProfilerActivity.CPU]
174176
sort_by_keyword = device + "_time_total"

0 commit comments

Comments
 (0)