Skip to content

Commit b15ce9f

Browse files
committed
Automated tutorials push
1 parent 4ec292a commit b15ce9f

File tree

236 files changed

+37847
-28911
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

236 files changed

+37847
-28911
lines changed

_downloads/3195443a0ced3cabc0ad643537bdb5cd/introyt1_tutorial.ipynb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
{
3535
"cell_type": "code",
3636
"execution_count": null,
37-
"id": "5b83e358",
37+
"id": "8c435514",
3838
"metadata": {},
3939
"outputs": [],
4040
"source": [
@@ -50,7 +50,7 @@
5050
},
5151
{
5252
"cell_type": "markdown",
53-
"id": "e099e595",
53+
"id": "1fb16197",
5454
"metadata": {},
5555
"source": [
5656
"\n",

_downloads/4355e2cef7d17548f1e25f97a62828c4/template_tutorial.ipynb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
{
3232
"cell_type": "code",
3333
"execution_count": null,
34-
"id": "86273364",
34+
"id": "f9d9dd42",
3535
"metadata": {},
3636
"outputs": [],
3737
"source": [
@@ -47,7 +47,7 @@
4747
},
4848
{
4949
"cell_type": "markdown",
50-
"id": "3bcbac87",
50+
"id": "b1c29b13",
5151
"metadata": {},
5252
"source": [
5353
"\n",

_downloads/63a0f0fc7b3ffb15d3a5ac8db3d521ee/tensors_deeper_tutorial.ipynb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
{
3535
"cell_type": "code",
3636
"execution_count": null,
37-
"id": "a270ea4d",
37+
"id": "a3abe643",
3838
"metadata": {},
3939
"outputs": [],
4040
"source": [
@@ -50,7 +50,7 @@
5050
},
5151
{
5252
"cell_type": "markdown",
53-
"id": "e10b0c3a",
53+
"id": "3ebb3836",
5454
"metadata": {},
5555
"source": [
5656
"\n",

_downloads/74b90fda9cec339519e5ef764956100f/profiler_recipe.py

Lines changed: 35 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -105,22 +105,24 @@
105105

106106
######################################################################
107107
# The output will look like (omitting some columns):
108-
109-
# --------------------------------- ------------ ------------ ------------ ------------
110-
# Name Self CPU CPU total CPU time avg # of Calls
111-
# --------------------------------- ------------ ------------ ------------ ------------
112-
# model_inference 5.509ms 57.503ms 57.503ms 1
113-
# aten::conv2d 231.000us 31.931ms 1.597ms 20
114-
# aten::convolution 250.000us 31.700ms 1.585ms 20
115-
# aten::_convolution 336.000us 31.450ms 1.573ms 20
116-
# aten::mkldnn_convolution 30.838ms 31.114ms 1.556ms 20
117-
# aten::batch_norm 211.000us 14.693ms 734.650us 20
118-
# aten::_batch_norm_impl_index 319.000us 14.482ms 724.100us 20
119-
# aten::native_batch_norm 9.229ms 14.109ms 705.450us 20
120-
# aten::mean 332.000us 2.631ms 125.286us 21
121-
# aten::select 1.668ms 2.292ms 8.988us 255
122-
# --------------------------------- ------------ ------------ ------------ ------------
123-
# Self CPU time total: 57.549m
108+
#
109+
# .. code-block:: sh
110+
#
111+
# --------------------------------- ------------ ------------ ------------ ------------
112+
# Name Self CPU CPU total CPU time avg # of Calls
113+
# --------------------------------- ------------ ------------ ------------ ------------
114+
# model_inference 5.509ms 57.503ms 57.503ms 1
115+
# aten::conv2d 231.000us 31.931ms 1.597ms 20
116+
# aten::convolution 250.000us 31.700ms 1.585ms 20
117+
# aten::_convolution 336.000us 31.450ms 1.573ms 20
118+
# aten::mkldnn_convolution 30.838ms 31.114ms 1.556ms 20
119+
# aten::batch_norm 211.000us 14.693ms 734.650us 20
120+
# aten::_batch_norm_impl_index 319.000us 14.482ms 724.100us 20
121+
# aten::native_batch_norm 9.229ms 14.109ms 705.450us 20
122+
# aten::mean 332.000us 2.631ms 125.286us 21
123+
# aten::select 1.668ms 2.292ms 8.988us 255
124+
# --------------------------------- ------------ ------------ ------------ ------------
125+
# Self CPU time total: 57.549m
124126
#
125127

126128
######################################################################
@@ -209,8 +211,6 @@
209211
# Self CPU time total: 23.015ms
210212
# Self CUDA time total: 11.666ms
211213
#
212-
######################################################################
213-
214214

215215
######################################################################
216216
# (Note: the first use of XPU profiling may bring an extra overhead.)
@@ -220,28 +220,26 @@
220220
#
221221
# .. code-block:: sh
222222
#
223-
#------------------------------------------------------- ------------ ------------ ------------ ------------ ------------
224-
# Name Self XPU Self XPU % XPU total XPU time avg # of Calls
225-
# ------------------------------------------------------- ------------ ------------ ------------ ------------ ------------
226-
# model_inference 0.000us 0.00% 2.567ms 2.567ms 1
227-
# aten::conv2d 0.000us 0.00% 1.871ms 93.560us 20
228-
# aten::convolution 0.000us 0.00% 1.871ms 93.560us 20
229-
# aten::_convolution 0.000us 0.00% 1.871ms 93.560us 20
230-
# aten::convolution_overrideable 1.871ms 72.89% 1.871ms 93.560us 20
231-
# gen_conv 1.484ms 57.82% 1.484ms 74.216us 20
232-
# aten::batch_norm 0.000us 0.00% 432.640us 21.632us 20
233-
# aten::_batch_norm_impl_index 0.000us 0.00% 432.640us 21.632us 20
234-
# aten::native_batch_norm 432.640us 16.85% 432.640us 21.632us 20
235-
# conv_reorder 386.880us 15.07% 386.880us 6.448us 60
236-
# ------------------------------------------------------- ------------ ------------ ------------ ------------ ------------
237-
# Self CPU time total: 712.486ms
238-
# Self XPU time total: 2.567ms
239-
223+
# ------------------------------ ------------ ------------ ------------ ------------ ------------
224+
# Name Self XPU Self XPU % XPU total XPU time avg # of Calls
225+
# ------------------------------ ------------ ------------ ------------ ------------ ------------
226+
# model_inference 0.000us 0.00% 2.567ms 2.567ms 1
227+
# aten::conv2d 0.000us 0.00% 1.871ms 93.560us 20
228+
# aten::convolution 0.000us 0.00% 1.871ms 93.560us 20
229+
# aten::_convolution 0.000us 0.00% 1.871ms 93.560us 20
230+
# aten::convolution_overrideable 1.871ms 72.89% 1.871ms 93.560us 20
231+
# gen_conv 1.484ms 57.82% 1.484ms 74.216us 20
232+
# aten::batch_norm 0.000us 0.00% 432.640us 21.632us 20
233+
# aten::_batch_norm_impl_index 0.000us 0.00% 432.640us 21.632us 20
234+
# aten::native_batch_norm 432.640us 16.85% 432.640us 21.632us 20
235+
# conv_reorder 386.880us 15.07% 386.880us 6.448us 60
236+
# ------------------------------ ------------ ------------ ------------ ------------ ------------
237+
# Self CPU time total: 712.486ms
238+
# Self XPU time total: 2.567ms
240239
#
241240

242-
243241
######################################################################
244-
# Note the occurrence of on-device kernels in the output (e.g. ``sgemm_32x32x32_NN``).
242+
# Note the occurrence of on-device kernels in the output (e.g. ``sgemm_32x32x32_NN`` for CUDA or ``gen_conv`` for XPU).
245243

246244
######################################################################
247245
# 4. Using profiler to analyze memory consumption

_downloads/770632dd3941d2a51b831c52ded57aa2/trainingyt.ipynb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
{
3636
"cell_type": "code",
3737
"execution_count": null,
38-
"id": "e069f05c",
38+
"id": "49ddae15",
3939
"metadata": {},
4040
"outputs": [],
4141
"source": [
@@ -51,7 +51,7 @@
5151
},
5252
{
5353
"cell_type": "markdown",
54-
"id": "195e6485",
54+
"id": "55d88584",
5555
"metadata": {},
5656
"source": [
5757
"\n",

_downloads/b2c9c15033f17c2bdf31c864f9d39c76/profiler_recipe.ipynb

Lines changed: 56 additions & 83 deletions
Original file line numberDiff line numberDiff line change
@@ -183,33 +183,25 @@
183183
"cell_type": "markdown",
184184
"metadata": {},
185185
"source": [
186-
"The output will look like (omitting some columns):\n"
187-
]
188-
},
189-
{
190-
"cell_type": "code",
191-
"execution_count": null,
192-
"metadata": {
193-
"collapsed": false
194-
},
195-
"outputs": [],
196-
"source": [
197-
"# --------------------------------- ------------ ------------ ------------ ------------\n",
198-
"# Name Self CPU CPU total CPU time avg # of Calls\n",
199-
"# --------------------------------- ------------ ------------ ------------ ------------\n",
200-
"# model_inference 5.509ms 57.503ms 57.503ms 1\n",
201-
"# aten::conv2d 231.000us 31.931ms 1.597ms 20\n",
202-
"# aten::convolution 250.000us 31.700ms 1.585ms 20\n",
203-
"# aten::_convolution 336.000us 31.450ms 1.573ms 20\n",
204-
"# aten::mkldnn_convolution 30.838ms 31.114ms 1.556ms 20\n",
205-
"# aten::batch_norm 211.000us 14.693ms 734.650us 20\n",
206-
"# aten::_batch_norm_impl_index 319.000us 14.482ms 724.100us 20\n",
207-
"# aten::native_batch_norm 9.229ms 14.109ms 705.450us 20\n",
208-
"# aten::mean 332.000us 2.631ms 125.286us 21\n",
209-
"# aten::select 1.668ms 2.292ms 8.988us 255\n",
210-
"# --------------------------------- ------------ ------------ ------------ ------------\n",
211-
"# Self CPU time total: 57.549m\n",
212-
"#"
186+
"The output will look like (omitting some columns):\n",
187+
"\n",
188+
"``` {.sh}\n",
189+
"--------------------------------- ------------ ------------ ------------ ------------\n",
190+
" Name Self CPU CPU total CPU time avg # of Calls\n",
191+
"--------------------------------- ------------ ------------ ------------ ------------\n",
192+
" model_inference 5.509ms 57.503ms 57.503ms 1\n",
193+
" aten::conv2d 231.000us 31.931ms 1.597ms 20\n",
194+
" aten::convolution 250.000us 31.700ms 1.585ms 20\n",
195+
" aten::_convolution 336.000us 31.450ms 1.573ms 20\n",
196+
" aten::mkldnn_convolution 30.838ms 31.114ms 1.556ms 20\n",
197+
" aten::batch_norm 211.000us 14.693ms 734.650us 20\n",
198+
" aten::_batch_norm_impl_index 319.000us 14.482ms 724.100us 20\n",
199+
" aten::native_batch_norm 9.229ms 14.109ms 705.450us 20\n",
200+
" aten::mean 332.000us 2.631ms 125.286us 21\n",
201+
" aten::select 1.668ms 2.292ms 8.988us 255\n",
202+
"--------------------------------- ------------ ------------ ------------ ------------\n",
203+
"Self CPU time total: 57.549m\n",
204+
"```\n"
213205
]
214206
},
215207
{
@@ -324,26 +316,24 @@
324316
"source": [
325317
"The resulting table output (omitting some columns):\n",
326318
"\n",
327-
"> ``` {.sh}\n",
328-
"> ------------------------------------------------------- ------------ ------------\n",
329-
"> Name Self CUDA CUDA total\n",
330-
"> ------------------------------------------------------- ------------ ------------\n",
331-
"> model_inference 0.000us 11.666ms\n",
332-
"> aten::conv2d 0.000us 10.484ms\n",
333-
"> aten::convolution 0.000us 10.484ms\n",
334-
"> aten::_convolution 0.000us 10.484ms\n",
335-
"> aten::_convolution_nogroup 0.000us 10.484ms\n",
336-
"> aten::thnn_conv2d 0.000us 10.484ms\n",
337-
"> aten::thnn_conv2d_forward 10.484ms 10.484ms\n",
338-
"> void at::native::im2col_kernel<float>(long, float co... 3.844ms 3.844ms\n",
339-
"> sgemm_32x32x32_NN 3.206ms 3.206ms\n",
340-
"> sgemm_32x32x32_NN_vec 3.093ms 3.093ms\n",
341-
"> ------------------------------------------------------- ------------ ------------\n",
342-
"> Self CPU time total: 23.015ms\n",
343-
"> Self CUDA time total: 11.666ms\n",
344-
"> ```\n",
345-
"\n",
346-
"------------------------------------------------------------------------\n"
319+
"``` {.sh}\n",
320+
"------------------------------------------------------- ------------ ------------\n",
321+
" Name Self CUDA CUDA total\n",
322+
"------------------------------------------------------- ------------ ------------\n",
323+
" model_inference 0.000us 11.666ms\n",
324+
" aten::conv2d 0.000us 10.484ms\n",
325+
" aten::convolution 0.000us 10.484ms\n",
326+
" aten::_convolution 0.000us 10.484ms\n",
327+
" aten::_convolution_nogroup 0.000us 10.484ms\n",
328+
" aten::thnn_conv2d 0.000us 10.484ms\n",
329+
" aten::thnn_conv2d_forward 10.484ms 10.484ms\n",
330+
"void at::native::im2col_kernel<float>(long, float co... 3.844ms 3.844ms\n",
331+
" sgemm_32x32x32_NN 3.206ms 3.206ms\n",
332+
" sgemm_32x32x32_NN_vec 3.093ms 3.093ms\n",
333+
"------------------------------------------------------- ------------ ------------\n",
334+
"Self CPU time total: 23.015ms\n",
335+
"Self CUDA time total: 11.666ms\n",
336+
"```\n"
347337
]
348338
},
349339
{
@@ -359,49 +349,32 @@
359349
"source": [
360350
"The resulting table output (omitting some columns):\n",
361351
"\n",
362-
"> ``` {.sh}\n",
363-
"> ```\n",
364-
"\n",
365-
"\\-\\-\\-\\-\\-\\-\\-\\-\\-\\-\\-\\-\\-\\-\\-\\-\\-\\-\\-\\-\\-\\-\\-\\-\\-\\-\\-\\-\\-\\-\\-\\-\\-\\-\\-\\-\\-\\-\\-\\-\\-\\-\\-\\-\\-\\-\\-\\-\\-\\-\\-\\-\\-\\-- \\-\\-\\-\\-\\-\\-\\-\\-\\-\\-\\-- \\-\\-\\-\\-\\-\\-\\-\\-\\-\\-\\-- \\-\\-\\-\\-\\-\\-\\-\\-\\-\\-\\-- \\-\\-\\-\\-\\-\\-\\-\\-\\-\\-\\-- \\-\\-\\-\\-\\-\\-\\-\\-\\-\\-\\-- Name Self XPU Self XPU % XPU total XPU time avg \\# of Calls\n",
366-
"\n",
367-
": \n",
368-
"\n",
369-
" \\-\\-\\-\\-\\-\\-\\-\\-\\-\\-\\-\\-\\-\\-\\-\\-\\-\\-\\-\\-\\-\\-\\-\\-\\-\\-\\-\\-\\-\\-\\-\\-\\-\\-\\-\\-\\-\\-\\-\\-\\-\\-\\-\\-\\-\\-\\-\\-\\-\\-\\-\\-\\-\\-- \\-\\-\\-\\-\\-\\-\\-\\-\\-\\-\\-- \\-\\-\\-\\-\\-\\-\\-\\-\\-\\-\\-- \\-\\-\\-\\-\\-\\-\\-\\-\\-\\-\\-- \\-\\-\\-\\-\\-\\-\\-\\-\\-\\-\\-- \\-\\-\\-\\-\\-\\-\\-\\-\\-\\-\\-- model\\_inference 0.000us 0.00% 2.567ms 2.567ms 1\n",
370-
"\n",
371-
" : aten::conv2d 0.000us 0.00% 1.871ms 93.560us 20 aten::convolution\n",
372-
" 0.000us 0.00% 1.871ms 93.560us 20 aten::\\_convolution 0.000us\n",
373-
" 0.00% 1.871ms 93.560us 20 aten::convolution\\_overrideable\n",
374-
" 1.871ms 72.89% 1.871ms 93.560us 20 gen\\_conv 1.484ms 57.82%\n",
375-
" 1.484ms 74.216us 20 aten::batch\\_norm 0.000us 0.00% 432.640us\n",
376-
" 21.632us 20 aten::\\_batch\\_norm\\_impl\\_index 0.000us 0.00%\n",
377-
" 432.640us 21.632us 20 aten::native\\_batch\\_norm 432.640us 16.85%\n",
378-
" 432.640us 21.632us 20 conv\\_reorder 386.880us 15.07% 386.880us\n",
379-
" 6.448us 60\n",
380-
"\n",
381-
" \\-\\-\\-\\-\\-\\-\\-\\-\\-\\-\\-\\-\\-\\-\\-\\-\\-\\-\\-\\-\\-\\-\\-\\-\\-\\-\\-\\-\\-\\-\\-\\-\\-\\-\\-\\-\\-\\-\\-\\-\\-\\-\\-\\-\\-\\-\\-\\-\\-\\-\\-\\-\\-\\--\n",
382-
" \\-\\-\\-\\-\\-\\-\\-\\-\\-\\-\\-- \\-\\-\\-\\-\\-\\-\\-\\-\\-\\-\\--\n",
383-
" \\-\\-\\-\\-\\-\\-\\-\\-\\-\\-\\-- \\-\\-\\-\\-\\-\\-\\-\\-\\-\\-\\--\n",
384-
" \\-\\-\\-\\-\\-\\-\\-\\-\\-\\-\\--Self CPU time total: 712.486ms Self XPU time\n",
385-
" total: 2.567ms\n"
386-
]
387-
},
388-
{
389-
"cell_type": "code",
390-
"execution_count": null,
391-
"metadata": {
392-
"collapsed": false
393-
},
394-
"outputs": [],
395-
"source": [
396-
"#"
352+
"``` {.sh}\n",
353+
"------------------------------ ------------ ------------ ------------ ------------ ------------\n",
354+
" Name Self XPU Self XPU % XPU total XPU time avg # of Calls\n",
355+
"------------------------------ ------------ ------------ ------------ ------------ ------------\n",
356+
" model_inference 0.000us 0.00% 2.567ms 2.567ms 1\n",
357+
" aten::conv2d 0.000us 0.00% 1.871ms 93.560us 20\n",
358+
" aten::convolution 0.000us 0.00% 1.871ms 93.560us 20\n",
359+
" aten::_convolution 0.000us 0.00% 1.871ms 93.560us 20\n",
360+
"aten::convolution_overrideable 1.871ms 72.89% 1.871ms 93.560us 20\n",
361+
" gen_conv 1.484ms 57.82% 1.484ms 74.216us 20\n",
362+
" aten::batch_norm 0.000us 0.00% 432.640us 21.632us 20\n",
363+
" aten::_batch_norm_impl_index 0.000us 0.00% 432.640us 21.632us 20\n",
364+
" aten::native_batch_norm 432.640us 16.85% 432.640us 21.632us 20\n",
365+
" conv_reorder 386.880us 15.07% 386.880us 6.448us 60\n",
366+
"------------------------------ ------------ ------------ ------------ ------------ ------------\n",
367+
"Self CPU time total: 712.486ms\n",
368+
"Self XPU time total: 2.567ms\n",
369+
"```\n"
397370
]
398371
},
399372
{
400373
"cell_type": "markdown",
401374
"metadata": {},
402375
"source": [
403376
"Note the occurrence of on-device kernels in the output (e.g.\n",
404-
"`sgemm_32x32x32_NN`).\n"
377+
"`sgemm_32x32x32_NN` for CUDA or `gen_conv` for XPU).\n"
405378
]
406379
},
407380
{

_downloads/c28f42852d456daf9af72da6c6909556/captumyt.ipynb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
{
3838
"cell_type": "code",
3939
"execution_count": null,
40-
"id": "e04c8f78",
40+
"id": "4d0c1f3c",
4141
"metadata": {},
4242
"outputs": [],
4343
"source": [
@@ -53,7 +53,7 @@
5353
},
5454
{
5555
"cell_type": "markdown",
56-
"id": "b681a714",
56+
"id": "c2d4950b",
5757
"metadata": {},
5858
"source": [
5959
"\n",

_downloads/e2e556f6b4693c2cef716dd7f40caaf6/tensorboardyt_tutorial.ipynb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
{
3636
"cell_type": "code",
3737
"execution_count": null,
38-
"id": "7acd41a1",
38+
"id": "36b705df",
3939
"metadata": {},
4040
"outputs": [],
4141
"source": [
@@ -51,7 +51,7 @@
5151
},
5252
{
5353
"cell_type": "markdown",
54-
"id": "e93c25d4",
54+
"id": "00ca459b",
5555
"metadata": {},
5656
"source": [
5757
"\n",

_downloads/ed9d4f94afb79f7dada6742a06c486a5/autogradyt_tutorial.ipynb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
{
3535
"cell_type": "code",
3636
"execution_count": null,
37-
"id": "4c98d2d9",
37+
"id": "4a5e0021",
3838
"metadata": {},
3939
"outputs": [],
4040
"source": [
@@ -50,7 +50,7 @@
5050
},
5151
{
5252
"cell_type": "markdown",
53-
"id": "c6f72173",
53+
"id": "5d13281e",
5454
"metadata": {},
5555
"source": [
5656
"\n",

0 commit comments

Comments
 (0)