CoolFace
Datasetpublic

Anurag1734/cuda-error-resolution-analysis

sourceHugging Faceupdated 2mo agoView on Hugging Face
0likes7downloads
topics_batch_355.json63624 linesDownload Raw Back to raw
1[2  {3    "post_stream": {4      "posts": [5        {6          "id": 276689,7          "name": "Midhilesh",8          "username": "Midhilesh",9          "avatar_template": "/letter_avatar_proxy/v4/letter/m/87869e/{size}.png",10          "created_at": "2021-04-12T06:30:49.437Z",11          "cooked": "<p>I am currently studying distributed RPC for hybrid parallelism. From the documentation, I figured out RPC supports TensorPipe backend and it is a point-to-point communication. But for hybrid parallelism, I need all-to-all collective communication. Are there any ways for implementing hybrid parallelism with collective communication using distributed RPC?.</p>\n<p>I kindly request anyone to provide a solution for this issue.</p>",12          "post_number": 1,13          "post_type": 1,14          "posts_count": 3,15          "updated_at": "2021-04-12T06:30:49.437Z",16          "reply_count": 0,17          "reply_to_post_number": null,18          "quote_count": 0,19          "incoming_link_count": 105,20          "reads": 8,21          "readers_count": 7,22          "score": 521.6,23          "yours": false,24          "topic_id": 117871,25          "topic_slug": "whether-distributed-rpc-supports-collective-communication",26          "display_username": "Midhilesh",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": 1,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": 29062,48          "hidden": false,49          "trust_level": 2,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/whether-distributed-rpc-supports-collective-communication/117871/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          "id": 276791,64          "name": "Alexander Golynski",65          "username": "agolynski",66          "avatar_template": "/user_avatar/discuss.pytorch.org/agolynski/{size}/35451_2.png",67          "created_at": "2021-04-12T17:15:50.402Z",68          "cooked": "<p>cc Luca <a class=\"mention\" href=\"/u/lcw\">@lcw</a></p>\n<p>I think the main usecase of tensorpipe is not collectives, you can use other solutions, e.g. NCCL, GLOO, UCC.</p>\n<p>Luca, are there plans for tensorpipe to be a backend for such collectives?</p>",69          "post_number": 2,70          "post_type": 1,71          "posts_count": 3,72          "updated_at": "2021-04-12T17:15:50.402Z",73          "reply_count": 0,74          "reply_to_post_number": null,75          "quote_count": 0,76          "incoming_link_count": 1,77          "reads": 7,78          "readers_count": 6,79          "score": 6.4,80          "yours": false,81          "topic_id": 117871,82          "topic_slug": "whether-distributed-rpc-supports-collective-communication",83          "display_username": "Alexander Golynski",84          "primary_group_name": null,85          "flair_name": null,86          "flair_url": null,87          "flair_bg_color": null,88          "flair_color": null,89          "flair_group_id": null,90          "badges_granted": [],91          "version": 1,92          "can_edit": false,93          "can_delete": false,94          "can_recover": false,95          "can_see_hidden_post": false,96          "can_wiki": false,97          "read": true,98          "user_title": null,99          "bookmarked": false,100          "actions_summary": [],101          "moderator": false,102          "admin": false,103          "staff": false,104          "user_id": 32645,105          "hidden": false,106          "trust_level": 2,107          "deleted_at": null,108          "user_deleted": false,109          "edit_reason": null,110          "can_view_edit_history": true,111          "wiki": false,112          "post_url": "/t/whether-distributed-rpc-supports-collective-communication/117871/2",113          "can_accept_answer": false,114          "can_unaccept_answer": false,115          "accepted_answer": false,116          "topic_accepted_answer": null117        },118        {119          "id": 277741,120          "name": "Luca Wehrstedt",121          "username": "lcw",122          "avatar_template": "/letter_avatar_proxy/v4/letter/l/b5e925/{size}.png",123          "created_at": "2021-04-16T09:10:01.860Z",124          "cooked": "<p>Yes, correct, we currently don’t provide a way to do collectives on top of RPC/TensorPipe. The rationale is that the “native” collective libraries (NCCL, Gloo, MPI) are already doing a much better job at this, hence we’re not optimizing TensorPipe and RPC for that use case. However you should be able to combine RPC with the collective libraries very easily. Here is a tutorial showing how to do so with DDP, but if you prefer to use the “lower-level” API that should work too: <a href=\"https://pytorch.org/tutorials/advanced/rpc_ddp_tutorial.html\" class=\"inline-onebox\" rel=\"noopener nofollow ugc\">Combining Distributed DataParallel with Distributed RPC Framework — PyTorch Tutorials 1.8.1+cu102 documentation</a></p>",125          "post_number": 3,126          "post_type": 1,127          "posts_count": 3,128          "updated_at": "2021-04-16T09:10:01.860Z",129          "reply_count": 0,130          "reply_to_post_number": null,131          "quote_count": 0,132          "incoming_link_count": 1,133          "reads": 6,134          "readers_count": 5,135          "score": 21.2,136          "yours": false,137          "topic_id": 117871,138          "topic_slug": "whether-distributed-rpc-supports-collective-communication",139          "display_username": "Luca Wehrstedt",140          "primary_group_name": null,141          "flair_name": null,142          "flair_url": null,143          "flair_bg_color": null,144          "flair_color": null,145          "flair_group_id": null,146          "badges_granted": [],147          "version": 1,148          "can_edit": false,149          "can_delete": false,150          "can_recover": false,151          "can_see_hidden_post": false,152          "can_wiki": false,153          "link_counts": [154            {155              "url": "https://pytorch.org/tutorials/advanced/rpc_ddp_tutorial.html",156              "internal": false,157              "reflection": false,158              "title": "Combining Distributed DataParallel with Distributed RPC Framework — PyTorch Tutorials 1.8.1+cu102 documentation",159              "clicks": 8160            }161          ],162          "read": true,163          "user_title": null,164          "bookmarked": false,165          "actions_summary": [166            {167              "id": 2,168              "count": 1169            }170          ],171          "moderator": false,172          "admin": false,173          "staff": false,174          "user_id": 33843,175          "hidden": false,176          "trust_level": 1,177          "deleted_at": null,178          "user_deleted": false,179          "edit_reason": null,180          "can_view_edit_history": true,181          "wiki": false,182          "post_url": "/t/whether-distributed-rpc-supports-collective-communication/117871/3",183          "can_accept_answer": false,184          "can_unaccept_answer": false,185          "accepted_answer": false,186          "topic_accepted_answer": null187        }188      ],189      "stream": [190        276689,191        276791,192        277741193      ]194    },195    "timeline_lookup": [196      [197        1,198        1658199      ],200      [201        2,202        1657203      ],204      [205        3,206        1654207      ]208    ],209    "suggested_topics": [210      {211        "fancy_title": "FSDP clarifying questions",212        "id": 216159,213        "title": "FSDP clarifying questions",214        "slug": "fsdp-clarifying-questions",215        "posts_count": 1,216        "reply_count": 0,217        "highest_post_number": 1,218        "image_url": "https://discuss.pytorch.org/uploads/default/optimized/3X/7/e/7e4f544ff3e53365869083460811a12c04e40f1b_2_1024x462.png",219        "created_at": "2025-02-03T02:48:51.398Z",220        "last_posted_at": "2025-02-03T02:48:51.437Z",221        "bumped": true,222        "bumped_at": "2025-02-03T02:48:51.437Z",223        "archetype": "regular",224        "unseen": false,225        "pinned": false,226        "unpinned": null,227        "visible": true,228        "closed": false,229        "archived": false,230        "bookmarked": null,231        "liked": null,232        "tags_descriptions": {},233        "like_count": 0,234        "views": 128,235        "category_id": 12,236        "featured_link": null,237        "has_accepted_answer": false,238        "posters": [239          {240            "extras": "latest single",241            "description": "Original Poster, Most Recent Poster",242            "user": {243              "id": 82447,244              "username": "Samir_Char",245              "name": "Samir Char",246              "avatar_template": "/user_avatar/discuss.pytorch.org/samir_char/{size}/75136_2.png",247              "trust_level": 0248            }249          }250        ]251      },252      {253        "fancy_title": "CUDA error: unspecified launch failure and NCCL issues",254        "id": 212730,255        "title": "CUDA error: unspecified launch failure and NCCL issues",256        "slug": "cuda-error-unspecified-launch-failure-and-nccl-issues",257        "posts_count": 5,258        "reply_count": 2,259        "highest_post_number": 5,260        "image_url": null,261        "created_at": "2024-11-09T09:22:09.753Z",262        "last_posted_at": "2024-11-12T04:04:14.580Z",263        "bumped": true,264        "bumped_at": "2024-11-12T04:04:14.580Z",265        "archetype": "regular",266        "unseen": false,267        "pinned": false,268        "unpinned": null,269        "visible": true,270        "closed": false,271        "archived": false,272        "bookmarked": null,273        "liked": null,274        "tags_descriptions": {},275        "like_count": 0,276        "views": 440,277        "category_id": 12,278        "featured_link": null,279        "has_accepted_answer": false,280        "posters": [281          {282            "extras": "latest",283            "description": "Original Poster, Most Recent Poster",284            "user": {285              "id": 12941,286              "username": "Saurabh_Kataria",287              "name": "Saurabh Kataria",288              "avatar_template": "/user_avatar/discuss.pytorch.org/saurabh_kataria/{size}/12442_2.png",289              "trust_level": 2290            }291          },292          {293            "extras": null,294            "description": "Frequent Poster",295            "user": {296              "id": 3534,297              "username": "ptrblck",298              "name": "",299              "avatar_template": "/user_avatar/discuss.pytorch.org/ptrblck/{size}/1823_2.png",300              "admin": true,301              "moderator": true,302              "trust_level": 2303            }304          }305        ]306      },307      {308        "fancy_title": "Cuda not available when running multi-gpu inference",309        "id": 212604,310        "title": "Cuda not available when running multi-gpu inference",311        "slug": "cuda-not-available-when-running-multi-gpu-inference",312        "posts_count": 5,313        "reply_count": 3,314        "highest_post_number": 5,315        "image_url": null,316        "created_at": "2024-11-06T09:40:57.712Z",317        "last_posted_at": "2024-11-19T09:13:35.999Z",318        "bumped": true,319        "bumped_at": "2024-11-19T09:13:35.999Z",320        "archetype": "regular",321        "unseen": false,322        "pinned": false,323        "unpinned": null,324        "visible": true,325        "closed": false,326        "archived": false,327        "bookmarked": null,328        "liked": null,329        "tags_descriptions": {},330        "like_count": 0,331        "views": 363,332        "category_id": 12,333        "featured_link": null,334        "has_accepted_answer": true,335        "posters": [336          {337            "extras": "latest",338            "description": "Original Poster, Most Recent Poster, Accepted Answer",339            "user": {340              "id": 80724,341              "username": "paulge",342              "name": "",343              "avatar_template": "/letter_avatar_proxy/v4/letter/p/82dd89/{size}.png",344              "trust_level": 2345            }346          },347          {348            "extras": null,349            "description": "Frequent Poster",350            "user": {351              "id": 3534,352              "username": "ptrblck",353              "name": "",354              "avatar_template": "/user_avatar/discuss.pytorch.org/ptrblck/{size}/1823_2.png",355              "admin": true,356              "moderator": true,357              "trust_level": 2358            }359          }360        ]361      },362      {363        "fancy_title": "Performance regarding `group` argument in p2p comm",364        "id": 212598,365        "title": "Performance regarding `group` argument in p2p comm",366        "slug": "performance-regarding-group-argument-in-p2p-comm",367        "posts_count": 1,368        "reply_count": 0,369        "highest_post_number": 1,370        "image_url": null,371        "created_at": "2024-11-06T06:47:19.610Z",372        "last_posted_at": "2024-11-06T06:47:19.663Z",373        "bumped": true,374        "bumped_at": "2024-11-06T08:24:48.091Z",375        "archetype": "regular",376        "unseen": false,377        "pinned": false,378        "unpinned": null,379        "visible": true,380        "closed": false,381        "archived": false,382        "bookmarked": null,383        "liked": null,384        "tags_descriptions": {},385        "like_count": 0,386        "views": 119,387        "category_id": 12,388        "featured_link": null,389        "has_accepted_answer": false,390        "posters": [391          {392            "extras": "latest single",393            "description": "Original Poster, Most Recent Poster",394            "user": {395              "id": 70154,396              "username": "Fan_Hong",397              "name": "Fan Hong",398              "avatar_template": "/user_avatar/discuss.pytorch.org/fan_hong/{size}/64638_2.png",399              "trust_level": 1400            }401          }402        ]403      },404      {405        "fancy_title": "Gradient not accumulated across nodes in deepspeed code",406        "id": 221347,407        "title": "Gradient not accumulated across nodes in deepspeed code",408        "slug": "gradient-not-accumulated-across-nodes-in-deepspeed-code",409        "posts_count": 3,410        "reply_count": 1,411        "highest_post_number": 4,412        "image_url": null,413        "created_at": "2025-07-08T07:27:38.972Z",414        "last_posted_at": "2025-07-27T04:52:51.011Z",415        "bumped": true,416        "bumped_at": "2025-07-27T04:52:51.011Z",417        "archetype": "regular",418        "unseen": false,419        "pinned": false,420        "unpinned": null,421        "visible": true,422        "closed": false,423        "archived": false,424        "bookmarked": null,425        "liked": null,426        "tags_descriptions": {},427        "like_count": 2,428        "views": 98,429        "category_id": 12,430        "featured_link": null,431        "has_accepted_answer": false,432        "posters": [433          {434            "extras": "latest",435            "description": "Original Poster, Most Recent Poster",436            "user": {437              "id": 84982,438              "username": "ahhyun",439              "name": null,440              "avatar_template": "/letter_avatar_proxy/v4/letter/a/e56c9b/{size}.png",441              "trust_level": 1442            }443          },444          {445            "extras": null,446            "description": "Frequent Poster",447            "user": {448              "id": 6225,449              "username": "yf225",450              "name": "PyTorch Developer, Meta",451              "avatar_template": "/user_avatar/discuss.pytorch.org/yf225/{size}/3418_2.png",452              "trust_level": 2453            }454          }455        ]456      }457    ],458    "tags_descriptions": {},459    "fancy_title": "Whether distributed RPC supports collective communication?",460    "id": 117871,461    "title": "Whether distributed RPC supports collective communication?",462    "posts_count": 3,463    "created_at": "2021-04-12T06:30:49.390Z",464    "views": 488,465    "reply_count": 0,466    "like_count": 1,467    "last_posted_at": "2021-04-16T09:10:01.860Z",468    "visible": true,469    "closed": false,470    "archived": false,471    "has_summary": false,472    "archetype": "regular",473    "slug": "whether-distributed-rpc-supports-collective-communication",474    "category_id": 12,475    "word_count": 194,476    "deleted_at": null,477    "user_id": 29062,478    "featured_link": null,479    "pinned_globally": false,480    "pinned_at": null,481    "pinned_until": null,482    "image_url": null,483    "slow_mode_seconds": 0,484    "draft": null,485    "draft_key": "topic_117871",486    "draft_sequence": null,487    "unpinned": null,488    "pinned": false,489    "current_post_number": 1,490    "highest_post_number": 3,491    "deleted_by": null,492    "actions_summary": [493      {494        "id": 4,495        "count": 0,496        "hidden": false,497        "can_act": false498      },499      {500        "id": 8,501        "count": 0,502        "hidden": false,503        "can_act": false504      },505      {506        "id": 10,507        "count": 0,508        "hidden": false,509        "can_act": false510      },511      {512        "id": 7,513        "count": 0,514        "hidden": false,515        "can_act": false516      }517    ],518    "chunk_size": 20,519    "bookmarked": false,520    "topic_timer": null,521    "message_bus_last_id": 0,522    "participant_count": 3,523    "show_read_indicator": false,524    "thumbnails": null,525    "slow_mode_enabled_until": null,526    "can_vote": false,527    "vote_count": 0,528    "user_voted": false,529    "discourse_zendesk_plugin_zendesk_id": null,530    "discourse_zendesk_plugin_zendesk_url": "https://your-url.zendesk.com/agent/tickets/",531    "details": {532      "can_edit": false,533      "notification_level": 1,534      "participants": [535        {536          "id": 29062,537          "username": "Midhilesh",538          "name": "Midhilesh",539          "avatar_template": "/letter_avatar_proxy/v4/letter/m/87869e/{size}.png",540          "post_count": 1,541          "primary_group_name": null,542          "flair_name": null,543          "flair_url": null,544          "flair_color": null,545          "flair_bg_color": null,546          "flair_group_id": null,547          "trust_level": 2548        },549        {550          "id": 32645,551          "username": "agolynski",552          "name": "Alexander Golynski",553          "avatar_template": "/user_avatar/discuss.pytorch.org/agolynski/{size}/35451_2.png",554          "post_count": 1,555          "primary_group_name": null,556          "flair_name": null,557          "flair_url": null,558          "flair_color": null,559          "flair_bg_color": null,560          "flair_group_id": null,561          "trust_level": 2562        },563        {564          "id": 33843,565          "username": "lcw",566          "name": "Luca Wehrstedt",567          "avatar_template": "/letter_avatar_proxy/v4/letter/l/b5e925/{size}.png",568          "post_count": 1,569          "primary_group_name": null,570          "flair_name": null,571          "flair_url": null,572          "flair_color": null,573          "flair_bg_color": null,574          "flair_group_id": null,575          "trust_level": 1576        }577      ],578      "created_by": {579        "id": 29062,580        "username": "Midhilesh",581        "name": "Midhilesh",582        "avatar_template": "/letter_avatar_proxy/v4/letter/m/87869e/{size}.png"583      },584      "last_poster": {585        "id": 33843,586        "username": "lcw",587        "name": "Luca Wehrstedt",588        "avatar_template": "/letter_avatar_proxy/v4/letter/l/b5e925/{size}.png"589      },590      "links": [591        {592          "url": "https://pytorch.org/tutorials/advanced/rpc_ddp_tutorial.html",593          "title": "Combining Distributed DataParallel with Distributed RPC Framework — PyTorch Tutorials 1.8.1+cu102 documentation",594          "internal": false,595          "attachment": false,596          "reflection": false,597          "clicks": 8,598          "user_id": 33843,599          "domain": "pytorch.org",600          "root_domain": "pytorch.org"601        }602      ]603    },604    "bookmarks": []605  },606  {607    "post_stream": {608      "posts": [609        {610          "id": 277396,611          "name": "Keiichi Kuroyanagi",612          "username": "Keiku",613          "avatar_template": "/user_avatar/discuss.pytorch.org/keiku/{size}/36340_2.png",614          "created_at": "2021-04-15T06:24:27.701Z",615          "cooked": "<p>When I made the following changes to remove <code>seq_length</code>, I got the following error.</p>\n<p><code>RuntimeError: Tensor for 'out' is on CPU, Tensor for argument #1 'self' is on CPU, but expected them to be on GPU (while checking arguments for addmm)</code></p>\n<p>This error occurs at <code>x = fc(x)</code>. How can I change it to remove <code>seq_length</code>?</p>\n<pre><code class=\"lang-auto\">class CNNLSTM(nn.Module):\n    def __init__(\n            self,\n            num_classes,\n            latent_dim=512,\n            num_channels=4,\n            lstm_layers=1,\n            hidden_dim=1024,\n            # seq_length=40, # I want to remove this parameter\n            bidirectional=True,\n            attention=True,\n    ):\n        super(CNNLSTM, self).__init__()\n        self.encoder = Encoder(latent_dim, num_channels)\n        self.lstm = LSTM(latent_dim, lstm_layers, hidden_dim, bidirectional)\n        # Comment to remove seq_length\n        # self.fc = nn.Linear(2 * hidden_dim if bidirectional else hidden_dim,\n        #                     seq_length * num_classes)\n        self.output_layers = nn.Sequential(\n            nn.Softmax(dim=-1),\n        )\n        self.bidirectional = bidirectional\n        self.attention = attention\n        self.num_classes = num_classes\n        self.hidden_dim = hidden_dim\n        self.attention_layer = nn.Linear(\n            2 * hidden_dim if bidirectional else hidden_dim, 1\n        )\n\n    def forward(self, x):\n        batch_size, seq_length, c, h, w = x.shape\n        x = x.view(batch_size * seq_length, c, h, w)\n        x = self.encoder(x)\n        x = x.view(batch_size, seq_length, -1)\n        x = self.lstm(x)\n        if self.attention:\n            attention_w = F.softmax(self.attention_layer(x).squeeze(-1), dim=-1)\n            x = torch.sum(attention_w.unsqueeze(-1) * x, dim=1)\n        else:\n            x = x[:, -1]\n        # x = self.fc(x) # Comment to remove seq_length\n        # Define the following to get seq_length dynamically\n        fc = nn.Linear(2 * self.hidden_dim if self.bidirectional else self.hidden_dim, seq_length * self.num_classes)\n        x = fc(x)\n        x = x.reshape(batch_size * seq_length, -1)\n        x = x.view(batch_size, seq_length, -1)\n        output = self.output_layers(x)\n        return output\n</code></pre>\n<p>The model before removing <code>seq_length</code> worked fine, but it was wrong as the model to use.</p>",616          "post_number": 1,617          "post_type": 1,618          "posts_count": 2,619          "updated_at": "2021-04-15T09:05:35.573Z",620          "reply_count": 0,621          "reply_to_post_number": null,622          "quote_count": 0,623          "incoming_link_count": 54,624          "reads": 5,625          "readers_count": 4,626          "score": 271.0,627          "yours": false,628          "topic_id": 118258,629          "topic_slug": "how-can-i-change-model-to-remove-seq-length",630          "display_username": "Keiichi Kuroyanagi",631          "primary_group_name": null,632          "flair_name": null,633          "flair_url": null,634          "flair_bg_color": null,635          "flair_color": null,636          "flair_group_id": null,637          "badges_granted": [],638          "version": 2,639          "can_edit": false,640          "can_delete": false,641          "can_recover": false,642          "can_see_hidden_post": false,643          "can_wiki": false,644          "read": true,645          "user_title": null,646          "bookmarked": false,647          "actions_summary": [],648          "moderator": false,649          "admin": false,650          "staff": false,651          "user_id": 43575,652          "hidden": false,653          "trust_level": 1,654          "deleted_at": null,655          "user_deleted": false,656          "edit_reason": null,657          "can_view_edit_history": true,658          "wiki": false,659          "post_url": "/t/how-can-i-change-model-to-remove-seq-length/118258/1",660          "can_accept_answer": false,661          "can_unaccept_answer": false,662          "accepted_answer": false,663          "topic_accepted_answer": true,664          "can_vote": false665        },666        {667          "id": 277731,668          "name": "Keiichi Kuroyanagi",669          "username": "Keiku",670          "avatar_template": "/user_avatar/discuss.pytorch.org/keiku/{size}/36340_2.png",671          "created_at": "2021-04-16T08:48:55.391Z",672          "cooked": "<p>It turns out that it is possible to remove seq_length without Attention as shown below.</p>\n<pre><code class=\"lang-auto\">class CNNLSTM(nn.Module):\n    def __init__(\n            self,\n            num_classes,\n            latent_dim=512,\n            num_channels=4,\n            lstm_layers=1,\n            hidden_dim=1024,\n            bidirectional=True,\n            attention=True,\n    ):\n        super(CNNLSTM, self).__init__()\n        self.encoder = Encoder(latent_dim, num_channels)\n        self.lstm = LSTM(latent_dim, lstm_layers, hidden_dim, bidirectional)\n        self.fc = nn.Linear(2 * hidden_dim if bidirectional else hidden_dim, num_classes)\n        self.output_layers = nn.Sequential(\n            nn.Softmax(dim=-1),\n        )\n        self.bidirectional = bidirectional\n        self.attention = attention\n        self.attention_layer = nn.Linear(\n            2 * hidden_dim if bidirectional else hidden_dim, 1\n        )\n\n    def forward(self, x):\n        batch_size, seq_length, c, h, w = x.shape\n        x = x.view(batch_size * seq_length, c, h, w)\n        x = self.encoder(x)\n        x = x.view(batch_size, seq_length, -1)\n        x = self.lstm(x)\n        x = x.reshape(batch_size * seq_length, -1)\n        # NOTE: Comment because it is possible to remove seq_length without Attention\n        # if self.attention:\n        #     attention_w = F.softmax(self.attention_layer(x).squeeze(-1), dim=-1)\n        #     x = torch.sum(attention_w.unsqueeze(-1) * x, dim=1)\n        # else:\n        #     x = x[:, -1]\n        x = self.fc(x)\n        x = x.view(batch_size, seq_length, -1)\n        output = self.output_layers(x)\n        return output\n</code></pre>",673          "post_number": 2,674          "post_type": 1,675          "posts_count": 2,676          "updated_at": "2021-04-16T08:49:04.438Z",677          "reply_count": 0,678          "reply_to_post_number": null,679          "quote_count": 0,680          "incoming_link_count": 1,681          "reads": 3,682          "readers_count": 2,683          "score": 5.6,684          "yours": false,685          "topic_id": 118258,686          "topic_slug": "how-can-i-change-model-to-remove-seq-length",687          "display_username": "Keiichi Kuroyanagi",688          "primary_group_name": null,689          "flair_name": null,690          "flair_url": null,691          "flair_bg_color": null,692          "flair_color": null,693          "flair_group_id": null,694          "badges_granted": [],695          "version": 1,696          "can_edit": false,697          "can_delete": false,698          "can_recover": false,699          "can_see_hidden_post": false,700          "can_wiki": false,701          "read": true,702          "user_title": null,703          "bookmarked": false,704          "actions_summary": [],705          "moderator": false,706          "admin": false,707          "staff": false,708          "user_id": 43575,709          "hidden": false,710          "trust_level": 1,711          "deleted_at": null,712          "user_deleted": false,713          "edit_reason": null,714          "can_view_edit_history": true,715          "wiki": false,716          "post_url": "/t/how-can-i-change-model-to-remove-seq-length/118258/2",717          "can_accept_answer": false,718          "can_unaccept_answer": false,719          "accepted_answer": true,720          "topic_accepted_answer": true721        }722      ],723      "stream": [724        277396,725        277731726      ]727    },728    "timeline_lookup": [729      [730        1,731        1655732      ],733      [734        2,735        1654736      ]737    ],738    "suggested_topics": [739      {740        "fancy_title": "Resnet101 encoder with U-Net decoder from scratch - tensor size issue",741        "id": 212738,742        "title": "Resnet101 encoder with U-Net decoder from scratch - tensor size issue",743        "slug": "resnet101-encoder-with-u-net-decoder-from-scratch-tensor-size-issue",744        "posts_count": 1,745        "reply_count": 0,746        "highest_post_number": 1,747        "image_url": null,748        "created_at": "2024-11-09T13:32:48.917Z",749        "last_posted_at": "2024-11-09T13:32:48.977Z",750        "bumped": true,751        "bumped_at": "2024-11-09T13:32:48.977Z",752        "archetype": "regular",753        "unseen": false,754        "pinned": false,755        "unpinned": null,756        "visible": true,757        "closed": false,758        "archived": false,759        "bookmarked": null,760        "liked": null,761        "tags_descriptions": {},762        "like_count": 0,763        "views": 186,764        "category_id": 5,765        "featured_link": null,766        "has_accepted_answer": false,767        "posters": [768          {769            "extras": "latest single",770            "description": "Original Poster, Most Recent Poster",771            "user": {772              "id": 80787,773              "username": "neen4",774              "name": "",775              "avatar_template": "/letter_avatar_proxy/v4/letter/n/4af34b/{size}.png",776              "trust_level": 1777            }778          }779        ]780      },781      {782        "fancy_title": "How to extract figures with labels from image",783        "id": 213251,784        "title": "How to extract figures with labels from image",785        "slug": "how-to-extract-figures-with-labels-from-image",786        "posts_count": 1,787        "reply_count": 0,788        "highest_post_number": 1,789        "image_url": "https://discuss.pytorch.org/uploads/default/optimized/3X/3/8/3892b62f3a6f8e8d592d805f24dabb19c0533d44_2_724x1024.png",790        "created_at": "2024-11-21T06:42:18.910Z",791        "last_posted_at": "2024-11-21T06:42:18.975Z",792        "bumped": true,793        "bumped_at": "2024-11-21T06:42:55.239Z",794        "archetype": "regular",795        "unseen": false,796        "pinned": false,797        "unpinned": null,798        "visible": true,799        "closed": false,800        "archived": false,801        "bookmarked": null,802        "liked": null,803        "tags_descriptions": {},804        "like_count": 0,805        "views": 27,806        "category_id": 5,807        "featured_link": null,808        "has_accepted_answer": false,809        "posters": [810          {811            "extras": "latest single",812            "description": "Original Poster, Most Recent Poster",813            "user": {814              "id": 81040,815              "username": "stunning_World",816              "name": "stunning World",817              "avatar_template": "/user_avatar/discuss.pytorch.org/stunning_world/{size}/73382_2.png",818              "trust_level": 0819            }820          }821        ]822      },823      {824        "fancy_title": "Model predicting one classe only after running inference on test data",825        "id": 212937,826        "title": "Model predicting one classe only after running inference on test data",827        "slug": "model-predicting-one-classe-only-after-running-inference-on-test-data",828        "posts_count": 1,829        "reply_count": 0,830        "highest_post_number": 1,831        "image_url": null,832        "created_at": "2024-11-13T15:57:08.333Z",833        "last_posted_at": "2024-11-13T15:57:08.392Z",834        "bumped": true,835        "bumped_at": "2024-11-13T15:57:08.392Z",836        "archetype": "regular",837        "unseen": false,838        "pinned": false,839        "unpinned": null,840        "visible": true,841        "closed": false,842        "archived": false,843        "bookmarked": null,844        "liked": null,845        "tags_descriptions": {},846        "like_count": 0,847        "views": 93,848        "category_id": 5,849        "featured_link": null,850        "has_accepted_answer": false,851        "posters": [852          {853            "extras": "latest single",854            "description": "Original Poster, Most Recent Poster",855            "user": {856              "id": 68222,857              "username": "amy2",858              "name": "amy",859              "avatar_template": "/user_avatar/discuss.pytorch.org/amy2/{size}/62675_2.png",860              "trust_level": 1861            }862          }863        ]864      },865      {866        "fancy_title": "How to deal with split objects due to tiling",867        "id": 216637,868        "title": "How to deal with split objects due to tiling",869        "slug": "how-to-deal-with-split-objects-due-to-tiling",870        "posts_count": 1,871        "reply_count": 0,872        "highest_post_number": 1,873        "image_url": null,874        "created_at": "2025-02-13T14:15:47.413Z",875        "last_posted_at": "2025-02-13T14:15:47.450Z",876        "bumped": true,877        "bumped_at": "2025-02-13T14:15:47.450Z",878        "archetype": "regular",879        "unseen": false,880        "pinned": false,881        "unpinned": null,882        "visible": true,883        "closed": false,884        "archived": false,885        "bookmarked": null,886        "liked": null,887        "tags_descriptions": {},888        "like_count": 0,889        "views": 33,890        "category_id": 5,891        "featured_link": null,892        "has_accepted_answer": false,893        "posters": [894          {895            "extras": "latest single",896            "description": "Original Poster, Most Recent Poster",897            "user": {898              "id": 80242,899              "username": "matiasV-TYN",900              "name": "Matias V Tyn",901              "avatar_template": "/user_avatar/discuss.pytorch.org/matiasv-tyn/{size}/73351_2.png",902              "trust_level": 1903            }904          }905        ]906      },907      {908        "fancy_title": "Simple CNN model takes too much memory when forward() is called",909        "id": 217883,910        "title": "Simple CNN model takes too much memory when forward() is called",911        "slug": "simple-cnn-model-takes-too-much-memory-when-forward-is-called",912        "posts_count": 2,913        "reply_count": 0,914        "highest_post_number": 2,915        "image_url": null,916        "created_at": "2025-03-15T15:07:13.694Z",917        "last_posted_at": "2025-03-15T15:53:48.961Z",918        "bumped": true,919        "bumped_at": "2025-03-15T15:53:48.961Z",920        "archetype": "regular",921        "unseen": false,922        "pinned": false,923        "unpinned": null,924        "visible": true,925        "closed": false,926        "archived": false,927        "bookmarked": null,928        "liked": null,929        "tags_descriptions": {},930        "like_count": 0,931        "views": 56,932        "category_id": 5,933        "featured_link": null,934        "has_accepted_answer": true,935        "posters": [936          {937            "extras": null,938            "description": "Original Poster",939            "user": {940              "id": 83291,941              "username": "Nyx",942              "name": "Nyx",943              "avatar_template": "/user_avatar/discuss.pytorch.org/nyx/{size}/76178_2.png",944              "trust_level": 1945            }946          },947          {948            "extras": "latest",949            "description": "Most Recent Poster, Accepted Answer",950            "user": {951              "id": 3534,952              "username": "ptrblck",953              "name": "",954              "avatar_template": "/user_avatar/discuss.pytorch.org/ptrblck/{size}/1823_2.png",955              "admin": true,956              "moderator": true,957              "trust_level": 2958            }959          }960        ]961      }962    ],963    "tags_descriptions": {},964    "fancy_title": "How can I change model to remove seq_length?",965    "id": 118258,966    "title": "How can I change model to remove seq_length?",967    "posts_count": 2,968    "created_at": "2021-04-15T06:24:27.625Z",969    "views": 494,970    "reply_count": 0,971    "like_count": 0,972    "last_posted_at": "2021-04-16T08:48:55.391Z",973    "visible": true,974    "closed": false,975    "archived": false,976    "has_summary": false,977    "archetype": "regular",978    "slug": "how-can-i-change-model-to-remove-seq-length",979    "category_id": 5,980    "word_count": 452,981    "deleted_at": null,982    "user_id": 43575,983    "featured_link": null,984    "pinned_globally": false,985    "pinned_at": null,986    "pinned_until": null,987    "image_url": null,988    "slow_mode_seconds": 0,989    "draft": null,990    "draft_key": "topic_118258",991    "draft_sequence": null,992    "unpinned": null,993    "pinned": false,994    "current_post_number": 1,995    "highest_post_number": 2,996    "deleted_by": null,997    "actions_summary": [998      {999        "id": 4,1000        "count": 0,1001        "hidden": false,1002        "can_act": false1003      },1004      {1005        "id": 8,1006        "count": 0,1007        "hidden": false,1008        "can_act": false1009      },1010      {1011        "id": 10,1012        "count": 0,1013        "hidden": false,1014        "can_act": false1015      },1016      {1017        "id": 7,1018        "count": 0,1019        "hidden": false,1020        "can_act": false1021      }1022    ],1023    "chunk_size": 20,1024    "bookmarked": false,1025    "topic_timer": null,1026    "message_bus_last_id": 0,1027    "participant_count": 1,1028    "show_read_indicator": false,1029    "thumbnails": null,1030    "slow_mode_enabled_until": null,1031    "accepted_answer": {1032      "post_number": 2,1033      "username": "Keiku",1034      "name": "Keiichi Kuroyanagi",1035      "excerpt": "It turns out that it is possible to remove seq_length without Attention as shown below. \nclass CNNLSTM(nn.Module):\n    def __init__(\n            self,\n            num_classes,\n            latent_dim=512,\n            num_channels=4,\n            lstm_layers=1,\n            hidden_dim=1024,\n            &hellip;"1036    },1037    "can_vote": false,1038    "vote_count": 0,1039    "user_voted": false,1040    "discourse_zendesk_plugin_zendesk_id": null,1041    "discourse_zendesk_plugin_zendesk_url": "https://your-url.zendesk.com/agent/tickets/",1042    "details": {1043      "can_edit": false,1044      "notification_level": 1,1045      "participants": [1046        {1047          "id": 43575,1048          "username": "Keiku",1049          "name": "Keiichi Kuroyanagi",1050          "avatar_template": "/user_avatar/discuss.pytorch.org/keiku/{size}/36340_2.png",1051          "post_count": 2,1052          "primary_group_name": null,1053          "flair_name": null,1054          "flair_url": null,1055          "flair_color": null,1056          "flair_bg_color": null,1057          "flair_group_id": null,1058          "trust_level": 11059        }1060      ],1061      "created_by": {1062        "id": 43575,1063        "username": "Keiku",1064        "name": "Keiichi Kuroyanagi",1065        "avatar_template": "/user_avatar/discuss.pytorch.org/keiku/{size}/36340_2.png"1066      },1067      "last_poster": {1068        "id": 43575,1069        "username": "Keiku",1070        "name": "Keiichi Kuroyanagi",1071        "avatar_template": "/user_avatar/discuss.pytorch.org/keiku/{size}/36340_2.png"1072      }1073    },1074    "bookmarks": []1075  },1076  {1077    "post_stream": {1078      "posts": [1079        {1080          "id": 277705,1081          "name": "Kor_Bong",1082          "username": "111507",1083          "avatar_template": "/user_avatar/discuss.pytorch.org/111507/{size}/37191_2.png",1084          "created_at": "2021-04-16T07:57:55.306Z",1085          "cooked": "<p>Hi all!</p>\n<p>I’m just wondering how Pytorch copy data from one GPU to another when the board of your server doesn’t support P2P.</p>\n<p>It it clear that we can copy Tensor by using “.to()” function.</p>\n<p>But, I want to understand the process in detail.</p>\n<p>What I’ve found is that Pytorch use ‘cudaMemcpy’ or ‘cudaMemcpyAsync’ function at lower Level.</p>\n<p>However, if the board of a server doesn’t support P2P, then it is impossible to use ‘cudaMemcpy’ and ‘cudaMemcpyAsync’ to copy data to another GPU.</p>\n<p>Without UVA(Unified Virtual Addressing), It is unable to copy data from a GPU to another GPU by using ‘cudaMemcpy’ and ‘cudaMemcpyAsync’.</p>\n<p>What made me crazy was this <a href=\"https://discuss.pytorch.org/t/pytorch-with-cuda-unified-memory/60783\">Pytorch.forum link</a> saying Pytorch does not support UVA!</p>\n<p>I would really appreciate it if you tell me how Pytorch ‘to()’ function work at the C language level on the Non-p2p board.</p>\n<p>Thank you.</p>",1086          "post_number": 1,1087          "post_type": 1,1088          "posts_count": 1,1089          "updated_at": "2021-04-16T08:08:17.018Z",1090          "reply_count": 0,1091          "reply_to_post_number": null,1092          "quote_count": 0,1093          "incoming_link_count": 127,1094          "reads": 10,1095          "readers_count": 9,1096          "score": 637.0,1097          "yours": false,1098          "topic_id": 118409,1099          "topic_slug": "i-want-to-figure-out-how-pytorch-copy-data-from-one-gpu-to-another-when-the-board-of-a-server-doesnt-support-p2p",1100          "display_username": "Kor_Bong",1101          "primary_group_name": null,1102          "flair_name": null,1103          "flair_url": null,1104          "flair_bg_color": null,1105          "flair_color": null,1106          "flair_group_id": null,1107          "badges_granted": [],1108          "version": 2,1109          "can_edit": false,1110          "can_delete": false,1111          "can_recover": false,1112          "can_see_hidden_post": false,1113          "can_wiki": false,1114          "link_counts": [1115            {1116              "url": "https://discuss.pytorch.org/t/pytorch-with-cuda-unified-memory/60783",1117              "internal": true,1118              "reflection": false,1119              "title": "Pytorch with CUDA Unified Memory",1120              "clicks": 71121            }1122          ],1123          "read": true,1124          "user_title": "",1125          "bookmarked": false,1126          "actions_summary": [],1127          "moderator": false,1128          "admin": false,1129          "staff": false,1130          "user_id": 44370,1131          "hidden": false,1132          "trust_level": 0,1133          "deleted_at": null,1134          "user_deleted": false,1135          "edit_reason": null,1136          "can_view_edit_history": true,1137          "wiki": false,1138          "post_url": "/t/i-want-to-figure-out-how-pytorch-copy-data-from-one-gpu-to-another-when-the-board-of-a-server-doesnt-support-p2p/118409/1",1139          "can_accept_answer": false,1140          "can_unaccept_answer": false,1141          "accepted_answer": false,1142          "topic_accepted_answer": null,1143          "can_vote": false1144        }1145      ],1146      "stream": [1147        2777051148      ]1149    },1150    "timeline_lookup": [1151      [1152        1,1153        16541154      ]1155    ],1156    "suggested_topics": [1157      {1158        "fancy_title": "Sparse.mm CUDA kernel implementation",1159        "id": 219080,1160        "title": "Sparse.mm CUDA kernel implementation",1161        "slug": "sparse-mm-cuda-kernel-implementation",1162        "posts_count": 1,1163        "reply_count": 0,1164        "highest_post_number": 1,1165        "image_url": null,1166        "created_at": "2025-04-14T19:34:54.342Z",1167        "last_posted_at": "2025-04-14T19:34:54.395Z",1168        "bumped": true,1169        "bumped_at": "2025-04-15T18:34:23.407Z",1170        "archetype": "regular",1171        "unseen": false,1172        "pinned": false,1173        "unpinned": null,1174        "visible": true,1175        "closed": false,1176        "archived": false,1177        "bookmarked": null,1178        "liked": null,1179        "tags_descriptions": {},1180        "like_count": 0,1181        "views": 69,1182        "category_id": 11,1183        "featured_link": null,1184        "has_accepted_answer": false,1185        "posters": [1186          {1187            "extras": "latest single",1188            "description": "Original Poster, Most Recent Poster",1189            "user": {1190              "id": 83816,1191              "username": "kaioh",1192              "name": "Kaio",1193              "avatar_template": "/letter_avatar_proxy/v4/letter/k/a88e57/{size}.png",1194              "trust_level": 11195            }1196          }1197        ]1198      },1199      {1200        "fancy_title": "LibTorch symbols getting overriden when linking to openBLAS",

Showing the first 1,200 of 63624 lines. Download the file for the rest.