Anurag1734/cuda-error-resolution-analysis
07
1[2 {3 "post_stream": {4 "posts": [5 {6 "id": 457068,7 "name": "Joseph",8 "username": "Joeyoung",9 "avatar_template": "/letter_avatar_proxy/v4/letter/j/a88e4f/{size}.png",10 "created_at": "2024-10-12T18:13:40.130Z",11 "cooked": "<p>Hi,</p>\n<p>I wrote the code for using CUDA Graph for multi processing (GPUs).<br>\nThe code works without the error.<br>\nHowever, I am getting the following warning messages.<br>\n[rank 0]:[W CUDAGraph.cpp:145] Warning: Waiting for pending NCCL work to finish before starting graph capture. (function operator())<br>\n[rank 1]:[W CUDAGraph.cpp:145] Warning: Waiting for pending NCCL work to finish before starting graph capture. (function operator())</p>\n<p>Although the code works, the warning messages bother me.<br>\nCould you enlighten me about why the warning message happens and how to fix it?</p>\n<p>Thanks,<br>\nJoe</p>",12 "post_number": 1,13 "post_type": 1,14 "posts_count": 4,15 "updated_at": "2024-10-12T18:13:40.130Z",16 "reply_count": 0,17 "reply_to_post_number": null,18 "quote_count": 0,19 "incoming_link_count": 188,20 "reads": 7,21 "readers_count": 6,22 "score": 926.4,23 "yours": false,24 "topic_id": 211486,25 "topic_slug": "cudagraph-cpp-145-warning-waiting-for-pending-nccl-work",26 "display_username": "Joseph",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": 70738,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/cudagraph-cpp-145-warning-waiting-for-pending-nccl-work/211486/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": 457152,64 "name": "",65 "username": "ptrblck",66 "avatar_template": "/user_avatar/discuss.pytorch.org/ptrblck/{size}/1823_2.png",67 "created_at": "2024-10-14T15:02:18.155Z",68 "cooked": "<p>The watchdog can poll during a CUDAGraph capture via events and crash the capture as described <a href=\"https://github.com/pytorch/pytorch/pull/104487\">here</a>. To avoid this, <a href=\"https://github.com/pytorch/pytorch/pull/110665\">this PR</a> waits for all pending work to finish before starting the graph capture.</p>",69 "post_number": 2,70 "post_type": 1,71 "posts_count": 4,72 "updated_at": "2024-10-14T15:02:18.155Z",73 "reply_count": 1,74 "reply_to_post_number": null,75 "quote_count": 0,76 "incoming_link_count": 3,77 "reads": 7,78 "readers_count": 6,79 "score": 21.4,80 "yours": false,81 "topic_id": 211486,82 "topic_slug": "cudagraph-cpp-145-warning-waiting-for-pending-nccl-work",83 "display_username": "",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 "link_counts": [98 {99 "url": "https://github.com/pytorch/pytorch/pull/110665",100 "internal": false,101 "reflection": false,102 "title": "[NCCL][CUDA][CUDA Graphs] Flush enqueued work before starting a graph capture 2 by eqy · Pull Request #110665 · pytorch/pytorch · GitHub",103 "clicks": 26104 },105 {106 "url": "https://github.com/pytorch/pytorch/pull/104487",107 "internal": false,108 "reflection": false,109 "title": "[NCCL][CUDA][CUDA Graphs] Flush enqueued work before starting a graph capture by eqy · Pull Request #104487 · pytorch/pytorch · GitHub",110 "clicks": 18111 }112 ],113 "read": true,114 "user_title": "",115 "bookmarked": false,116 "actions_summary": [],117 "moderator": true,118 "admin": true,119 "staff": true,120 "user_id": 3534,121 "hidden": false,122 "trust_level": 2,123 "deleted_at": null,124 "user_deleted": false,125 "edit_reason": null,126 "can_view_edit_history": true,127 "wiki": false,128 "post_url": "/t/cudagraph-cpp-145-warning-waiting-for-pending-nccl-work/211486/2",129 "can_accept_answer": false,130 "can_unaccept_answer": false,131 "accepted_answer": false,132 "topic_accepted_answer": null133 },134 {135 "id": 457523,136 "name": "Joseph",137 "username": "Joeyoung",138 "avatar_template": "/letter_avatar_proxy/v4/letter/j/a88e4f/{size}.png",139 "created_at": "2024-10-19T12:08:42.917Z",140 "cooked": "<p>Thanks! I can silence the warning messages by synchronizing before capture.</p>",141 "post_number": 3,142 "post_type": 1,143 "posts_count": 4,144 "updated_at": "2024-10-19T12:10:23.849Z",145 "reply_count": 1,146 "reply_to_post_number": 2,147 "quote_count": 0,148 "incoming_link_count": 1,149 "reads": 7,150 "readers_count": 6,151 "score": 11.4,152 "yours": false,153 "topic_id": 211486,154 "topic_slug": "cudagraph-cpp-145-warning-waiting-for-pending-nccl-work",155 "display_username": "Joseph",156 "primary_group_name": null,157 "flair_name": null,158 "flair_url": null,159 "flair_bg_color": null,160 "flair_color": null,161 "flair_group_id": null,162 "badges_granted": [],163 "version": 1,164 "can_edit": false,165 "can_delete": false,166 "can_recover": false,167 "can_see_hidden_post": false,168 "can_wiki": false,169 "read": true,170 "user_title": null,171 "reply_to_user": {172 "id": 3534,173 "username": "ptrblck",174 "name": "",175 "avatar_template": "/user_avatar/discuss.pytorch.org/ptrblck/{size}/1823_2.png"176 },177 "bookmarked": false,178 "actions_summary": [],179 "moderator": false,180 "admin": false,181 "staff": false,182 "user_id": 70738,183 "hidden": false,184 "trust_level": 1,185 "deleted_at": null,186 "user_deleted": false,187 "edit_reason": null,188 "can_view_edit_history": true,189 "wiki": false,190 "post_url": "/t/cudagraph-cpp-145-warning-waiting-for-pending-nccl-work/211486/3",191 "can_accept_answer": false,192 "can_unaccept_answer": false,193 "accepted_answer": false,194 "topic_accepted_answer": null195 },196 {197 "id": 457536,198 "name": "",199 "username": "ptrblck",200 "avatar_template": "/user_avatar/discuss.pytorch.org/ptrblck/{size}/1823_2.png",201 "created_at": "2024-10-19T15:02:33.164Z",202 "cooked": "<p>Yes, this would be one way to make sure the pending work is done before capturing the graph.</p>",203 "post_number": 4,204 "post_type": 1,205 "posts_count": 4,206 "updated_at": "2024-10-19T15:02:33.164Z",207 "reply_count": 0,208 "reply_to_post_number": 3,209 "quote_count": 0,210 "incoming_link_count": 1,211 "reads": 7,212 "readers_count": 6,213 "score": 6.4,214 "yours": false,215 "topic_id": 211486,216 "topic_slug": "cudagraph-cpp-145-warning-waiting-for-pending-nccl-work",217 "display_username": "",218 "primary_group_name": null,219 "flair_name": null,220 "flair_url": null,221 "flair_bg_color": null,222 "flair_color": null,223 "flair_group_id": null,224 "badges_granted": [],225 "version": 1,226 "can_edit": false,227 "can_delete": false,228 "can_recover": false,229 "can_see_hidden_post": false,230 "can_wiki": false,231 "read": true,232 "user_title": "",233 "reply_to_user": {234 "id": 70738,235 "username": "Joeyoung",236 "name": "Joseph",237 "avatar_template": "/letter_avatar_proxy/v4/letter/j/a88e4f/{size}.png"238 },239 "bookmarked": false,240 "actions_summary": [],241 "moderator": true,242 "admin": true,243 "staff": true,244 "user_id": 3534,245 "hidden": false,246 "trust_level": 2,247 "deleted_at": null,248 "user_deleted": false,249 "edit_reason": null,250 "can_view_edit_history": true,251 "wiki": false,252 "post_url": "/t/cudagraph-cpp-145-warning-waiting-for-pending-nccl-work/211486/4",253 "can_accept_answer": false,254 "can_unaccept_answer": false,255 "accepted_answer": false,256 "topic_accepted_answer": null257 }258 ],259 "stream": [260 457068,261 457152,262 457523,263 457536264 ]265 },266 "timeline_lookup": [267 [268 1,269 378270 ],271 [272 2,273 376274 ],275 [276 3,277 371278 ]279 ],280 "suggested_topics": [281 {282 "fancy_title": "How works dist.ProcessGroupGloo?",283 "id": 218549,284 "title": "How works dist.ProcessGroupGloo?",285 "slug": "how-works-dist-processgroupgloo",286 "posts_count": 1,287 "reply_count": 0,288 "highest_post_number": 1,289 "image_url": null,290 "created_at": "2025-04-02T17:52:31.775Z",291 "last_posted_at": "2025-04-02T17:52:31.867Z",292 "bumped": true,293 "bumped_at": "2025-04-03T11:08:25.733Z",294 "archetype": "regular",295 "unseen": false,296 "pinned": false,297 "unpinned": null,298 "visible": true,299 "closed": false,300 "archived": false,301 "bookmarked": null,302 "liked": null,303 "tags_descriptions": {},304 "like_count": 0,305 "views": 38,306 "category_id": 12,307 "featured_link": null,308 "has_accepted_answer": false,309 "posters": [310 {311 "extras": "latest single",312 "description": "Original Poster, Most Recent Poster",313 "user": {314 "id": 80983,315 "username": "HariSeldon11988",316 "name": "",317 "avatar_template": "/letter_avatar_proxy/v4/letter/h/9dc877/{size}.png",318 "trust_level": 1319 }320 }321 ]322 },323 {324 "fancy_title": "Is it possible to keep a chunk of continuous gpu memory (e.g. 20G) in DDP mode for gradient synchronization?",325 "id": 213631,326 "title": "Is it possible to keep a chunk of continuous gpu memory (e.g. 20G) in DDP mode for gradient synchronization?",327 "slug": "is-it-possible-to-keep-a-chunk-of-continuous-gpu-memory-e-g-20g-in-ddp-mode-for-gradient-synchronization",328 "posts_count": 6,329 "reply_count": 4,330 "highest_post_number": 6,331 "image_url": null,332 "created_at": "2024-11-30T05:11:51.551Z",333 "last_posted_at": "2024-12-03T08:48:53.001Z",334 "bumped": true,335 "bumped_at": "2024-12-03T08:48:53.001Z",336 "archetype": "regular",337 "unseen": false,338 "pinned": false,339 "unpinned": null,340 "visible": true,341 "closed": false,342 "archived": false,343 "bookmarked": null,344 "liked": null,345 "tags_descriptions": {},346 "like_count": 0,347 "views": 67,348 "category_id": 12,349 "featured_link": null,350 "has_accepted_answer": false,351 "posters": [352 {353 "extras": "latest",354 "description": "Original Poster, Most Recent Poster",355 "user": {356 "id": 81215,357 "username": "Lutao",358 "name": "Lutao Jiang",359 "avatar_template": "/letter_avatar_proxy/v4/letter/l/f1d935/{size}.png",360 "trust_level": 0361 }362 },363 {364 "extras": null,365 "description": "Frequent Poster",366 "user": {367 "id": 3534,368 "username": "ptrblck",369 "name": "",370 "avatar_template": "/user_avatar/discuss.pytorch.org/ptrblck/{size}/1823_2.png",371 "admin": true,372 "moderator": true,373 "trust_level": 2374 }375 },376 {377 "extras": null,378 "description": "Frequent Poster",379 "user": {380 "id": 54320,381 "username": "fduwjj",382 "name": "Hugo",383 "avatar_template": "/user_avatar/discuss.pytorch.org/fduwjj/{size}/47855_2.png",384 "trust_level": 2385 }386 }387 ]388 },389 {390 "fancy_title": "DataLoader batch_size in DDP for multi-gpu and multi-node",391 "id": 217162,392 "title": "DataLoader batch_size in DDP for multi-gpu and multi-node",393 "slug": "dataloader-batch-size-in-ddp-for-multi-gpu-and-multi-node",394 "posts_count": 1,395 "reply_count": 0,396 "highest_post_number": 1,397 "image_url": null,398 "created_at": "2025-02-25T22:34:58.218Z",399 "last_posted_at": "2025-02-25T22:34:58.260Z",400 "bumped": true,401 "bumped_at": "2025-02-25T22:34:58.260Z",402 "archetype": "regular",403 "unseen": false,404 "pinned": false,405 "unpinned": null,406 "visible": true,407 "closed": false,408 "archived": false,409 "bookmarked": null,410 "liked": null,411 "tags_descriptions": {},412 "like_count": 0,413 "views": 68,414 "category_id": 12,415 "featured_link": null,416 "has_accepted_answer": false,417 "posters": [418 {419 "extras": "latest single",420 "description": "Original Poster, Most Recent Poster",421 "user": {422 "id": 70738,423 "username": "Joeyoung",424 "name": "Joseph",425 "avatar_template": "/letter_avatar_proxy/v4/letter/j/a88e4f/{size}.png",426 "trust_level": 1427 }428 }429 ]430 },431 {432 "fancy_title": "FP8 training with torchao but without torchtitan",433 "id": 215152,434 "title": "FP8 training with torchao but without torchtitan",435 "slug": "fp8-training-with-torchao-but-without-torchtitan",436 "posts_count": 3,437 "reply_count": 1,438 "highest_post_number": 4,439 "image_url": null,440 "created_at": "2025-01-09T05:37:00.335Z",441 "last_posted_at": "2025-02-07T08:08:30.443Z",442 "bumped": true,443 "bumped_at": "2025-02-07T08:08:30.443Z",444 "archetype": "regular",445 "unseen": false,446 "pinned": false,447 "unpinned": null,448 "visible": true,449 "closed": false,450 "archived": false,451 "bookmarked": null,452 "liked": null,453 "tags_descriptions": {},454 "like_count": 0,455 "views": 386,456 "category_id": 12,457 "featured_link": null,458 "has_accepted_answer": false,459 "posters": [460 {461 "extras": "latest",462 "description": "Original Poster, Most Recent Poster",463 "user": {464 "id": 57464,465 "username": "cokespace2",466 "name": "Vince Mo",467 "avatar_template": "/user_avatar/discuss.pytorch.org/cokespace2/{size}/51244_2.png",468 "trust_level": 2469 }470 },471 {472 "extras": null,473 "description": "Frequent Poster",474 "user": {475 "id": 24320,476 "username": "supriyar",477 "name": "",478 "avatar_template": "/letter_avatar_proxy/v4/letter/s/db5fbb/{size}.png",479 "trust_level": 2480 }481 }482 ]483 },484 {485 "fancy_title": "Potential Bug with HYBRID_SHARD and (n, 1) Device Mesh Falling Back to NO_SHARD",486 "id": 220486,487 "title": "Potential Bug with HYBRID_SHARD and (n, 1) Device Mesh Falling Back to NO_SHARD",488 "slug": "potential-bug-with-hybrid-shard-and-n-1-device-mesh-falling-back-to-no-shard",489 "posts_count": 2,490 "reply_count": 0,491 "highest_post_number": 2,492 "image_url": null,493 "created_at": "2025-05-31T23:15:22.134Z",494 "last_posted_at": "2025-06-02T15:11:35.684Z",495 "bumped": true,496 "bumped_at": "2025-06-02T15:11:35.684Z",497 "archetype": "regular",498 "unseen": false,499 "pinned": false,500 "unpinned": null,501 "visible": true,502 "closed": false,503 "archived": false,504 "bookmarked": null,505 "liked": null,506 "tags_descriptions": {},507 "like_count": 0,508 "views": 55,509 "category_id": 12,510 "featured_link": null,511 "has_accepted_answer": false,512 "posters": [513 {514 "extras": null,515 "description": "Original Poster",516 "user": {517 "id": 82891,518 "username": "yrraadi-bio",519 "name": "Yash Rathod",520 "avatar_template": "/user_avatar/discuss.pytorch.org/yrraadi-bio/{size}/75845_2.png",521 "trust_level": 1522 }523 },524 {525 "extras": "latest",526 "description": "Most Recent Poster",527 "user": {528 "id": 39542,529 "username": "H-Huang",530 "name": "Howard Huang",531 "avatar_template": "/user_avatar/discuss.pytorch.org/h-huang/{size}/35598_2.png",532 "trust_level": 2533 }534 }535 ]536 }537 ],538 "tags_descriptions": {},539 "fancy_title": "CUDAGraph.cpp:145] Warning: Waiting for pending NCCL work",540 "id": 211486,541 "title": "CUDAGraph.cpp:145] Warning: Waiting for pending NCCL work",542 "posts_count": 4,543 "created_at": "2024-10-12T18:13:40.073Z",544 "views": 322,545 "reply_count": 2,546 "like_count": 0,547 "last_posted_at": "2024-10-19T15:02:33.164Z",548 "visible": true,549 "closed": false,550 "archived": false,551 "has_summary": false,552 "archetype": "regular",553 "slug": "cudagraph-cpp-145-warning-waiting-for-pending-nccl-work",554 "category_id": 12,555 "word_count": 170,556 "deleted_at": null,557 "user_id": 70738,558 "featured_link": null,559 "pinned_globally": false,560 "pinned_at": null,561 "pinned_until": null,562 "image_url": null,563 "slow_mode_seconds": 0,564 "draft": null,565 "draft_key": "topic_211486",566 "draft_sequence": null,567 "unpinned": null,568 "pinned": false,569 "current_post_number": 1,570 "highest_post_number": 4,571 "deleted_by": null,572 "actions_summary": [573 {574 "id": 4,575 "count": 0,576 "hidden": false,577 "can_act": false578 },579 {580 "id": 8,581 "count": 0,582 "hidden": false,583 "can_act": false584 },585 {586 "id": 10,587 "count": 0,588 "hidden": false,589 "can_act": false590 },591 {592 "id": 7,593 "count": 0,594 "hidden": false,595 "can_act": false596 }597 ],598 "chunk_size": 20,599 "bookmarked": false,600 "topic_timer": null,601 "message_bus_last_id": 0,602 "participant_count": 2,603 "show_read_indicator": false,604 "thumbnails": null,605 "slow_mode_enabled_until": null,606 "can_vote": false,607 "vote_count": 0,608 "user_voted": false,609 "discourse_zendesk_plugin_zendesk_id": null,610 "discourse_zendesk_plugin_zendesk_url": "https://your-url.zendesk.com/agent/tickets/",611 "details": {612 "can_edit": false,613 "notification_level": 1,614 "participants": [615 {616 "id": 3534,617 "username": "ptrblck",618 "name": "",619 "avatar_template": "/user_avatar/discuss.pytorch.org/ptrblck/{size}/1823_2.png",620 "post_count": 2,621 "primary_group_name": null,622 "flair_name": null,623 "flair_url": null,624 "flair_color": null,625 "flair_bg_color": null,626 "flair_group_id": null,627 "admin": true,628 "moderator": true,629 "trust_level": 2630 },631 {632 "id": 70738,633 "username": "Joeyoung",634 "name": "Joseph",635 "avatar_template": "/letter_avatar_proxy/v4/letter/j/a88e4f/{size}.png",636 "post_count": 2,637 "primary_group_name": null,638 "flair_name": null,639 "flair_url": null,640 "flair_color": null,641 "flair_bg_color": null,642 "flair_group_id": null,643 "trust_level": 1644 }645 ],646 "created_by": {647 "id": 70738,648 "username": "Joeyoung",649 "name": "Joseph",650 "avatar_template": "/letter_avatar_proxy/v4/letter/j/a88e4f/{size}.png"651 },652 "last_poster": {653 "id": 3534,654 "username": "ptrblck",655 "name": "",656 "avatar_template": "/user_avatar/discuss.pytorch.org/ptrblck/{size}/1823_2.png"657 },658 "links": [659 {660 "url": "https://github.com/pytorch/pytorch/pull/110665",661 "title": "[NCCL][CUDA][CUDA Graphs] Flush enqueued work before starting a graph capture 2 by eqy · Pull Request #110665 · pytorch/pytorch · GitHub",662 "internal": false,663 "attachment": false,664 "reflection": false,665 "clicks": 26,666 "user_id": 3534,667 "domain": "github.com",668 "root_domain": "github.com"669 },670 {671 "url": "https://github.com/pytorch/pytorch/pull/104487",672 "title": "[NCCL][CUDA][CUDA Graphs] Flush enqueued work before starting a graph capture by eqy · Pull Request #104487 · pytorch/pytorch · GitHub",673 "internal": false,674 "attachment": false,675 "reflection": false,676 "clicks": 18,677 "user_id": 3534,678 "domain": "github.com",679 "root_domain": "github.com"680 }681 ]682 },683 "bookmarks": []684 },685 {686 "post_stream": {687 "posts": [688 {689 "id": 454134,690 "name": "Sathyaprakash Narayanan",691 "username": "satabios",692 "avatar_template": "/user_avatar/discuss.pytorch.org/satabios/{size}/39673_2.png",693 "created_at": "2024-09-11T03:31:03.543Z",694 "cooked": "<p>To deepen my understanding of Neural Network quantization, I’m re-implementing Post-Training Quantization (PTQ) from scratch with minimal reliance on PyTorch functions. The code can be found here: <a href=\"https://github.com/satabios/quantization/tree/master/quant\" rel=\"noopener nofollow ugc\">GitHub Repository</a>.</p>\n<p>I followed these steps in my experiments:</p>\n<ul>\n<li>Developed a custom quantizer</li>\n<li>Replaced Linear/Conv layers with custom quantized versions</li>\n<li>Added input and output observers</li>\n<li>Substituted the observers with quantized versions</li>\n</ul>\n<h3><a name=\"p-454134-weight-only-quantization-1\" class=\"anchor\" href=\"#p-454134-weight-only-quantization-1\"></a>Weight-Only Quantization:</h3>\n<p>I successfully built a quantization module that replaces traditional layers with quantized ones and observed how the weights are quantized layer-by-layer. This implementation is available here: <a href=\"https://github.com/satabios/quantization/tree/master/quant/layer_wise_weight_only\" rel=\"noopener nofollow ugc\">Layer-Wise Weight-Only Quantization</a>.</p>\n<p>Following this, I moved on to apply quantization to activations. Although I understand that, in practice, scales and zero points are compressed into a single operation:<br>\n<img src=\"https://discuss.pytorch.org/uploads/default/original/3X/0/5/056935f2a47c7106bc822c161e42b2125b313e3b.jpeg\" alt=\"image\" data-base62-sha1=\"LRNCob0YhCnpFNt1tX3sMMYJAL\" width=\"632\" height=\"442\"></p>\n<p>I created a simplified version where scales are handled separately (assuming infinite compute resources). The diagram below illustrates my approach:<br>\n<div class=\"lightbox-wrapper\"><a class=\"lightbox\" href=\"https://discuss.pytorch.org/uploads/default/original/3X/3/2/325f07abd5b94122dd031723af14637617d42de7.png\" data-download-href=\"https://discuss.pytorch.org/uploads/default/325f07abd5b94122dd031723af14637617d42de7\" title=\"image\"><img src=\"https://discuss.pytorch.org/uploads/default/optimized/3X/3/2/325f07abd5b94122dd031723af14637617d42de7_2_345x499.png\" alt=\"image\" data-base62-sha1=\"7bBtp9pnhRSBfHYVgKBVJoMA1hB\" width=\"345\" height=\"499\" srcset=\"https://discuss.pytorch.org/uploads/default/optimized/3X/3/2/325f07abd5b94122dd031723af14637617d42de7_2_345x499.png, https://discuss.pytorch.org/uploads/default/optimized/3X/3/2/325f07abd5b94122dd031723af14637617d42de7_2_517x748.png 1.5x, https://discuss.pytorch.org/uploads/default/optimized/3X/3/2/325f07abd5b94122dd031723af14637617d42de7_2_690x998.png 2x\" data-dominant-color=\"EEEEEE\"><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\">image</span><span class=\"informations\">802×1160 61.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>\n<p>The code for this implementation can be found here: <a href=\"https://github.com/satabios/quantization/tree/master/quant/layer_wise_weights_activation\" rel=\"noopener nofollow ugc\">Layer-Wise Weight and Activation Quantization</a>.</p>\n<p>Upon activation quantization, the accuracy of the model takes a dives from (~92.3% to 10%). Yet I’m unable to understand why this happens. Any suggestions on why my implementation fails would be really helpful. Thanks in advance.</p>\n<p>Thanks,<br>\nSathya</p>",695 "post_number": 1,696 "post_type": 1,697 "posts_count": 2,698 "updated_at": "2024-09-11T14:57:51.020Z",699 "reply_count": 0,700 "reply_to_post_number": null,701 "quote_count": 0,702 "incoming_link_count": 39,703 "reads": 12,704 "readers_count": 11,705 "score": 197.4,706 "yours": false,707 "topic_id": 209396,708 "topic_slug": "significant-accuracy-drop-after-custom-activation-quantization-seeking-debugging-suggestions",709 "display_username": "Sathyaprakash Narayanan",710 "primary_group_name": null,711 "flair_name": null,712 "flair_url": null,713 "flair_bg_color": null,714 "flair_color": null,715 "flair_group_id": null,716 "badges_granted": [],717 "version": 2,718 "can_edit": false,719 "can_delete": false,720 "can_recover": false,721 "can_see_hidden_post": false,722 "can_wiki": false,723 "link_counts": [724 {725 "url": "https://github.com/satabios/quantization/tree/master/quant",726 "internal": false,727 "reflection": false,728 "title": "quantization/quant at master · satabios/quantization · GitHub",729 "clicks": 4730 },731 {732 "url": "https://github.com/satabios/quantization/tree/master/quant/layer_wise_weights_activation",733 "internal": false,734 "reflection": false,735 "title": "quantization/quant/layer_wise_weights_activation at master · satabios/quantization · GitHub",736 "clicks": 4737 },738 {739 "url": "https://github.com/satabios/quantization/tree/master/quant/layer_wise_weight_only",740 "internal": false,741 "reflection": false,742 "title": "quantization/quant/layer_wise_weight_only at master · satabios/quantization · GitHub",743 "clicks": 4744 }745 ],746 "read": true,747 "user_title": null,748 "bookmarked": false,749 "actions_summary": [],750 "moderator": false,751 "admin": false,752 "staff": false,753 "user_id": 46615,754 "hidden": false,755 "trust_level": 1,756 "deleted_at": null,757 "user_deleted": false,758 "edit_reason": null,759 "can_view_edit_history": true,760 "wiki": false,761 "post_url": "/t/significant-accuracy-drop-after-custom-activation-quantization-seeking-debugging-suggestions/209396/1",762 "can_accept_answer": false,763 "can_unaccept_answer": false,764 "accepted_answer": false,765 "topic_accepted_answer": null,766 "can_vote": false767 },768 {769 "id": 457531,770 "name": "Dave",771 "username": "wilhelm",772 "avatar_template": "/user_avatar/discuss.pytorch.org/wilhelm/{size}/70280_2.png",773 "created_at": "2024-10-19T13:49:48.381Z",774 "cooked": "<p>Did you fix this issue?</p>",775 "post_number": 2,776 "post_type": 1,777 "posts_count": 2,778 "updated_at": "2024-10-19T13:49:48.381Z",779 "reply_count": 0,780 "reply_to_post_number": null,781 "quote_count": 0,782 "incoming_link_count": 2,783 "reads": 6,784 "readers_count": 5,785 "score": 11.2,786 "yours": false,787 "topic_id": 209396,788 "topic_slug": "significant-accuracy-drop-after-custom-activation-quantization-seeking-debugging-suggestions",789 "display_username": "Dave",790 "primary_group_name": null,791 "flair_name": null,792 "flair_url": null,793 "flair_bg_color": null,794 "flair_color": null,795 "flair_group_id": null,796 "badges_granted": [],797 "version": 1,798 "can_edit": false,799 "can_delete": false,800 "can_recover": false,801 "can_see_hidden_post": false,802 "can_wiki": false,803 "read": true,804 "user_title": "",805 "bookmarked": false,806 "actions_summary": [],807 "moderator": false,808 "admin": false,809 "staff": false,810 "user_id": 71072,811 "hidden": false,812 "trust_level": 2,813 "deleted_at": null,814 "user_deleted": false,815 "edit_reason": null,816 "can_view_edit_history": true,817 "wiki": false,818 "post_url": "/t/significant-accuracy-drop-after-custom-activation-quantization-seeking-debugging-suggestions/209396/2",819 "can_accept_answer": false,820 "can_unaccept_answer": false,821 "accepted_answer": false,822 "topic_accepted_answer": null823 }824 ],825 "stream": [826 454134,827 457531828 ]829 },830 "timeline_lookup": [831 [832 1,833 410834 ],835 [836 2,837 371838 ]839 ],840 "suggested_topics": [841 {842 "fancy_title": "Logits mismatch between PyTorch inference and manual implementation",843 "id": 219568,844 "title": "Logits mismatch between PyTorch inference and manual implementation",845 "slug": "logits-mismatch-between-pytorch-inference-and-manual-implementation",846 "posts_count": 2,847 "reply_count": 0,848 "highest_post_number": 2,849 "image_url": null,850 "created_at": "2025-04-28T18:57:49.995Z",851 "last_posted_at": "2025-04-29T00:42:05.572Z",852 "bumped": true,853 "bumped_at": "2025-04-29T00:42:05.572Z",854 "archetype": "regular",855 "unseen": false,856 "pinned": false,857 "unpinned": null,858 "visible": true,859 "closed": false,860 "archived": false,861 "bookmarked": null,862 "liked": null,863 "tags_descriptions": {},864 "like_count": 1,865 "views": 79,866 "category_id": 17,867 "featured_link": null,868 "has_accepted_answer": false,869 "posters": [870 {871 "extras": null,872 "description": "Original Poster",873 "user": {874 "id": 84057,875 "username": "greifswald",876 "name": "",877 "avatar_template": "/letter_avatar_proxy/v4/letter/g/90db22/{size}.png",878 "trust_level": 1879 }880 },881 {882 "extras": "latest",883 "description": "Most Recent Poster",884 "user": {885 "id": 21770,886 "username": "jerryzh168",887 "name": "Jerry Zhang",888 "avatar_template": "/user_avatar/discuss.pytorch.org/jerryzh168/{size}/15217_2.png",889 "trust_level": 2890 }891 }892 ]893 },894 {895 "fancy_title": "Triton kernel to efficiently dequantize int4",896 "id": 214987,897 "title": "Triton kernel to efficiently dequantize int4",898 "slug": "triton-kernel-to-efficiently-dequantize-int4",899 "posts_count": 1,900 "reply_count": 0,901 "highest_post_number": 1,902 "image_url": null,903 "created_at": "2025-01-05T01:48:37.767Z",904 "last_posted_at": "2025-01-05T01:48:37.808Z",905 "bumped": true,906 "bumped_at": "2025-01-05T01:48:37.808Z",907 "archetype": "regular",908 "unseen": false,909 "pinned": false,910 "unpinned": null,911 "visible": true,912 "closed": false,913 "archived": false,914 "bookmarked": null,915 "liked": null,916 "tags_descriptions": {},917 "like_count": 0,918 "views": 169,919 "category_id": 17,920 "featured_link": null,921 "has_accepted_answer": false,922 "posters": [923 {924 "extras": "latest single",925 "description": "Original Poster, Most Recent Poster",926 "user": {927 "id": 3938,928 "username": "vgoklani",929 "name": "Vishal Goklani",930 "avatar_template": "/user_avatar/discuss.pytorch.org/vgoklani/{size}/1971_2.png",931 "trust_level": 1932 }933 }934 ]935 },936 {937 "fancy_title": "Taylor-series Approximation for Sigmiod in Integer",938 "id": 215418,939 "title": "Taylor-series Approximation for Sigmiod in Integer",940 "slug": "taylor-series-approximation-for-sigmiod-in-integer",941 "posts_count": 2,942 "reply_count": 0,943 "highest_post_number": 2,944 "image_url": null,945 "created_at": "2025-01-15T10:53:49.595Z",946 "last_posted_at": "2025-01-15T16:24:52.971Z",947 "bumped": true,948 "bumped_at": "2025-01-15T16:24:52.971Z",949 "archetype": "regular",950 "unseen": false,951 "pinned": false,952 "unpinned": null,953 "visible": true,954 "closed": false,955 "archived": false,956 "bookmarked": null,957 "liked": null,958 "tags_descriptions": {},959 "like_count": 0,960 "views": 229,961 "category_id": 17,962 "featured_link": null,963 "has_accepted_answer": false,964 "posters": [965 {966 "extras": null,967 "description": "Original Poster",968 "user": {969 "id": 68938,970 "username": "vimal_william",971 "name": "vimal william",972 "avatar_template": "/user_avatar/discuss.pytorch.org/vimal_william/{size}/63417_2.png",973 "trust_level": 1974 }975 },976 {977 "extras": "latest",978 "description": "Most Recent Poster",979 "user": {980 "id": 18088,981 "username": "KFrank",982 "name": "K. Frank",983 "avatar_template": "/letter_avatar_proxy/v4/letter/k/ecb155/{size}.png",984 "trust_level": 2985 }986 }987 ]988 },989 {990 "fancy_title": "[pt2e][quant] Quantization of operators with multiple outputs (RNN, LSTM)",991 "id": 218207,992 "title": "[pt2e][quant] Quantization of operators with multiple outputs (RNN, LSTM)",993 "slug": "pt2e-quant-quantization-of-operators-with-multiple-outputs-rnn-lstm",994 "posts_count": 5,995 "reply_count": 1,996 "highest_post_number": 5,997 "image_url": null,998 "created_at": "2025-03-24T18:12:14.530Z",999 "last_posted_at": "2025-09-15T11:12:40.113Z",1000 "bumped": true,1001 "bumped_at": "2025-09-15T11:12:40.113Z",1002 "archetype": "regular",1003 "unseen": false,1004 "pinned": false,1005 "unpinned": null,1006 "visible": true,1007 "closed": false,1008 "archived": false,1009 "bookmarked": null,1010 "liked": null,1011 "tags_descriptions": {},1012 "like_count": 1,1013 "views": 245,1014 "category_id": 17,1015 "featured_link": null,1016 "has_accepted_answer": true,1017 "posters": [1018 {1019 "extras": "latest",1020 "description": "Original Poster, Most Recent Poster, Accepted Answer",1021 "user": {1022 "id": 83439,1023 "username": "roman-janik-nxp",1024 "name": "Roman Janik Nxp",1025 "avatar_template": "/user_avatar/discuss.pytorch.org/roman-janik-nxp/{size}/76316_2.png",1026 "trust_level": 01027 }1028 },1029 {1030 "extras": null,1031 "description": "Frequent Poster",1032 "user": {1033 "id": 21770,1034 "username": "jerryzh168",1035 "name": "Jerry Zhang",1036 "avatar_template": "/user_avatar/discuss.pytorch.org/jerryzh168/{size}/15217_2.png",1037 "trust_level": 21038 }1039 }1040 ]1041 },1042 {1043 "fancy_title": "Why is there such a significant difference between floating-point convolution and quantized integer convolution results?",1044 "id": 220920,1045 "title": "Why is there such a significant difference between floating-point convolution and quantized integer convolution results?",1046 "slug": "why-is-there-such-a-significant-difference-between-floating-point-convolution-and-quantized-integer-convolution-results",1047 "posts_count": 3,1048 "reply_count": 0,1049 "highest_post_number": 3,1050 "image_url": "https://discuss.pytorch.org/uploads/default/original/3X/f/0/f08b1bd84e46ac092e1a83b23aa03ee6a164134d.png",1051 "created_at": "2025-06-19T13:35:50.498Z",1052 "last_posted_at": "2025-06-30T11:28:31.675Z",1053 "bumped": true,1054 "bumped_at": "2025-06-30T11:28:31.675Z",1055 "archetype": "regular",1056 "unseen": false,1057 "pinned": false,1058 "unpinned": null,1059 "visible": true,1060 "closed": false,1061 "archived": false,1062 "bookmarked": null,1063 "liked": null,1064 "tags_descriptions": {},1065 "like_count": 0,1066 "views": 47,1067 "category_id": 17,1068 "featured_link": null,1069 "has_accepted_answer": false,1070 "posters": [1071 {1072 "extras": null,1073 "description": "Original Poster",1074 "user": {1075 "id": 84745,1076 "username": "bitzs",1077 "name": "",1078 "avatar_template": "/letter_avatar_proxy/v4/letter/b/da6949/{size}.png",1079 "trust_level": 11080 }1081 },1082 {1083 "extras": null,1084 "description": "Frequent Poster",1085 "user": {1086 "id": 84865,1087 "username": "Hamza_Javaid",1088 "name": "Hamza Javaid",1089 "avatar_template": "/user_avatar/discuss.pytorch.org/hamza_javaid/{size}/77517_2.png",1090 "trust_level": 21091 }1092 },1093 {1094 "extras": "latest",1095 "description": "Most Recent Poster",1096 "user": {1097 "id": 84884,1098 "username": "Jack_Qasim",1099 "name": "Jack Qasim",1100 "avatar_template": "/user_avatar/discuss.pytorch.org/jack_qasim/{size}/74623_2.png",1101 "trust_level": 01102 }1103 }1104 ]1105 }1106 ],1107 "tags_descriptions": {},1108 "fancy_title": "Significant Accuracy Drop After “Custom” Activation Quantization – Seeking Debugging Suggestions",1109 "id": 209396,1110 "title": "Significant Accuracy Drop After \"Custom\" Activation Quantization – Seeking Debugging Suggestions",1111 "posts_count": 2,1112 "created_at": "2024-09-11T03:31:03.479Z",1113 "views": 80,1114 "reply_count": 0,1115 "like_count": 0,1116 "last_posted_at": "2024-10-19T13:49:48.381Z",1117 "visible": true,1118 "closed": false,1119 "archived": false,1120 "has_summary": false,1121 "archetype": "regular",1122 "slug": "significant-accuracy-drop-after-custom-activation-quantization-seeking-debugging-suggestions",1123 "category_id": 17,1124 "word_count": 241,1125 "deleted_at": null,1126 "user_id": 46615,1127 "featured_link": null,1128 "pinned_globally": false,1129 "pinned_at": null,1130 "pinned_until": null,1131 "image_url": "https://discuss.pytorch.org/uploads/default/original/3X/0/5/056935f2a47c7106bc822c161e42b2125b313e3b.jpeg",1132 "slow_mode_seconds": 0,1133 "draft": null,1134 "draft_key": "topic_209396",1135 "draft_sequence": null,1136 "unpinned": null,1137 "pinned": false,1138 "current_post_number": 1,1139 "highest_post_number": 2,1140 "deleted_by": null,1141 "actions_summary": [1142 {1143 "id": 4,1144 "count": 0,1145 "hidden": false,1146 "can_act": false1147 },1148 {1149 "id": 8,1150 "count": 0,1151 "hidden": false,1152 "can_act": false1153 },1154 {1155 "id": 10,1156 "count": 0,1157 "hidden": false,1158 "can_act": false1159 },1160 {1161 "id": 7,1162 "count": 0,1163 "hidden": false,1164 "can_act": false1165 }1166 ],1167 "chunk_size": 20,1168 "bookmarked": false,1169 "topic_timer": null,1170 "message_bus_last_id": 0,1171 "participant_count": 2,1172 "show_read_indicator": false,1173 "thumbnails": [1174 {1175 "max_width": null,1176 "max_height": null,1177 "width": 632,1178 "height": 442,1179 "url": "https://discuss.pytorch.org/uploads/default/original/3X/0/5/056935f2a47c7106bc822c161e42b2125b313e3b.jpeg"1180 }1181 ],1182 "slow_mode_enabled_until": null,1183 "can_vote": false,1184 "vote_count": 0,1185 "user_voted": false,1186 "discourse_zendesk_plugin_zendesk_id": null,1187 "discourse_zendesk_plugin_zendesk_url": "https://your-url.zendesk.com/agent/tickets/",1188 "details": {1189 "can_edit": false,1190 "notification_level": 1,1191 "participants": [1192 {1193 "id": 46615,1194 "username": "satabios",1195 "name": "Sathyaprakash Narayanan",1196 "avatar_template": "/user_avatar/discuss.pytorch.org/satabios/{size}/39673_2.png",1197 "post_count": 1,1198 "primary_group_name": null,1199 "flair_name": null,1200 "flair_url": null,