Many gaps shown in the trace file from PyTorch Profiler

JasonLin: <p>I was profiling a GNN training <a href="https://github.com/dmlc/dgl/blob/master/examples/pytorch/ogb/ogbn-products/graphsage/main.py" rel="noopener nofollow ugc">program</a> using the PyTorch profiler. Following the <a href="https://pytorch.org/tutorials/recipes/recipes/profiler_recipe.html" rel="noopener nofollow ugc">tutorial</a>, I exported a Chrome trace.<br>
My program runs on a CPU-only platform. The GNN program is implemented with Deep Graph Library and uses PyTorch as backend.</p>
<p>I found that there are many gaps in the trace file, and if anyone can shed some light on why these gaps exist it would be very helpful. Thanks in advance.</p>
<p>For example, a large gap after the function <code>aten::index_select</code>,  <code>aten::div</code>,  and  <code>aten::add</code>.<br>
<div class="lightbox-wrapper"><a class="lightbox" href="https://discuss.pytorch.org/uploads/default/original/3X/b/3/b3fbe48a07e4db9f1470436a0347f8f8258b5531.png" data-download-href="https://discuss.pytorch.org/uploads/default/b3fbe48a07e4db9f1470436a0347f8f8258b5531" title="截圖 2023-06-05 下午2.33.57"><img src="https://discuss.pytorch.org/uploads/default/optimized/3X/b/3/b3fbe48a07e4db9f1470436a0347f8f8258b5531_2_690x199.png" alt="截圖 2023-06-05 下午2.33.57" data-base62-sha1="pGd8YZf9oedZJoNntJ5MvuZkQpz" width="690" height="199" srcset="https://discuss.pytorch.org/uploads/default/optimized/3X/b/3/b3fbe48a07e4db9f1470436a0347f8f8258b5531_2_690x199.png, https://discuss.pytorch.org/uploads/default/optimized/3X/b/3/b3fbe48a07e4db9f1470436a0347f8f8258b5531_2_1035x298.png 1.5x, https://discuss.pytorch.org/uploads/default/optimized/3X/b/3/b3fbe48a07e4db9f1470436a0347f8f8258b5531_2_1380x398.png 2x" data-dominant-color="D4D3D4"><div class="meta"><svg class="fa d-icon d-icon-far-image svg-icon" aria-hidden="true"><use href="#far-image"></use></svg><span class="filename">截圖 2023-06-05 下午2.33.57</span><span class="informations">2434×702 69 KB</span><svg class="fa d-icon d-icon-discourse-expand svg-icon" aria-hidden="true"><use href="#discourse-expand"></use></svg></div></a></div><br>
<div class="lightbox-wrapper"><a class="lightbox" href="https://discuss.pytorch.org/uploads/default/original/3X/7/5/755419b69a4a8278dda6f7b1955e392f7e31d570.png" data-download-href="https://discuss.pytorch.org/uploads/default/755419b69a4a8278dda6f7b1955e392f7e31d570" title="截圖 2023-06-05 下午2.33.44"><img src="https://discuss.pytorch.org/uploads/default/optimized/3X/7/5/755419b69a4a8278dda6f7b1955e392f7e31d570_2_690x198.png" alt="截圖 2023-06-05 下午2.33.44" data-base62-sha1="gJW305nSVs9JxxTpRjiJs1c4ogM" width="690" height="198" srcset="https://discuss.pytorch.org/uploads/default/optimized/3X/7/5/755419b69a4a8278dda6f7b1955e392f7e31d570_2_690x198.png, https://discuss.pytorch.org/uploads/default/optimized/3X/7/5/755419b69a4a8278dda6f7b1955e392f7e31d570_2_1035x297.png 1.5x, https://discuss.pytorch.org/uploads/default/optimized/3X/7/5/755419b69a4a8278dda6f7b1955e392f7e31d570_2_1380x396.png 2x" data-dominant-color="CFCDD2"><div class="meta"><svg class="fa d-icon d-icon-far-image svg-icon" aria-hidden="true"><use href="#far-image"></use></svg><span class="filename">截圖 2023-06-05 下午2.33.44</span><span class="informations">2448×704 70.4 KB</span><svg class="fa d-icon d-icon-discourse-expand svg-icon" aria-hidden="true"><use href="#discourse-expand"></use></svg></div></a></div></p>