Anurag1734/cuda-error-resolution-analysis
07
1[2 {3 "post_stream": {4 "posts": [5 {6 "id": 433134,7 "name": "Cwoolfo1",8 "username": "cwoolfo1",9 "avatar_template": "/user_avatar/discuss.pytorch.org/cwoolfo1/{size}/42732_2.png",10 "created_at": "2024-02-15T18:31:56.933Z",11 "cooked": "<p>Hello I am trying to use a GCN layer to perform regression on some data.</p>\n<p>My data has 100 nodes and 2 features per node. I tried to interconnect all the nodes to start, but for some reason PyTorch Geometric doesn’t like my edge index matrix.</p>\n<p>I am getting the following error:</p>\n<p>ValueError: <code>MessagePassing.propagate</code> only supports integer tensors of shape <code>[2, num_messages]</code>, <code>torch_sparse.SparseTensor</code> or <code>torch.sparse.Tensor</code> for argument <code>edge_index</code>.</p>\n<p>What am I doing wrong?</p>\n<pre><code class=\"lang-auto\">def make_edge_index(node_size):\n rows = []\n columns = []\n for i in range(node_size):\n for j in range(node_size):\n rows.append(i)\n columns.append(j)\n rows = np.asarray(rows)\n columns = np.asarray(columns)\n index = np.zeros(shape=(2, node_size*node_size))\n index[0,:] = rows\n index[1,:] = columns\n return index\n\nself.input_size = int(node_size/2)\nself.output_size = 4\nself.edge_matrix = make_edge_index(self.input_size)\nself.GCN = geom_nn.conv.GCNConv(2, self.output_size)\nself.linear_layer = nn.Linear(node_size, self.input_size)\n\n\nx = torch.swapaxes(x, 1, 2)\nx = x.float()\nx = self.linear_layer(x)\n# start by scaling down all possible hits using input layer\nx = torch.swapaxes(x, 1, 2)\nx = self.GCN(x, self.edge_matrix)\n\n</code></pre>",12 "post_number": 1,13 "post_type": 1,14 "posts_count": 1,15 "updated_at": "2024-02-16T00:50:03.621Z",16 "reply_count": 0,17 "reply_to_post_number": null,18 "quote_count": 0,19 "incoming_link_count": 196,20 "reads": 6,21 "readers_count": 5,22 "score": 981.2,23 "yours": false,24 "topic_id": 197162,25 "topic_slug": "graph-convolutional-neural-network-issues",26 "display_username": "Cwoolfo1",27 "primary_group_name": null,28 "flair_name": null,29 "flair_url": null,30 "flair_bg_color": null,31 "flair_color": null,32 "flair_group_id": null,33 "badges_granted": [],34 "version": 3,35 "can_edit": false,36 "can_delete": false,37 "can_recover": false,38 "can_see_hidden_post": false,39 "can_wiki": false,40 "read": true,41 "user_title": null,42 "bookmarked": false,43 "actions_summary": [],44 "moderator": false,45 "admin": false,46 "staff": false,47 "user_id": 49522,48 "hidden": false,49 "trust_level": 1,50 "deleted_at": null,51 "user_deleted": false,52 "edit_reason": null,53 "can_view_edit_history": true,54 "wiki": false,55 "post_url": "/t/graph-convolutional-neural-network-issues/197162/1",56 "can_accept_answer": false,57 "can_unaccept_answer": false,58 "accepted_answer": false,59 "topic_accepted_answer": null,60 "can_vote": false61 }62 ],63 "stream": [64 43313465 ]66 },67 "timeline_lookup": [68 [69 1,70 61871 ]72 ],73 "suggested_topics": [74 {75 "fancy_title": "Storing intermediates outputs in python list + clone() and memory usage problem",76 "id": 217909,77 "title": "Storing intermediates outputs in python list + clone() and memory usage problem",78 "slug": "storing-intermediates-outputs-in-python-list-clone-and-memory-usage-problem",79 "posts_count": 1,80 "reply_count": 0,81 "highest_post_number": 1,82 "image_url": null,83 "created_at": "2025-03-16T10:38:06.410Z",84 "last_posted_at": "2025-03-16T10:38:06.450Z",85 "bumped": true,86 "bumped_at": "2025-03-16T10:38:06.450Z",87 "archetype": "regular",88 "unseen": false,89 "pinned": false,90 "unpinned": null,91 "visible": true,92 "closed": false,93 "archived": false,94 "bookmarked": null,95 "liked": null,96 "tags_descriptions": {},97 "like_count": 0,98 "views": 40,99 "category_id": 1,100 "featured_link": null,101 "has_accepted_answer": false,102 "posters": [103 {104 "extras": "latest single",105 "description": "Original Poster, Most Recent Poster",106 "user": {107 "id": 83291,108 "username": "Nyx",109 "name": "Nyx",110 "avatar_template": "/user_avatar/discuss.pytorch.org/nyx/{size}/76178_2.png",111 "trust_level": 1112 }113 }114 ]115 },116 {117 "fancy_title": "How and why are the input/output channels changed in CNNs?",118 "id": 218139,119 "title": "How and why are the input/output channels changed in CNNs?",120 "slug": "how-and-why-are-the-input-output-channels-changed-in-cnns",121 "posts_count": 6,122 "reply_count": 4,123 "highest_post_number": 6,124 "image_url": null,125 "created_at": "2025-03-22T11:32:05.403Z",126 "last_posted_at": "2025-03-23T10:30:22.076Z",127 "bumped": true,128 "bumped_at": "2025-03-23T10:30:22.076Z",129 "archetype": "regular",130 "unseen": false,131 "pinned": false,132 "unpinned": null,133 "visible": true,134 "closed": false,135 "archived": false,136 "bookmarked": null,137 "liked": null,138 "tags_descriptions": {},139 "like_count": 8,140 "views": 111,141 "category_id": 1,142 "featured_link": null,143 "has_accepted_answer": false,144 "posters": [145 {146 "extras": null,147 "description": "Original Poster",148 "user": {149 "id": 82705,150 "username": "make1234",151 "name": "",152 "avatar_template": "/user_avatar/discuss.pytorch.org/make1234/{size}/74826_2.png",153 "trust_level": 1154 }155 },156 {157 "extras": null,158 "description": "Frequent Poster",159 "user": {160 "id": 18088,161 "username": "KFrank",162 "name": "K. Frank",163 "avatar_template": "/letter_avatar_proxy/v4/letter/k/ecb155/{size}.png",164 "trust_level": 2165 }166 },167 {168 "extras": "latest",169 "description": "Most Recent Poster",170 "user": {171 "id": 41458,172 "username": "J_Johnson",173 "name": "J Johnson",174 "avatar_template": "/user_avatar/discuss.pytorch.org/j_johnson/{size}/55494_2.png",175 "trust_level": 2176 }177 }178 ]179 },180 {181 "fancy_title": "`torch.multinomial`: sampling once vs in batches gives different results",182 "id": 212817,183 "title": "`torch.multinomial`: sampling once vs in batches gives different results",184 "slug": "torch-multinomial-sampling-once-vs-in-batches-gives-different-results",185 "posts_count": 4,186 "reply_count": 2,187 "highest_post_number": 4,188 "image_url": null,189 "created_at": "2024-11-11T19:57:26.792Z",190 "last_posted_at": "2024-11-12T13:29:06.085Z",191 "bumped": true,192 "bumped_at": "2024-11-12T13:29:06.085Z",193 "archetype": "regular",194 "unseen": false,195 "pinned": false,196 "unpinned": null,197 "visible": true,198 "closed": false,199 "archived": false,200 "bookmarked": null,201 "liked": null,202 "tags_descriptions": {},203 "like_count": 0,204 "views": 138,205 "category_id": 1,206 "featured_link": null,207 "has_accepted_answer": false,208 "posters": [209 {210 "extras": null,211 "description": "Original Poster",212 "user": {213 "id": 80827,214 "username": "marinegor",215 "name": "Egor Marin",216 "avatar_template": "/user_avatar/discuss.pytorch.org/marinegor/{size}/73923_2.png",217 "trust_level": 1218 }219 },220 {221 "extras": "latest",222 "description": "Most Recent Poster",223 "user": {224 "id": 3534,225 "username": "ptrblck",226 "name": "",227 "avatar_template": "/user_avatar/discuss.pytorch.org/ptrblck/{size}/1823_2.png",228 "admin": true,229 "moderator": true,230 "trust_level": 2231 }232 }233 ]234 },235 {236 "fancy_title": "Does torch.compile guarantee that the generated fusion strategy and Triton kernel are the same every time?",237 "id": 217095,238 "title": "Does torch.compile guarantee that the generated fusion strategy and Triton kernel are the same every time?",239 "slug": "does-torch-compile-guarantee-that-the-generated-fusion-strategy-and-triton-kernel-are-the-same-every-time",240 "posts_count": 2,241 "reply_count": 0,242 "highest_post_number": 2,243 "image_url": null,244 "created_at": "2025-02-24T13:48:45.414Z",245 "last_posted_at": "2025-02-24T13:56:52.728Z",246 "bumped": true,247 "bumped_at": "2025-02-24T13:56:52.728Z",248 "archetype": "regular",249 "unseen": false,250 "pinned": false,251 "unpinned": null,252 "visible": true,253 "closed": false,254 "archived": false,255 "bookmarked": null,256 "liked": null,257 "tags_descriptions": {},258 "like_count": 0,259 "views": 32,260 "category_id": 1,261 "featured_link": null,262 "has_accepted_answer": false,263 "posters": [264 {265 "extras": null,266 "description": "Original Poster",267 "user": {268 "id": 82892,269 "username": "toddlt",270 "name": "toddlt",271 "avatar_template": "/user_avatar/discuss.pytorch.org/toddlt/{size}/75846_2.png",272 "trust_level": 1273 }274 },275 {276 "extras": "latest",277 "description": "Most Recent Poster",278 "user": {279 "id": 3534,280 "username": "ptrblck",281 "name": "",282 "avatar_template": "/user_avatar/discuss.pytorch.org/ptrblck/{size}/1823_2.png",283 "admin": true,284 "moderator": true,285 "trust_level": 2286 }287 }288 ]289 },290 {291 "fancy_title": "Uninstalling torch package",292 "id": 218955,293 "title": "Uninstalling torch package",294 "slug": "uninstalling-torch-package",295 "posts_count": 2,296 "reply_count": 0,297 "highest_post_number": 2,298 "image_url": null,299 "created_at": "2025-04-10T19:34:40.532Z",300 "last_posted_at": "2025-04-10T19:36:33.048Z",301 "bumped": true,302 "bumped_at": "2025-04-10T19:36:33.048Z",303 "archetype": "regular",304 "unseen": false,305 "pinned": false,306 "unpinned": null,307 "visible": true,308 "closed": false,309 "archived": false,310 "bookmarked": null,311 "liked": null,312 "tags_descriptions": {},313 "like_count": 0,314 "views": 89,315 "category_id": 1,316 "featured_link": null,317 "has_accepted_answer": true,318 "posters": [319 {320 "extras": null,321 "description": "Original Poster",322 "user": {323 "id": 19812,324 "username": "mahmoodn",325 "name": "Mahmood Naderan",326 "avatar_template": "/user_avatar/discuss.pytorch.org/mahmoodn/{size}/13302_2.png",327 "trust_level": 1328 }329 },330 {331 "extras": "latest",332 "description": "Most Recent Poster, Accepted Answer",333 "user": {334 "id": 3534,335 "username": "ptrblck",336 "name": "",337 "avatar_template": "/user_avatar/discuss.pytorch.org/ptrblck/{size}/1823_2.png",338 "admin": true,339 "moderator": true,340 "trust_level": 2341 }342 }343 ]344 }345 ],346 "tags_descriptions": {},347 "fancy_title": "Graph Convolutional Neural Network Issues",348 "id": 197162,349 "title": "Graph Convolutional Neural Network Issues",350 "posts_count": 1,351 "created_at": "2024-02-15T18:31:56.847Z",352 "views": 411,353 "reply_count": 0,354 "like_count": 0,355 "last_posted_at": "2024-02-15T18:31:56.933Z",356 "visible": true,357 "closed": false,358 "archived": false,359 "has_summary": false,360 "archetype": "regular",361 "slug": "graph-convolutional-neural-network-issues",362 "category_id": 1,363 "word_count": 185,364 "deleted_at": null,365 "user_id": 49522,366 "featured_link": null,367 "pinned_globally": false,368 "pinned_at": null,369 "pinned_until": null,370 "image_url": null,371 "slow_mode_seconds": 0,372 "draft": null,373 "draft_key": "topic_197162",374 "draft_sequence": null,375 "unpinned": null,376 "pinned": false,377 "current_post_number": 1,378 "highest_post_number": 1,379 "deleted_by": null,380 "actions_summary": [381 {382 "id": 4,383 "count": 0,384 "hidden": false,385 "can_act": false386 },387 {388 "id": 8,389 "count": 0,390 "hidden": false,391 "can_act": false392 },393 {394 "id": 10,395 "count": 0,396 "hidden": false,397 "can_act": false398 },399 {400 "id": 7,401 "count": 0,402 "hidden": false,403 "can_act": false404 }405 ],406 "chunk_size": 20,407 "bookmarked": false,408 "topic_timer": null,409 "message_bus_last_id": 0,410 "participant_count": 1,411 "show_read_indicator": false,412 "thumbnails": null,413 "slow_mode_enabled_until": null,414 "can_vote": false,415 "vote_count": 0,416 "user_voted": false,417 "discourse_zendesk_plugin_zendesk_id": null,418 "discourse_zendesk_plugin_zendesk_url": "https://your-url.zendesk.com/agent/tickets/",419 "details": {420 "can_edit": false,421 "notification_level": 1,422 "participants": [423 {424 "id": 49522,425 "username": "cwoolfo1",426 "name": "Cwoolfo1",427 "avatar_template": "/user_avatar/discuss.pytorch.org/cwoolfo1/{size}/42732_2.png",428 "post_count": 1,429 "primary_group_name": null,430 "flair_name": null,431 "flair_url": null,432 "flair_color": null,433 "flair_bg_color": null,434 "flair_group_id": null,435 "trust_level": 1436 }437 ],438 "created_by": {439 "id": 49522,440 "username": "cwoolfo1",441 "name": "Cwoolfo1",442 "avatar_template": "/user_avatar/discuss.pytorch.org/cwoolfo1/{size}/42732_2.png"443 },444 "last_poster": {445 "id": 49522,446 "username": "cwoolfo1",447 "name": "Cwoolfo1",448 "avatar_template": "/user_avatar/discuss.pytorch.org/cwoolfo1/{size}/42732_2.png"449 }450 },451 "bookmarks": []452 },453 {454 "post_stream": {455 "posts": [456 {457 "id": 433073,458 "name": "PopHSKE",459 "username": "PopHSKE",460 "avatar_template": "/letter_avatar_proxy/v4/letter/p/a9adbd/{size}.png",461 "created_at": "2024-02-15T03:52:15.182Z",462 "cooked": "<p>I have I am sure a basic question / misunderstanding. I am training a model using DDP on AWS Sagemaker. I am using a single instance with multiple GPUs. There is a large dataset on S3 and it seems I need to download the data on each of the ranks. The data is downloaded and then a dataset/data loader is created. If data is downloaded - read into memory via pandas - does that mean that the GPU memory is being used to read in the data into pandas since it needs to happen on each rank?</p>",463 "post_number": 1,464 "post_type": 1,465 "posts_count": 8,466 "updated_at": "2024-02-15T03:52:15.182Z",467 "reply_count": 0,468 "reply_to_post_number": null,469 "quote_count": 0,470 "incoming_link_count": 122,471 "reads": 10,472 "readers_count": 9,473 "score": 597.0,474 "yours": false,475 "topic_id": 197125,476 "topic_slug": "what-memory-is-used-when-downloading-data-on-each-rank-multiple-gpus",477 "display_username": "PopHSKE",478 "primary_group_name": null,479 "flair_name": null,480 "flair_url": null,481 "flair_bg_color": null,482 "flair_color": null,483 "flair_group_id": null,484 "badges_granted": [],485 "version": 1,486 "can_edit": false,487 "can_delete": false,488 "can_recover": false,489 "can_see_hidden_post": false,490 "can_wiki": false,491 "read": true,492 "user_title": "",493 "bookmarked": false,494 "actions_summary": [],495 "moderator": false,496 "admin": false,497 "staff": false,498 "user_id": 18278,499 "hidden": false,500 "trust_level": 1,501 "deleted_at": null,502 "user_deleted": false,503 "edit_reason": null,504 "can_view_edit_history": true,505 "wiki": false,506 "post_url": "/t/what-memory-is-used-when-downloading-data-on-each-rank-multiple-gpus/197125/1",507 "can_accept_answer": false,508 "can_unaccept_answer": false,509 "accepted_answer": false,510 "topic_accepted_answer": null,511 "can_vote": false512 },513 {514 "id": 433078,515 "name": "",516 "username": "ptrblck",517 "avatar_template": "/user_avatar/discuss.pytorch.org/ptrblck/{size}/1823_2.png",518 "created_at": "2024-02-15T04:24:04.290Z",519 "cooked": "<p>Typical DDP setups use a <code>DistributedSampler</code> to avoid reusing the same samples and to split them among the ranks. Are you using such a sampler already?</p>",520 "post_number": 2,521 "post_type": 1,522 "posts_count": 8,523 "updated_at": "2024-02-15T04:24:04.290Z",524 "reply_count": 1,525 "reply_to_post_number": null,526 "quote_count": 0,527 "incoming_link_count": 5,528 "reads": 10,529 "readers_count": 9,530 "score": 32.0,531 "yours": false,532 "topic_id": 197125,533 "topic_slug": "what-memory-is-used-when-downloading-data-on-each-rank-multiple-gpus",534 "display_username": "",535 "primary_group_name": null,536 "flair_name": null,537 "flair_url": null,538 "flair_bg_color": null,539 "flair_color": null,540 "flair_group_id": null,541 "badges_granted": [],542 "version": 1,543 "can_edit": false,544 "can_delete": false,545 "can_recover": false,546 "can_see_hidden_post": false,547 "can_wiki": false,548 "read": true,549 "user_title": "",550 "bookmarked": false,551 "actions_summary": [],552 "moderator": true,553 "admin": true,554 "staff": true,555 "user_id": 3534,556 "hidden": false,557 "trust_level": 2,558 "deleted_at": null,559 "user_deleted": false,560 "edit_reason": null,561 "can_view_edit_history": true,562 "wiki": false,563 "post_url": "/t/what-memory-is-used-when-downloading-data-on-each-rank-multiple-gpus/197125/2",564 "can_accept_answer": false,565 "can_unaccept_answer": false,566 "accepted_answer": false,567 "topic_accepted_answer": null568 },569 {570 "id": 433113,571 "name": "PopHSKE",572 "username": "PopHSKE",573 "avatar_template": "/letter_avatar_proxy/v4/letter/p/a9adbd/{size}.png",574 "created_at": "2024-02-15T13:51:05.037Z",575 "cooked": "<p>I am. To give a little more detail, I am essentially following tutorials such as <a href=\"https://github.com/pytorch/examples/blob/main/distributed/ddp-tutorial-series/multigpu_torchrun.py\" class=\"inline-onebox\" rel=\"noopener nofollow ugc\">examples/distributed/ddp-tutorial-series/multigpu_torchrun.py at main · pytorch/examples · GitHub</a>. (Imagine in this script instead of generating the random data, it is reading a text file from S3.)</p>\n<p>where for each rank (GPU when using a single instance/node with multiple GPUs) the same dataset appears to be read into memory. So, in my script I have a step that reads data from S3 into a pandas dataframe. It seems I need to do this on each rank. When doing this, is the process loading the data into GPU memory?</p>",576 "post_number": 3,577 "post_type": 1,578 "posts_count": 8,579 "updated_at": "2024-02-15T13:57:34.477Z",580 "reply_count": 1,581 "reply_to_post_number": 2,582 "quote_count": 0,583 "incoming_link_count": 0,584 "reads": 7,585 "readers_count": 6,586 "score": 6.4,587 "yours": false,588 "topic_id": 197125,589 "topic_slug": "what-memory-is-used-when-downloading-data-on-each-rank-multiple-gpus",590 "display_username": "PopHSKE",591 "primary_group_name": null,592 "flair_name": null,593 "flair_url": null,594 "flair_bg_color": null,595 "flair_color": null,596 "flair_group_id": null,597 "badges_granted": [],598 "version": 2,599 "can_edit": false,600 "can_delete": false,601 "can_recover": false,602 "can_see_hidden_post": false,603 "can_wiki": false,604 "link_counts": [605 {606 "url": "https://github.com/pytorch/examples/blob/main/distributed/ddp-tutorial-series/multigpu_torchrun.py",607 "internal": false,608 "reflection": false,609 "title": "examples/distributed/ddp-tutorial-series/multigpu_torchrun.py at main · pytorch/examples · GitHub",610 "clicks": 6611 }612 ],613 "read": true,614 "user_title": "",615 "reply_to_user": {616 "id": 3534,617 "username": "ptrblck",618 "name": "",619 "avatar_template": "/user_avatar/discuss.pytorch.org/ptrblck/{size}/1823_2.png"620 },621 "bookmarked": false,622 "actions_summary": [],623 "moderator": false,624 "admin": false,625 "staff": false,626 "user_id": 18278,627 "hidden": false,628 "trust_level": 1,629 "deleted_at": null,630 "user_deleted": false,631 "edit_reason": null,632 "can_view_edit_history": true,633 "wiki": false,634 "post_url": "/t/what-memory-is-used-when-downloading-data-on-each-rank-multiple-gpus/197125/3",635 "can_accept_answer": false,636 "can_unaccept_answer": false,637 "accepted_answer": false,638 "topic_accepted_answer": null639 },640 {641 "id": 433131,642 "name": "",643 "username": "ptrblck",644 "avatar_template": "/user_avatar/discuss.pytorch.org/ptrblck/{size}/1823_2.png",645 "created_at": "2024-02-15T17:42:19.338Z",646 "cooked": "<p>I assume you are loading the entire dataset into the host RAM on each rank which is a bit wasteful. A common approach would be to use a lazy loading approach. In this case you would load the dataset location or sample paths in the <code>Dataset.__init__</code> method and would load the needed sample in the <code>Dataset.__getitem__</code>. The sampler would then make sure to only load the needed samples on each rank.</p>",647 "post_number": 4,648 "post_type": 1,649 "posts_count": 8,650 "updated_at": "2024-02-15T17:42:19.338Z",651 "reply_count": 1,652 "reply_to_post_number": 3,653 "quote_count": 0,654 "incoming_link_count": 1,655 "reads": 6,656 "readers_count": 5,657 "score": 11.2,658 "yours": false,659 "topic_id": 197125,660 "topic_slug": "what-memory-is-used-when-downloading-data-on-each-rank-multiple-gpus",661 "display_username": "",662 "primary_group_name": null,663 "flair_name": null,664 "flair_url": null,665 "flair_bg_color": null,666 "flair_color": null,667 "flair_group_id": null,668 "badges_granted": [],669 "version": 1,670 "can_edit": false,671 "can_delete": false,672 "can_recover": false,673 "can_see_hidden_post": false,674 "can_wiki": false,675 "read": true,676 "user_title": "",677 "reply_to_user": {678 "id": 18278,679 "username": "PopHSKE",680 "name": "PopHSKE",681 "avatar_template": "/letter_avatar_proxy/v4/letter/p/a9adbd/{size}.png"682 },683 "bookmarked": false,684 "actions_summary": [],685 "moderator": true,686 "admin": true,687 "staff": true,688 "user_id": 3534,689 "hidden": false,690 "trust_level": 2,691 "deleted_at": null,692 "user_deleted": false,693 "edit_reason": null,694 "can_view_edit_history": true,695 "wiki": false,696 "post_url": "/t/what-memory-is-used-when-downloading-data-on-each-rank-multiple-gpus/197125/4",697 "can_accept_answer": false,698 "can_unaccept_answer": false,699 "accepted_answer": false,700 "topic_accepted_answer": null701 },702 {703 "id": 433140,704 "name": "PopHSKE",705 "username": "PopHSKE",706 "avatar_template": "/letter_avatar_proxy/v4/letter/p/a9adbd/{size}.png",707 "created_at": "2024-02-15T20:43:15.214Z",708 "cooked": "<p>Yes I think I am. In a script using DDP, would this mean that the data is being loaded into GPU RAM?</p>\n<p>Dataset.<strong>getitem</strong> reads from disk, is that would you mean?</p>",709 "post_number": 5,710 "post_type": 1,711 "posts_count": 8,712 "updated_at": "2024-02-15T20:43:15.214Z",713 "reply_count": 1,714 "reply_to_post_number": 4,715 "quote_count": 0,716 "incoming_link_count": 2,717 "reads": 6,718 "readers_count": 5,719 "score": 16.2,720 "yours": false,721 "topic_id": 197125,722 "topic_slug": "what-memory-is-used-when-downloading-data-on-each-rank-multiple-gpus",723 "display_username": "PopHSKE",724 "primary_group_name": null,725 "flair_name": null,726 "flair_url": null,727 "flair_bg_color": null,728 "flair_color": null,729 "flair_group_id": null,730 "badges_granted": [],731 "version": 1,732 "can_edit": false,733 "can_delete": false,734 "can_recover": false,735 "can_see_hidden_post": false,736 "can_wiki": false,737 "read": true,738 "user_title": "",739 "reply_to_user": {740 "id": 3534,741 "username": "ptrblck",742 "name": "",743 "avatar_template": "/user_avatar/discuss.pytorch.org/ptrblck/{size}/1823_2.png"744 },745 "bookmarked": false,746 "actions_summary": [],747 "moderator": false,748 "admin": false,749 "staff": false,750 "user_id": 18278,751 "hidden": false,752 "trust_level": 1,753 "deleted_at": null,754 "user_deleted": false,755 "edit_reason": null,756 "can_view_edit_history": true,757 "wiki": false,758 "post_url": "/t/what-memory-is-used-when-downloading-data-on-each-rank-multiple-gpus/197125/5",759 "can_accept_answer": false,760 "can_unaccept_answer": false,761 "accepted_answer": false,762 "topic_accepted_answer": null763 },764 {765 "id": 433142,766 "name": "",767 "username": "ptrblck",768 "avatar_template": "/user_avatar/discuss.pytorch.org/ptrblck/{size}/1823_2.png",769 "created_at": "2024-02-15T21:02:28.671Z",770 "cooked": "<aside class=\"quote no-group\" data-username=\"PopHSKE\" data-post=\"5\" data-topic=\"197125\">\n<div class=\"title\">\n<div class=\"quote-controls\"></div>\n<img loading=\"lazy\" alt=\"\" width=\"24\" height=\"24\" src=\"https://discuss.pytorch.org/letter_avatar_proxy/v4/letter/p/a9adbd/48.png\" class=\"avatar\"> PopHSKE:</div>\n<blockquote>\n<p>would this mean that the data is being loaded into GPU RAM?</p>\n</blockquote>\n</aside>\n<p>Not necessarily as it depends on the <code>Dataset.__getitem__</code> implementation and if you would move the data to the device (which is not the standard use case as the data is loaded on the host in the <code>Dataset</code> and moved inside the training loop to the GPU).</p>",771 "post_number": 6,772 "post_type": 1,773 "posts_count": 8,774 "updated_at": "2024-02-15T21:02:28.671Z",775 "reply_count": 1,776 "reply_to_post_number": 5,777 "quote_count": 1,778 "incoming_link_count": 0,779 "reads": 6,780 "readers_count": 5,781 "score": 21.2,782 "yours": false,783 "topic_id": 197125,784 "topic_slug": "what-memory-is-used-when-downloading-data-on-each-rank-multiple-gpus",785 "display_username": "",786 "primary_group_name": null,787 "flair_name": null,788 "flair_url": null,789 "flair_bg_color": null,790 "flair_color": null,791 "flair_group_id": null,792 "badges_granted": [],793 "version": 1,794 "can_edit": false,795 "can_delete": false,796 "can_recover": false,797 "can_see_hidden_post": false,798 "can_wiki": false,799 "read": true,800 "user_title": "",801 "bookmarked": false,802 "actions_summary": [803 {804 "id": 2,805 "count": 1806 }807 ],808 "moderator": true,809 "admin": true,810 "staff": true,811 "user_id": 3534,812 "hidden": false,813 "trust_level": 2,814 "deleted_at": null,815 "user_deleted": false,816 "edit_reason": null,817 "can_view_edit_history": true,818 "wiki": false,819 "post_url": "/t/what-memory-is-used-when-downloading-data-on-each-rank-multiple-gpus/197125/6",820 "can_accept_answer": false,821 "can_unaccept_answer": false,822 "accepted_answer": false,823 "topic_accepted_answer": null824 },825 {826 "id": 433148,827 "name": "PopHSKE",828 "username": "PopHSKE",829 "avatar_template": "/letter_avatar_proxy/v4/letter/p/a9adbd/{size}.png",830 "created_at": "2024-02-15T21:32:20.803Z",831 "cooked": "<p>So when a dataset (e.g. csv read into pandas) occurs in a script using DDP as in the tutorial above ( <a href=\"https://github.com/pytorch/examples/blob/main/distributed/ddp-tutorial-series/multigpu_torchrun.py\" class=\"inline-onebox\" rel=\"noopener nofollow ugc\">examples/distributed/ddp-tutorial-series/multigpu_torchrun.py at main · pytorch/examples · GitHub</a>) on a single instance with multiple GPUs like this:</p>\n<p>df = pd.read_csv(‘s3://location_of_file’)<br>\nand then its loaded like into pytorch like:</p>\n<p>X = torch.tensor(df.values, dtype=torch.float32)<br>\nloader = DataLoader(X)</p>\n<p>this occurs in some non GPU memory that is somehow associated with each process (rank)?</p>",832 "post_number": 7,833 "post_type": 1,834 "posts_count": 8,835 "updated_at": "2024-02-15T21:32:20.803Z",836 "reply_count": 1,837 "reply_to_post_number": 6,838 "quote_count": 0,839 "incoming_link_count": 0,840 "reads": 6,841 "readers_count": 5,842 "score": 6.2,843 "yours": false,844 "topic_id": 197125,845 "topic_slug": "what-memory-is-used-when-downloading-data-on-each-rank-multiple-gpus",846 "display_username": "PopHSKE",847 "primary_group_name": null,848 "flair_name": null,849 "flair_url": null,850 "flair_bg_color": null,851 "flair_color": null,852 "flair_group_id": null,853 "badges_granted": [],854 "version": 1,855 "can_edit": false,856 "can_delete": false,857 "can_recover": false,858 "can_see_hidden_post": false,859 "can_wiki": false,860 "link_counts": [861 {862 "url": "https://github.com/pytorch/examples/blob/main/distributed/ddp-tutorial-series/multigpu_torchrun.py",863 "internal": false,864 "reflection": false,865 "title": "examples/distributed/ddp-tutorial-series/multigpu_torchrun.py at main · pytorch/examples · GitHub",866 "clicks": 0867 }868 ],869 "read": true,870 "user_title": "",871 "reply_to_user": {872 "id": 3534,873 "username": "ptrblck",874 "name": "",875 "avatar_template": "/user_avatar/discuss.pytorch.org/ptrblck/{size}/1823_2.png"876 },877 "bookmarked": false,878 "actions_summary": [],879 "moderator": false,880 "admin": false,881 "staff": false,882 "user_id": 18278,883 "hidden": false,884 "trust_level": 1,885 "deleted_at": null,886 "user_deleted": false,887 "edit_reason": null,888 "can_view_edit_history": true,889 "wiki": false,890 "post_url": "/t/what-memory-is-used-when-downloading-data-on-each-rank-multiple-gpus/197125/7",891 "can_accept_answer": false,892 "can_unaccept_answer": false,893 "accepted_answer": false,894 "topic_accepted_answer": null895 },896 {897 "id": 433153,898 "name": "",899 "username": "ptrblck",900 "avatar_template": "/user_avatar/discuss.pytorch.org/ptrblck/{size}/1823_2.png",901 "created_at": "2024-02-15T22:15:04.022Z",902 "cooked": "<aside class=\"quote no-group\" data-username=\"PopHSKE\" data-post=\"7\" data-topic=\"197125\">\n<div class=\"title\">\n<div class=\"quote-controls\"></div>\n<img loading=\"lazy\" alt=\"\" width=\"24\" height=\"24\" src=\"https://discuss.pytorch.org/letter_avatar_proxy/v4/letter/p/a9adbd/48.png\" class=\"avatar\"> PopHSKE:</div>\n<blockquote>\n<p>this occurs in some non GPU memory</p>\n</blockquote>\n</aside>\n<p>Yes, in host RAM.</p>\n<aside class=\"quote no-group\" data-username=\"PopHSKE\" data-post=\"7\" data-topic=\"197125\">\n<div class=\"title\">\n<div class=\"quote-controls\"></div>\n<img loading=\"lazy\" alt=\"\" width=\"24\" height=\"24\" src=\"https://discuss.pytorch.org/letter_avatar_proxy/v4/letter/p/a9adbd/48.png\" class=\"avatar\"> PopHSKE:</div>\n<blockquote>\n<p>that is somehow associated with each process (rank)?</p>\n</blockquote>\n</aside>\n<p>It’s just the RAM available in your system that can be used by all processes.</p>",903 "post_number": 8,904 "post_type": 1,905 "posts_count": 8,906 "updated_at": "2024-02-15T22:15:04.022Z",907 "reply_count": 0,908 "reply_to_post_number": 7,909 "quote_count": 1,910 "incoming_link_count": 0,911 "reads": 5,912 "readers_count": 4,913 "score": 1.0,914 "yours": false,915 "topic_id": 197125,916 "topic_slug": "what-memory-is-used-when-downloading-data-on-each-rank-multiple-gpus",917 "display_username": "",918 "primary_group_name": null,919 "flair_name": null,920 "flair_url": null,921 "flair_bg_color": null,922 "flair_color": null,923 "flair_group_id": null,924 "badges_granted": [],925 "version": 1,926 "can_edit": false,927 "can_delete": false,928 "can_recover": false,929 "can_see_hidden_post": false,930 "can_wiki": false,931 "read": true,932 "user_title": "",933 "bookmarked": false,934 "actions_summary": [],935 "moderator": true,936 "admin": true,937 "staff": true,938 "user_id": 3534,939 "hidden": false,940 "trust_level": 2,941 "deleted_at": null,942 "user_deleted": false,943 "edit_reason": null,944 "can_view_edit_history": true,945 "wiki": false,946 "post_url": "/t/what-memory-is-used-when-downloading-data-on-each-rank-multiple-gpus/197125/8",947 "can_accept_answer": false,948 "can_unaccept_answer": false,949 "accepted_answer": false,950 "topic_accepted_answer": null951 }952 ],953 "stream": [954 433073,955 433078,956 433113,957 433131,958 433140,959 433142,960 433148,961 433153962 ]963 },964 "timeline_lookup": [965 [966 1,967 619968 ],969 [970 3,971 618972 ]973 ],974 "suggested_topics": [975 {976 "fancy_title": "How should we use Single GPU for validation while doing multigpu training using DDP",977 "id": 214941,978 "title": "How should we use Single GPU for validation while doing multigpu training using DDP",979 "slug": "how-should-we-use-single-gpu-for-validation-while-doing-multigpu-training-using-ddp",980 "posts_count": 3,981 "reply_count": 1,982 "highest_post_number": 3,983 "image_url": null,984 "created_at": "2025-01-03T16:49:37.239Z",985 "last_posted_at": "2025-01-10T11:08:54.451Z",986 "bumped": true,987 "bumped_at": "2025-01-10T11:08:54.451Z",988 "archetype": "regular",989 "unseen": false,990 "pinned": false,991 "unpinned": null,992 "visible": true,993 "closed": false,994 "archived": false,995 "bookmarked": null,996 "liked": null,997 "tags_descriptions": {},998 "like_count": 0,999 "views": 201,1000 "category_id": 12,1001 "featured_link": null,1002 "has_accepted_answer": false,1003 "posters": [1004 {1005 "extras": "latest",1006 "description": "Original Poster, Most Recent Poster",1007 "user": {1008 "id": 81861,1009 "username": "Mukil",1010 "name": "Mukil",1011 "avatar_template": "/user_avatar/discuss.pytorch.org/mukil/{size}/74883_2.png",1012 "trust_level": 11013 }1014 },1015 {1016 "extras": null,1017 "description": "Frequent Poster",1018 "user": {1019 "id": 49515,1020 "username": "agu",1021 "name": "Andrew Gu",1022 "avatar_template": "/user_avatar/discuss.pytorch.org/agu/{size}/49913_2.png",1023 "trust_level": 21024 }1025 }1026 ]1027 },1028 {1029 "fancy_title": "c10::DistBackendError after 120 epochs",1030 "id": 215492,1031 "title": "c10::DistBackendError after 120 epochs",1032 "slug": "c10-distbackenderror-after-120-epochs",1033 "posts_count": 3,1034 "reply_count": 2,1035 "highest_post_number": 4,1036 "image_url": null,1037 "created_at": "2025-01-16T22:27:04.695Z",1038 "last_posted_at": "2025-01-17T15:13:24.913Z",1039 "bumped": true,1040 "bumped_at": "2025-01-17T15:13:24.913Z",1041 "archetype": "regular",1042 "unseen": false,1043 "pinned": false,1044 "unpinned": null,1045 "visible": true,1046 "closed": false,1047 "archived": false,1048 "bookmarked": null,1049 "liked": null,1050 "tags_descriptions": {},1051 "like_count": 0,1052 "views": 557,1053 "category_id": 12,1054 "featured_link": null,1055 "has_accepted_answer": false,1056 "posters": [1057 {1058 "extras": "latest",1059 "description": "Original Poster, Most Recent Poster",1060 "user": {1061 "id": 40053,1062 "username": "Boltzmachine",1063 "name": "qiuweikang",1064 "avatar_template": "/user_avatar/discuss.pytorch.org/boltzmachine/{size}/32323_2.png",1065 "trust_level": 11066 }1067 },1068 {1069 "extras": null,1070 "description": "Frequent Poster",1071 "user": {1072 "id": 3534,1073 "username": "ptrblck",1074 "name": "",1075 "avatar_template": "/user_avatar/discuss.pytorch.org/ptrblck/{size}/1823_2.png",1076 "admin": true,1077 "moderator": true,1078 "trust_level": 21079 }1080 }1081 ]1082 },1083 {1084 "fancy_title": "How to correctly use model weights outside of forward in distributed training set-up with DDP?",1085 "id": 212892,1086 "title": "How to correctly use model weights outside of forward in distributed training set-up with DDP?",1087 "slug": "how-to-correctly-use-model-weights-outside-of-forward-in-distributed-training-set-up-with-ddp",1088 "posts_count": 1,1089 "reply_count": 0,1090 "highest_post_number": 1,1091 "image_url": null,1092 "created_at": "2024-11-12T21:59:06.136Z",1093 "last_posted_at": "2024-11-12T21:59:06.186Z",1094 "bumped": true,1095 "bumped_at": "2024-11-12T21:59:06.186Z",1096 "archetype": "regular",1097 "unseen": false,1098 "pinned": false,1099 "unpinned": null,1100 "visible": true,1101 "closed": false,1102 "archived": false,1103 "bookmarked": null,1104 "liked": null,1105 "tags_descriptions": {},1106 "like_count": 0,1107 "views": 28,1108 "category_id": 12,1109 "featured_link": null,1110 "has_accepted_answer": false,1111 "posters": [1112 {1113 "extras": "latest single",1114 "description": "Original Poster, Most Recent Poster",1115 "user": {1116 "id": 80869,1117 "username": "marg.hovo",1118 "name": "",1119 "avatar_template": "/user_avatar/discuss.pytorch.org/marg.hovo/{size}/73965_2.png",1120 "trust_level": 11121 }1122 }1123 ]1124 },1125 {1126 "fancy_title": "How to save model state in pytorch fsdp",1127 "id": 214606,1128 "title": "How to save model state in pytorch fsdp",1129 "slug": "how-to-save-model-state-in-pytorch-fsdp",1130 "posts_count": 3,1131 "reply_count": 1,1132 "highest_post_number": 3,1133 "image_url": null,1134 "created_at": "2024-12-24T13:59:35.014Z",1135 "last_posted_at": "2024-12-27T07:38:55.303Z",1136 "bumped": true,1137 "bumped_at": "2024-12-27T07:38:55.303Z",1138 "archetype": "regular",1139 "unseen": false,1140 "pinned": false,1141 "unpinned": null,1142 "visible": true,1143 "closed": false,1144 "archived": false,1145 "bookmarked": null,1146 "liked": null,1147 "tags_descriptions": {},1148 "like_count": 0,1149 "views": 362,1150 "category_id": 12,1151 "featured_link": null,1152 "has_accepted_answer": false,1153 "posters": [1154 {1155 "extras": "latest",1156 "description": "Original Poster, Most Recent Poster",1157 "user": {1158 "id": 81693,1159 "username": "qibin0506",1160 "name": "qibin",1161 "avatar_template": "/user_avatar/discuss.pytorch.org/qibin0506/{size}/74706_2.png",1162 "trust_level": 11163 }1164 },1165 {1166 "extras": null,1167 "description": "Frequent Poster",1168 "user": {1169 "id": 39542,1170 "username": "H-Huang",1171 "name": "Howard Huang",1172 "avatar_template": "/user_avatar/discuss.pytorch.org/h-huang/{size}/35598_2.png",1173 "trust_level": 21174 }1175 }1176 ]1177 },1178 {1179 "fancy_title": "Gradient not accumulated across nodes in deepspeed code",1180 "id": 221347,1181 "title": "Gradient not accumulated across nodes in deepspeed code",1182 "slug": "gradient-not-accumulated-across-nodes-in-deepspeed-code",1183 "posts_count": 3,1184 "reply_count": 1,1185 "highest_post_number": 4,1186 "image_url": null,1187 "created_at": "2025-07-08T07:27:38.972Z",1188 "last_posted_at": "2025-07-27T04:52:51.011Z",1189 "bumped": true,1190 "bumped_at": "2025-07-27T04:52:51.011Z",1191 "archetype": "regular",1192 "unseen": false,1193 "pinned": false,1194 "unpinned": null,1195 "visible": true,1196 "closed": false,1197 "archived": false,1198 "bookmarked": null,1199 "liked": null,1200 "tags_descriptions": {},