Is there a forum for discussion of GPU hardware for PyTorch?

emerth: <p>I am reasonably knowledgeable with Caffe and pretty strong with Python and C++, but a fair newbie to PyTorch. I have questions about performance - and expected performance - of different hardware while training networks like ResNet34 using PyTorch. Is there a forum where the focus is on hardware for PyTorch and tuning for hardware, rather than programming with PyTorch per se?</p>
<p>Example: running <a href="https://github.com/pytorch/examples/tree/main/imagenet" rel="noopener nofollow ugc">github.com/pytorch/examples/tree/main/imagenet</a> I get similar performance with an old Radeon Pro VII as an Nvidia L4, and an Nvidia A100 is only about 80% faster than either. But I think this is not the best place to be asking?</p>

ptrblck: <p>You can just ask here.</p>
<p>To your question about performance of different devices: profile your workload to isolate where the bottleneck if your code is. E.g. if all use cases are CPU-limited, a better GPU will hardly improve the end2end performance.</p>

emerth: <p>LOL, I am sitting here trying to type an explanation that I tried permutations of PyTorch parameters, hardware, etc, and, and, and… and I just cannot seem to cause a change in the per-epoch training time except a weak scaling across GPU generations. Which is to say I have a… a… a bottleneck! So, you are very wise! Thankyou for the advice. I will get out a profiler.</p>

merto58: <p>Hello sir I need help for my code.The torch doesnt work on my computer I dont know wht?? What can it be the problem I triesd to look on the dependency walker and it said torch is missing some dll files.How can I fix that??The error<br>
<div class="lightbox-wrapper"><a class="lightbox" href="https://discuss.pytorch.org/uploads/default/original/3X/3/5/352d8009524a2fea12e03c506f13d4972b865d7f.png" data-download-href="https://discuss.pytorch.org/uploads/default/352d8009524a2fea12e03c506f13d4972b865d7f" title="torch"><img src="https://discuss.pytorch.org/uploads/default/original/3X/3/5/352d8009524a2fea12e03c506f13d4972b865d7f.png" alt="torch" data-base62-sha1="7AqMWZeL1khU1DpXdSSUdKgWuXd" width="690" height="215" data-dominant-color="161616"><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">torch</span><span class="informations">1475×460 20.1 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>
is win126.</p>

emerth: <p>It is failing to import torch. Have you installed PyTorch?</p>
<p>Look at this page to install: <a href="https://pytorch.org/get-started/locally/" class="inline-onebox" rel="noopener nofollow ugc">Start Locally | PyTorch</a></p>

ptrblck: <p>Your issue is related to <a href="https://discuss.pytorch.org/t/failed-to-import-pytorch-fbgemm-dll-or-one-of-its-dependencies-is-missing/201969/">this one</a> and unrelated to this topic.</p>

emerth: <p>Thought I should follow up. I should say, I am using googlenet in 2024 because I am interested in playing with Deep Dream rather than making Deep Fakes.</p>
<p>I was measuring these metrics:</p>
<ul>
<li>GPU shader utilization using nvidia-smi or rocm-smi.</li>
<li>The “Time” per minibatch value in the script output.</li>
<li>The SSD read speed (rkB/s) and average queue length (aqu-sz) reported by iostat (example “iostat -p /dev/nvme2n1p1 -dx 1”).</li>
</ul>
<p>Initially, when I originally asked, shader utilization was varying between 0% and 100%, the script was reporting Time values from a fraction of a second to several seconds, and iostat reported large swings in read speed.</p>
<p>Batch size for the Radeon VII Pro and L4 was 64 and for the L40s it was 256.</p>
<p>I used torch.utils.bottleneck on the Radeon Pro VII and ROCm was not very happy about that, many errors, but I did get enough out of it to suspect the image loader was the culprit.</p>
<p>I found the example script defaulted to four workers for the image loader. Changing that had an immediate effect.</p>
<p>For the Radeon Pro VII in a local machine eight workers was the sweet spot, resulting in around ~99% shader utilization and rock steady Time value.</p>
<p>For a quad L4 in AWS (g6.12xlarge) I found 16 workers were needed to get the metrics stable, but shader utilization would not go over ~90% on a sliding window.</p>
<p>For a single L40s in AWS (g6e.2xlarge) I found 32 workers were needed  to get the metrics stable, but shader utilization would not go over ~90% on a sliding window.</p>
<p>For a single L40s in AWS (g6e.8xlarge) I found 32 workers were needed  to get the metrics stable, and shader uilization was stable at 99%.</p>
<p>For a quad L40s ins AWS (g6e.24xlarge) I was unable to get the shader utilization over about 80%, however I could get a stable Time value.</p>
<p>I looked at whether the SSD used to store the images might be the culprit. Not so clear. None of the setups generated bandwidth that should stress a decent SSD (326 MB/s at the highest), but I am not at all sure how to interpret the queue length data. Very short queues where the number of data workers was too low, expected. For Radeon Pro VII, L4 and L40s when I had enough workers to max out the shaders the SDD queue depth would be in the 0.22 to 2.7 range. For the quad L40s system that I just could not max out the SSD queue depth was modest, in around 0.8. But I have no idea what to make of AWS’ SSDs - how many bits of intervening DPUs or networking layers are actually between the CPU/GPU and the SSD.</p>
<p>What could be clearly observed was the SSD read rates (r/s and rkB/s) for any GPU setup scaled up as the number of workers was increased, up to the limit where shader utilization leveled off. A fully utilized Radeon VII Pro was sucking in 96MB/s of images, while a ~66% utilized quad L40s sucked in 326 MB/s.</p>