CoolFace
Datasetpublic

Anurag1734/cuda-error-resolution-analysis

sourceHugging Faceupdated 2mo agoView on Hugging Face
0likes7downloads
topics_batch_452.json64131 linesDownload Raw Back to raw
1[2  {3    "post_stream": {4      "posts": [5        {6          "id": 216214,7          "name": "A curious guy here!",8          "username": "Shisho_Sama",9          "avatar_template": "/user_avatar/discuss.pytorch.org/shisho_sama/{size}/6926_2.png",10          "created_at": "2020-07-28T05:11:54.403Z",11          "cooked": "<p>Hi everyone.<br>\nI’m in the process of converting our models from Python to C++ for production. For that it seems we need to build Pytorch from source as the prebuilt libtorch doesnt come with torch.h headers and alike !<br>\nI’m on Windows 10 1803 and  have Visual Studio 2019 installed (v16.6.3). I dont have any GPUs so I didnt install CUDA! or NVTX.<br>\nI have anaconda and python 3.7 installed and all the deps are installed using the following command:</p>\n<pre><code class=\"lang-auto\">conda install numpy ninja pyyaml mkl mkl-include setuptools cmake cffi\n</code></pre>\n<p>I cloned Pytorch as stated in the readme :</p>\n<pre><code class=\"lang-auto\">git clone --recursive https://github.com/pytorch/pytorch\ncd pytorch\n# if you are updating an existing checkout\ngit submodule sync\ngit submodule update --init --recursive\n</code></pre>\n<p>But upon executing these commands :</p>\n<pre><code class=\"lang-auto\">:: [Optional] If you want to build with VS 2019 generator, please change the value in the next line to `Visual Studio 16 2019`.\n:: Note: This value is useless if Ninja is detected. However, you can force that by using `set USE_NINJA=OFF`.\nset CMAKE_GENERATOR=Visual Studio 16 2019\n\n:: Read the content in the previous section carefully before you proceed.\n:: [Optional] If you want to override the underlying toolset used by Ninja and Visual Studio with CUDA, please run the following script block.\n:: \"Visual Studio 2017 Developer Command Prompt\" will be run automatically.\n:: Make sure you have CMake &gt;= 3.12 before you do this when you use the Visual Studio generator.\nset CMAKE_GENERATOR_TOOLSET_VERSION=14.11\nset DISTUTILS_USE_SDK=1\nfor /f \"usebackq tokens=*\" %i in (`\"%ProgramFiles(x86)%\\Microsoft Visual Studio\\Installer\\vswhere.exe\" -version [15^,16^) -products * -latest -property installationPath`) do call \"%i\\VC\\Auxiliary\\Build\\vcvarsall.bat\" x64 -vcvars_ver=%CMAKE_GENERATOR_TOOLSET_VERSION%\n\n:: [Optional] If you want to override the cuda host compiler\nset CUDAHOSTCXX=C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Enterprise\\VC\\Tools\\MSVC\\14.11.25503\\bin\\HostX64\\x64\\cl.exe\n\npython setup.py install\n</code></pre>\n<p>I face these errors:</p>\n<pre><code class=\"lang-auto\">D:\\Codes\\pytorch&gt;python setup.py install\nBuilding wheel torch-1.7.0a0+8376284\n-- Building version 1.7.0a0+8376284\ncmake -GNinja -DBUILD_PYTHON=True -DBUILD_TEST=True -DCMAKE_BUILD_TYPE=Release -DCMAKE_GENERATOR=Visual Studio 16 2019 -DCMAKE_GENERATOR_TOOLSET_VERSION=14.11 -DCMAKE_INSTALL_PREFIX=D:\\Codes\\pytorch\\torch -DCMAKE_PREFIX_PATH=C:\\Users\\User\\Anaconda3\\Lib\\site-packages -DNUMPY_INCLUDE_DIR=C:\\Users\\User\\Anaconda3\\Lib\\site-packages\\numpy\\core\\include -DPYTHON_EXECUTABLE=C:\\Users\\User\\Anaconda3\\python.exe -DPYTHON_INCLUDE_DIR=C:\\Users\\User\\Anaconda3\\include -DPYTHON_LIBRARY=C:\\Users\\User\\Anaconda3/libs/python37.lib -DTORCH_BUILD_VERSION=1.7.0a0+8376284 -DUSE_NUMPY=True D:\\Codes\\pytorch\nCMake Error: Error: generator : Ninja\nDoes not match the generator used previously: Visual Studio 16 2019\nEither remove the CMakeCache.txt file and CMakeFiles directory or choose a different binary directory.\nTraceback (most recent call last):\n  File \"setup.py\", line 737, in &lt;module&gt;\n    build_deps()\n  File \"setup.py\", line 321, in build_deps\n    cmake=cmake)\n  File \"D:\\Codes\\pytorch\\tools\\build_pytorch_libs.py\", line 59, in build_caffe2\n    rerun_cmake)\n  File \"D:\\Codes\\pytorch\\tools\\setup_helpers\\cmake.py\", line 329, in generate\n    self.run(args, env=my_env)\n  File \"D:\\Codes\\pytorch\\tools\\setup_helpers\\cmake.py\", line 141, in run\n    check_call(command, cwd=self.build_dir, env=env)\n  File \"C:\\Users\\User\\Anaconda3\\Lib\\subprocess.py\", line 347, in check_call\n    raise CalledProcessError(retcode, cmd)\nsubprocess.CalledProcessError: Command '['cmake', '-GNinja', '-DBUILD_PYTHON=True', '-DBUILD_TEST=True', '-DCMAKE_BUILD_TYPE=Release', '-DCMAKE_GENERATOR=Visual Studio 16 2019', '-DCMAKE_GENERATOR_TOOLSET_VERSION=14.11', '-DCMAKE_INSTALL_PREFIX=D:\\\\Codes\\\\pytorch\\\\torch', '-DCMAKE_PREFIX_PATH=C:\\\\Users\\\\User\\\\Anaconda3\\\\Lib\\\\site-packages', '-DNUMPY_INCLUDE_DIR=C:\\\\Users\\\\User\\\\Anaconda3\\\\Lib\\\\site-packages\\\\numpy\\\\core\\\\include', '-DPYTHON_EXECUTABLE=C:\\\\Users\\\\User\\\\Anaconda3\\\\python.exe', '-DPYTHON_INCLUDE_DIR=C:\\\\Users\\\\User\\\\Anaconda3\\\\include', '-DPYTHON_LIBRARY=C:\\\\Users\\\\User\\\\Anaconda3/libs/python37.lib', '-DTORCH_BUILD_VERSION=1.7.0a0+8376284', '-DUSE_NUMPY=True', 'D:\\\\Codes\\\\pytorch']' returned non-zero exit status 1.\n</code></pre>\n<p>What am I doing wrong?<br>\nAny help is greatly appreciated</p>",12          "post_number": 1,13          "post_type": 1,14          "posts_count": 3,15          "updated_at": "2020-07-28T05:18:53.669Z",16          "reply_count": 0,17          "reply_to_post_number": null,18          "quote_count": 0,19          "incoming_link_count": 8724,20          "reads": 48,21          "readers_count": 47,22          "score": 43609.6,23          "yours": false,24          "topic_id": 90769,25          "topic_slug": "is-building-from-source-for-windows-up-to-date-subprocess-calledprocesserror-command-cmake-returned-non-zero-exit-status-1-error",26          "display_username": "A curious guy here!",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": 2,35          "can_edit": false,36          "can_delete": false,37          "can_recover": false,38          "can_see_hidden_post": false,39          "can_wiki": false,40          "link_counts": [41            {42              "url": "https://discuss.pytorch.org/t/the-ordinal-961-could-not-be-located-in-the-dynamic-link-library/90791",43              "internal": true,44              "reflection": true,45              "title": "The ordinal 961 could not be located in the dynamic link library",46              "clicks": 347            }48          ],49          "read": true,50          "user_title": "",51          "bookmarked": false,52          "actions_summary": [],53          "moderator": false,54          "admin": false,55          "staff": false,56          "user_id": 7863,57          "hidden": false,58          "trust_level": 2,59          "deleted_at": null,60          "user_deleted": false,61          "edit_reason": null,62          "can_view_edit_history": true,63          "wiki": false,64          "post_url": "/t/is-building-from-source-for-windows-up-to-date-subprocess-calledprocesserror-command-cmake-returned-non-zero-exit-status-1-error/90769/1",65          "can_accept_answer": false,66          "can_unaccept_answer": false,67          "accepted_answer": false,68          "topic_accepted_answer": true,69          "can_vote": false70        },71        {72          "id": 216235,73          "name": "A curious guy here!",74          "username": "Shisho_Sama",75          "avatar_template": "/user_avatar/discuss.pytorch.org/shisho_sama/{size}/6926_2.png",76          "created_at": "2020-07-28T07:02:08.729Z",77          "cooked": "<p>Looking at this <a href=\"https://discuss.pytorch.org/t/pytorch-build-from-source-on-windows/40288/9\">link</a> everything built successfully! without even the need for any of these :</p>\n<pre><code class=\"lang-auto\">:: [Optional] If you want to build with VS 2019 generator, please change the value in the next line to `Visual Studio 16 2019`.\n:: Note: This value is useless if Ninja is detected. However, you can force that by using `set USE_NINJA=OFF`.\nset CMAKE_GENERATOR=Visual Studio 16 2019\n\n:: Read the content in the previous section carefully before you proceed.\n:: [Optional] If you want to override the underlying toolset used by Ninja and Visual Studio with CUDA, please run the following script block.\n:: \"Visual Studio 2017 Developer Command Prompt\" will be run automatically.\n:: Make sure you have CMake &gt;= 3.12 before you do this when you use the Visual Studio generator.\nset CMAKE_GENERATOR_TOOLSET_VERSION=14.11\nset DISTUTILS_USE_SDK=1\nfor /f \"usebackq tokens=*\" %i in (`\"%ProgramFiles(x86)%\\Microsoft Visual Studio\\Installer\\vswhere.exe\" -version [15^,16^) -products * -latest -property installationPath`) do call \"%i\\VC\\Auxiliary\\Build\\vcvarsall.bat\" x64 -vcvars_ver=%CMAKE_GENERATOR_TOOLSET_VERSION%\n\n:: [Optional] If you want to override the cuda host compiler\nset CUDAHOSTCXX=C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Enterprise\\VC\\Tools\\MSVC\\14.11.25503\\bin\\HostX64\\x64\\cl.exe\n\npython setup.py install\n</code></pre>\n<p>I just ran :</p>\n<pre><code class=\"lang-auto\">python setup.py build --cmake\npython setup.py install\n</code></pre>\n<p>and everything got built!<br>\nHowever, after building everything, I cant seem to be able to find &lt;torch/torch.h&gt; ! I read it on this issue <a href=\"https://github.com/pytorch/pytorch/issues/5964#issuecomment-375698855\" rel=\"nofollow noopener\">here</a> that building from source will make that but apparently this is not the case here!</p>\n<p>Any help is greatly appreciated</p>",78          "post_number": 2,79          "post_type": 1,80          "posts_count": 3,81          "updated_at": "2020-07-28T07:02:08.729Z",82          "reply_count": 1,83          "reply_to_post_number": null,84          "quote_count": 0,85          "incoming_link_count": 124,86          "reads": 42,87          "readers_count": 41,88          "score": 633.4,89          "yours": false,90          "topic_id": 90769,91          "topic_slug": "is-building-from-source-for-windows-up-to-date-subprocess-calledprocesserror-command-cmake-returned-non-zero-exit-status-1-error",92          "display_username": "A curious guy here!",93          "primary_group_name": null,94          "flair_name": null,95          "flair_url": null,96          "flair_bg_color": null,97          "flair_color": null,98          "flair_group_id": null,99          "badges_granted": [],100          "version": 1,101          "can_edit": false,102          "can_delete": false,103          "can_recover": false,104          "can_see_hidden_post": false,105          "can_wiki": false,106          "link_counts": [107            {108              "url": "https://discuss.pytorch.org/t/pytorch-build-from-source-on-windows/40288/9",109              "internal": true,110              "reflection": false,111              "title": "PyTorch build from source on Windows",112              "clicks": 206113            },114            {115              "url": "https://github.com/pytorch/pytorch/issues/5964#issuecomment-375698855",116              "internal": false,117              "reflection": false,118              "title": "fatal error: torch/torch.h: No such file or directory · Issue #5964 · pytorch/pytorch · GitHub",119              "clicks": 11120            }121          ],122          "read": true,123          "user_title": "",124          "bookmarked": false,125          "actions_summary": [],126          "moderator": false,127          "admin": false,128          "staff": false,129          "user_id": 7863,130          "hidden": false,131          "trust_level": 2,132          "deleted_at": null,133          "user_deleted": false,134          "edit_reason": null,135          "can_view_edit_history": true,136          "wiki": false,137          "post_url": "/t/is-building-from-source-for-windows-up-to-date-subprocess-calledprocesserror-command-cmake-returned-non-zero-exit-status-1-error/90769/2",138          "can_accept_answer": false,139          "can_unaccept_answer": false,140          "accepted_answer": false,141          "topic_accepted_answer": true142        },143        {144          "id": 216266,145          "name": "A curious guy here!",146          "username": "Shisho_Sama",147          "avatar_template": "/user_avatar/discuss.pytorch.org/shisho_sama/{size}/6926_2.png",148          "created_at": "2020-07-28T08:45:34.710Z",149          "cooked": "<p>OK, Here are my findings.<br>\nFirst of all <code>include &lt;torch/torch.h&gt;</code> doesnt need building from source. its just in the a different path that is,<br>\nin include directories, one need to add both :<br>\n<code>$(SolutionDir)Dependencies\\libtorch-debug-latest\\libtorch\\include; $(SolutionDir)Dependencies\\libtorch-debug-latest\\libtorch\\include\\torch\\csrc\\api\\include;</code><br>\nand voila you are good to go!</p>",150          "post_number": 3,151          "post_type": 1,152          "posts_count": 3,153          "updated_at": "2020-07-28T08:45:36.209Z",154          "reply_count": 0,155          "reply_to_post_number": 2,156          "quote_count": 0,157          "incoming_link_count": 131,158          "reads": 38,159          "readers_count": 37,160          "score": 662.6,161          "yours": false,162          "topic_id": 90769,163          "topic_slug": "is-building-from-source-for-windows-up-to-date-subprocess-calledprocesserror-command-cmake-returned-non-zero-exit-status-1-error",164          "display_username": "A curious guy here!",165          "primary_group_name": null,166          "flair_name": null,167          "flair_url": null,168          "flair_bg_color": null,169          "flair_color": null,170          "flair_group_id": null,171          "badges_granted": [],172          "version": 1,173          "can_edit": false,174          "can_delete": false,175          "can_recover": false,176          "can_see_hidden_post": false,177          "can_wiki": false,178          "read": true,179          "user_title": "",180          "reply_to_user": {181            "id": 7863,182            "username": "Shisho_Sama",183            "name": "A curious guy here!",184            "avatar_template": "/user_avatar/discuss.pytorch.org/shisho_sama/{size}/6926_2.png"185          },186          "bookmarked": false,187          "actions_summary": [],188          "moderator": false,189          "admin": false,190          "staff": false,191          "user_id": 7863,192          "hidden": false,193          "trust_level": 2,194          "deleted_at": null,195          "user_deleted": false,196          "edit_reason": null,197          "can_view_edit_history": true,198          "wiki": false,199          "post_url": "/t/is-building-from-source-for-windows-up-to-date-subprocess-calledprocesserror-command-cmake-returned-non-zero-exit-status-1-error/90769/3",200          "can_accept_answer": false,201          "can_unaccept_answer": false,202          "accepted_answer": true,203          "topic_accepted_answer": true204        }205      ],206      "stream": [207        216214,208        216235,209        216266210      ]211    },212    "timeline_lookup": [213      [214        1,215        1916216      ]217    ],218    "suggested_topics": [219      {220        "fancy_title": "How am i supposed to get old versions of torch on windows x64 arhitecture?",221        "id": 222813,222        "title": "How am i supposed to get old versions of torch on windows x64 arhitecture?",223        "slug": "how-am-i-supposed-to-get-old-versions-of-torch-on-windows-x64-arhitecture",224        "posts_count": 3,225        "reply_count": 1,226        "highest_post_number": 3,227        "image_url": null,228        "created_at": "2025-09-02T00:37:13.338Z",229        "last_posted_at": "2025-09-05T09:36:12.011Z",230        "bumped": true,231        "bumped_at": "2025-09-05T09:36:12.011Z",232        "archetype": "regular",233        "unseen": false,234        "pinned": false,235        "unpinned": null,236        "visible": true,237        "closed": false,238        "archived": false,239        "bookmarked": null,240        "liked": null,241        "tags_descriptions": {},242        "like_count": 0,243        "views": 35,244        "category_id": 26,245        "featured_link": null,246        "has_accepted_answer": false,247        "posters": [248          {249            "extras": "latest",250            "description": "Original Poster, Most Recent Poster",251            "user": {252              "id": 85715,253              "username": "Alex_Eugen_Botez",254              "name": "Alex Eugen Botez",255              "avatar_template": "/user_avatar/discuss.pytorch.org/alex_eugen_botez/{size}/75235_2.png",256              "trust_level": 0257            }258          },259          {260            "extras": null,261            "description": "Frequent Poster",262            "user": {263              "id": 3534,264              "username": "ptrblck",265              "name": "",266              "avatar_template": "/user_avatar/discuss.pytorch.org/ptrblck/{size}/1823_2.png",267              "admin": true,268              "moderator": true,269              "trust_level": 2270            }271          }272        ]273      },274      {275        "fancy_title": "Identifying if gpu cores are used",276        "id": 216872,277        "title": "Identifying if gpu cores are used",278        "slug": "identifying-if-gpu-cores-are-used",279        "posts_count": 3,280        "reply_count": 0,281        "highest_post_number": 4,282        "image_url": "https://discuss.pytorch.org/uploads/default/optimized/3X/e/8/e89b25fc8d05172dff54f38fd989c9bea1b386ab_2_1024x545.png",283        "created_at": "2025-02-19T07:45:24.715Z",284        "last_posted_at": "2025-05-06T13:32:31.627Z",285        "bumped": true,286        "bumped_at": "2025-05-06T13:32:31.627Z",287        "archetype": "regular",288        "unseen": false,289        "pinned": false,290        "unpinned": null,291        "visible": true,292        "closed": false,293        "archived": false,294        "bookmarked": null,295        "liked": null,296        "tags_descriptions": {},297        "like_count": 0,298        "views": 204,299        "category_id": 26,300        "featured_link": null,301        "has_accepted_answer": false,302        "posters": [303          {304            "extras": null,305            "description": "Original Poster",306            "user": {307              "id": 71824,308              "username": "Stephane_Ancelot",309              "name": "Stéphane Ancelot",310              "avatar_template": "/user_avatar/discuss.pytorch.org/stephane_ancelot/{size}/61201_2.png",311              "trust_level": 1312            }313          },314          {315            "extras": null,316            "description": "Frequent Poster",317            "user": {318              "id": 3534,319              "username": "ptrblck",320              "name": "",321              "avatar_template": "/user_avatar/discuss.pytorch.org/ptrblck/{size}/1823_2.png",322              "admin": true,323              "moderator": true,324              "trust_level": 2325            }326          },327          {328            "extras": "latest",329            "description": "Most Recent Poster",330            "user": {331              "id": 84077,332              "username": "python",333              "name": null,334              "avatar_template": "/letter_avatar_proxy/v4/letter/p/ee7513/{size}.png",335              "trust_level": 1336            }337          }338        ]339      },340      {341        "fancy_title": "TorchCodec wheels",342        "id": 218578,343        "title": "TorchCodec wheels",344        "slug": "torchcodec-wheels",345        "posts_count": 3,346        "reply_count": 0,347        "highest_post_number": 3,348        "image_url": null,349        "created_at": "2025-04-03T12:05:19.354Z",350        "last_posted_at": "2025-10-23T11:22:55.349Z",351        "bumped": true,352        "bumped_at": "2025-10-23T11:22:55.349Z",353        "archetype": "regular",354        "unseen": false,355        "pinned": false,356        "unpinned": null,357        "visible": true,358        "closed": false,359        "archived": false,360        "bookmarked": null,361        "liked": null,362        "tags_descriptions": {},363        "like_count": 0,364        "views": 431,365        "category_id": 26,366        "featured_link": null,367        "has_accepted_answer": false,368        "posters": [369          {370            "extras": null,371            "description": "Original Poster",372            "user": {373              "id": 83616,374              "username": "richbill",375              "name": "",376              "avatar_template": "/letter_avatar_proxy/v4/letter/r/4af34b/{size}.png",377              "trust_level": 1378            }379          },380          {381            "extras": null,382            "description": "Frequent Poster",383            "user": {384              "id": 84077,385              "username": "python",386              "name": null,387              "avatar_template": "/letter_avatar_proxy/v4/letter/p/ee7513/{size}.png",388              "trust_level": 1389            }390          },391          {392            "extras": "latest",393            "description": "Most Recent Poster",394            "user": {395              "id": 86261,396              "username": "marco_adamo",397              "name": "marco adamo",398              "avatar_template": "/user_avatar/discuss.pytorch.org/marco_adamo/{size}/78511_2.png",399              "trust_level": 0400            }401          }402        ]403      },404      {405        "fancy_title": "How to use torch with CUDA 12.9",406        "id": 220827,407        "title": "How to use torch with CUDA 12.9",408        "slug": "how-to-use-torch-with-cuda-12-9",409        "posts_count": 5,410        "reply_count": 2,411        "highest_post_number": 7,412        "image_url": null,413        "created_at": "2025-06-15T07:08:55.857Z",414        "last_posted_at": "2025-07-18T22:41:59.447Z",415        "bumped": true,416        "bumped_at": "2025-07-18T22:41:59.447Z",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": 3,428        "views": 7528,429        "category_id": 26,430        "featured_link": null,431        "has_accepted_answer": false,432        "posters": [433          {434            "extras": null,435            "description": "Original Poster",436            "user": {437              "id": 84711,438              "username": "Ahmed_Mhmouad",439              "name": "Ahmed Mhmouad",440              "avatar_template": "/user_avatar/discuss.pytorch.org/ahmed_mhmouad/{size}/77381_2.png",441              "trust_level": 0442            }443          },444          {445            "extras": null,446            "description": "Frequent Poster",447            "user": {448              "id": 3534,449              "username": "ptrblck",450              "name": "",451              "avatar_template": "/user_avatar/discuss.pytorch.org/ptrblck/{size}/1823_2.png",452              "admin": true,453              "moderator": true,454              "trust_level": 2455            }456          },457          {458            "extras": null,459            "description": "Frequent Poster",460            "user": {461              "id": 85105,462              "username": "yogesh_jog",463              "name": "yogesh jog",464              "avatar_template": "/user_avatar/discuss.pytorch.org/yogesh_jog/{size}/77689_2.png",465              "trust_level": 0466            }467          },468          {469            "extras": "latest",470            "description": "Most Recent Poster",471            "user": {472              "id": 85150,473              "username": "HipHop_Delhi",474              "name": "HipHop Delhi",475              "avatar_template": "/user_avatar/discuss.pytorch.org/hiphop_delhi/{size}/77724_2.png",476              "trust_level": 0477            }478          }479        ]480      },481      {482        "fancy_title": "PyTorch scripts not on PATH",483        "id": 222873,484        "title": "PyTorch scripts not on PATH",485        "slug": "pytorch-scripts-not-on-path",486        "posts_count": 2,487        "reply_count": 0,488        "highest_post_number": 2,489        "image_url": null,490        "created_at": "2025-09-05T04:05:06.932Z",491        "last_posted_at": "2025-09-30T15:08:05.003Z",492        "bumped": true,493        "bumped_at": "2025-09-30T15:08:05.003Z",494        "archetype": "regular",495        "unseen": false,496        "pinned": false,497        "unpinned": null,498        "visible": true,499        "closed": false,500        "archived": false,501        "bookmarked": null,502        "liked": null,503        "tags_descriptions": {},504        "like_count": 0,505        "views": 97,506        "category_id": 26,507        "featured_link": null,508        "has_accepted_answer": false,509        "posters": [510          {511            "extras": null,512            "description": "Original Poster",513            "user": {514              "id": 85749,515              "username": "lfd.arch",516              "name": "Luis Donoso",517              "avatar_template": "/user_avatar/discuss.pytorch.org/lfd.arch/{size}/78141_2.png",518              "trust_level": 0519            }520          },521          {522            "extras": "latest",523            "description": "Most Recent Poster",524            "user": {525              "id": 15730,526              "username": "charan_Vjy",527              "name": "Charan Vjy",528              "avatar_template": "/user_avatar/discuss.pytorch.org/charan_vjy/{size}/13238_2.png",529              "trust_level": 2530            }531          }532        ]533      }534    ],535    "tags_descriptions": {},536    "fancy_title": "Is building from source for windows up to date? (subprocess.CalledProcessError: Command &lsquo;[&lsquo;cmake&rsquo;, ..] returned non-zero exit status 1 error)",537    "id": 90769,538    "title": "Is building from source for windows up to date? (subprocess.CalledProcessError: Command '['cmake', ..] returned non-zero exit status 1 error)",539    "posts_count": 3,540    "created_at": "2020-07-28T05:11:54.348Z",541    "views": 10738,542    "reply_count": 1,543    "like_count": 0,544    "last_posted_at": "2020-07-28T08:45:34.710Z",545    "visible": true,546    "closed": false,547    "archived": false,548    "has_summary": false,549    "archetype": "regular",550    "slug": "is-building-from-source-for-windows-up-to-date-subprocess-calledprocesserror-command-cmake-returned-non-zero-exit-status-1-error",551    "category_id": 26,552    "word_count": 964,553    "deleted_at": null,554    "user_id": 7863,555    "featured_link": null,556    "pinned_globally": false,557    "pinned_at": null,558    "pinned_until": null,559    "image_url": null,560    "slow_mode_seconds": 0,561    "draft": null,562    "draft_key": "topic_90769",563    "draft_sequence": null,564    "unpinned": null,565    "pinned": false,566    "current_post_number": 1,567    "highest_post_number": 3,568    "deleted_by": null,569    "actions_summary": [570      {571        "id": 4,572        "count": 0,573        "hidden": false,574        "can_act": false575      },576      {577        "id": 8,578        "count": 0,579        "hidden": false,580        "can_act": false581      },582      {583        "id": 10,584        "count": 0,585        "hidden": false,586        "can_act": false587      },588      {589        "id": 7,590        "count": 0,591        "hidden": false,592        "can_act": false593      }594    ],595    "chunk_size": 20,596    "bookmarked": false,597    "topic_timer": null,598    "message_bus_last_id": 0,599    "participant_count": 1,600    "show_read_indicator": false,601    "thumbnails": null,602    "slow_mode_enabled_until": null,603    "accepted_answer": {604      "post_number": 3,605      "username": "Shisho_Sama",606      "name": "A curious guy here!",607      "excerpt": "OK, Here are my findings. \nFirst of all include &lt;torch/torch.h&gt; doesnt need building from source. its just in the a different path that is, \nin include directories, one need to add both : \n$(SolutionDir)Dependencies\\libtorch-debug-latest\\libtorch\\include; $(SolutionDir)Dependencies\\libtorch-debug-la&hellip;"608    },609    "can_vote": false,610    "vote_count": 0,611    "user_voted": false,612    "discourse_zendesk_plugin_zendesk_id": null,613    "discourse_zendesk_plugin_zendesk_url": "https://your-url.zendesk.com/agent/tickets/",614    "details": {615      "can_edit": false,616      "notification_level": 1,617      "participants": [618        {619          "id": 7863,620          "username": "Shisho_Sama",621          "name": "A curious guy here!",622          "avatar_template": "/user_avatar/discuss.pytorch.org/shisho_sama/{size}/6926_2.png",623          "post_count": 3,624          "primary_group_name": null,625          "flair_name": null,626          "flair_url": null,627          "flair_color": null,628          "flair_bg_color": null,629          "flair_group_id": null,630          "trust_level": 2631        }632      ],633      "created_by": {634        "id": 7863,635        "username": "Shisho_Sama",636        "name": "A curious guy here!",637        "avatar_template": "/user_avatar/discuss.pytorch.org/shisho_sama/{size}/6926_2.png"638      },639      "last_poster": {640        "id": 7863,641        "username": "Shisho_Sama",642        "name": "A curious guy here!",643        "avatar_template": "/user_avatar/discuss.pytorch.org/shisho_sama/{size}/6926_2.png"644      },645      "links": [646        {647          "url": "https://discuss.pytorch.org/t/pytorch-build-from-source-on-windows/40288/9",648          "title": "PyTorch build from source on Windows",649          "internal": true,650          "attachment": false,651          "reflection": false,652          "clicks": 206,653          "user_id": 7863,654          "domain": "discuss.pytorch.org",655          "root_domain": "pytorch.org"656        },657        {658          "url": "https://github.com/pytorch/pytorch/issues/5964#issuecomment-375698855",659          "title": "fatal error: torch/torch.h: No such file or directory · Issue #5964 · pytorch/pytorch · GitHub",660          "internal": false,661          "attachment": false,662          "reflection": false,663          "clicks": 11,664          "user_id": 7863,665          "domain": "github.com",666          "root_domain": "github.com"667        },668        {669          "url": "https://discuss.pytorch.org/t/the-ordinal-961-could-not-be-located-in-the-dynamic-link-library/90791",670          "title": "The ordinal 961 could not be located in the dynamic link library",671          "internal": true,672          "attachment": false,673          "reflection": true,674          "clicks": 3,675          "user_id": 7863,676          "domain": "discuss.pytorch.org",677          "root_domain": "pytorch.org"678        }679      ]680    },681    "bookmarks": []682  },683  {684    "post_stream": {685      "posts": [686        {687          "id": 212502,688          "name": "Florian Dietz",689          "username": "Florian_Dietz",690          "avatar_template": "/user_avatar/discuss.pytorch.org/florian_dietz/{size}/11502_2.png",691          "created_at": "2020-07-15T08:58:30.731Z",692          "cooked": "<p>I am working on an unusual research project and need to modify some gradients in-place.</p>\n<p>This worked fine so far, but I just updated to a newer version of Pytorch, and now I am getting this error:</p>\n<p>“RuntimeError: one of the variables needed for gradient computation has been modified by an inplace operation: [torch.FloatTensor [762, 5]], which is output 0 of TBackward, is at version 5; expected version 2 instead. Hint: the backtrace further above shows the operation that failed to compute its gradient. The variable in question was changed in there or anywhere later. Good luck!”</p>\n<p>I get that this is an error for almost every usecase, but I actually want to do this on purpose.</p>\n<p>Is there a way to turn this error off?</p>\n<p>Alternatively, is there another way to modify gradients that is legal / preferred?</p>\n<p>(My situation: I’m running a network where the architecture is not fixed but changes based on intermediate results. To backpropagate through this safely, I break the network into smaller parts, and manually retrieve and re-insert the gradients at the appropriate tensors.)</p>",693          "post_number": 1,694          "post_type": 1,695          "posts_count": 8,696          "updated_at": "2020-07-15T08:58:30.731Z",697          "reply_count": 0,698          "reply_to_post_number": null,699          "quote_count": 0,700          "incoming_link_count": 2276,701          "reads": 120,702          "readers_count": 119,703          "score": 11404.0,704          "yours": false,705          "topic_id": 89290,706          "topic_slug": "how-to-modify-gradients-in-place",707          "display_username": "Florian Dietz",708          "primary_group_name": null,709          "flair_name": null,710          "flair_url": null,711          "flair_bg_color": null,712          "flair_color": null,713          "flair_group_id": null,714          "badges_granted": [],715          "version": 1,716          "can_edit": false,717          "can_delete": false,718          "can_recover": false,719          "can_see_hidden_post": false,720          "can_wiki": false,721          "read": true,722          "user_title": null,723          "bookmarked": false,724          "actions_summary": [725            {726              "id": 2,727              "count": 1728            }729          ],730          "moderator": false,731          "admin": false,732          "staff": false,733          "user_id": 18090,734          "hidden": false,735          "trust_level": 1,736          "deleted_at": null,737          "user_deleted": false,738          "edit_reason": null,739          "can_view_edit_history": true,740          "wiki": false,741          "post_url": "/t/how-to-modify-gradients-in-place/89290/1",742          "can_accept_answer": false,743          "can_unaccept_answer": false,744          "accepted_answer": false,745          "topic_accepted_answer": null,746          "can_vote": false747        },748        {749          "id": 212543,750          "name": "",751          "username": "ptrblck",752          "avatar_template": "/user_avatar/discuss.pytorch.org/ptrblck/{size}/1823_2.png",753          "created_at": "2020-07-15T10:38:51.329Z",754          "cooked": "<p>Would your workflow work with hooks (via <code>tensor.register_hook()</code>) to manipulate the gradients?<br>\nIf not, could you try to wrap the gradient manipulations into a <code>with torch.no_grad()</code> block, if that’s not already the case?</p>",755          "post_number": 2,756          "post_type": 1,757          "posts_count": 8,758          "updated_at": "2020-07-15T11:28:03.838Z",759          "reply_count": 1,760          "reply_to_post_number": null,761          "quote_count": 0,762          "incoming_link_count": 14,763          "reads": 115,764          "readers_count": 114,765          "score": 98.0,766          "yours": false,767          "topic_id": 89290,768          "topic_slug": "how-to-modify-gradients-in-place",769          "display_username": "",770          "primary_group_name": null,771          "flair_name": null,772          "flair_url": null,773          "flair_bg_color": null,774          "flair_color": null,775          "flair_group_id": null,776          "badges_granted": [],777          "version": 1,778          "can_edit": false,779          "can_delete": false,780          "can_recover": false,781          "can_see_hidden_post": false,782          "can_wiki": false,783          "read": true,784          "user_title": "",785          "bookmarked": false,786          "actions_summary": [],787          "moderator": true,788          "admin": true,789          "staff": true,790          "user_id": 3534,791          "hidden": false,792          "trust_level": 2,793          "deleted_at": null,794          "user_deleted": false,795          "edit_reason": null,796          "can_view_edit_history": true,797          "wiki": false,798          "post_url": "/t/how-to-modify-gradients-in-place/89290/2",799          "can_accept_answer": false,800          "can_unaccept_answer": false,801          "accepted_answer": false,802          "topic_accepted_answer": null803        },804        {805          "id": 212561,806          "name": "Florian Dietz",807          "username": "Florian_Dietz",808          "avatar_template": "/user_avatar/discuss.pytorch.org/florian_dietz/{size}/11502_2.png",809          "created_at": "2020-07-15T11:32:07.152Z",810          "cooked": "<p><code>tensor.register_hook()</code> would have worked, but I would have to refactor everything. It would take days, and I might lose some functionality, because the system I already built is more flexible for my purposes. (Hooks get executed immediately, but I build a prioritized queue of calculations that still need to be performed)</p>\n<p>I’m not sure I understand how <code>torch.no_grad()</code> would help. I am performing normal gradient calculations through backpropagation. Then I apply modifications to the generated gradients.</p>",811          "post_number": 3,812          "post_type": 1,813          "posts_count": 8,814          "updated_at": "2020-07-15T11:32:07.152Z",815          "reply_count": 1,816          "reply_to_post_number": 2,817          "quote_count": 0,818          "incoming_link_count": 14,819          "reads": 115,820          "readers_count": 114,821          "score": 98.0,822          "yours": false,823          "topic_id": 89290,824          "topic_slug": "how-to-modify-gradients-in-place",825          "display_username": "Florian Dietz",826          "primary_group_name": null,827          "flair_name": null,828          "flair_url": null,829          "flair_bg_color": null,830          "flair_color": null,831          "flair_group_id": null,832          "badges_granted": [],833          "version": 1,834          "can_edit": false,835          "can_delete": false,836          "can_recover": false,837          "can_see_hidden_post": false,838          "can_wiki": false,839          "read": true,840          "user_title": null,841          "reply_to_user": {842            "id": 3534,843            "username": "ptrblck",844            "name": "",845            "avatar_template": "/user_avatar/discuss.pytorch.org/ptrblck/{size}/1823_2.png"846          },847          "bookmarked": false,848          "actions_summary": [],849          "moderator": false,850          "admin": false,851          "staff": false,852          "user_id": 18090,853          "hidden": false,854          "trust_level": 1,855          "deleted_at": null,856          "user_deleted": false,857          "edit_reason": null,858          "can_view_edit_history": true,859          "wiki": false,860          "post_url": "/t/how-to-modify-gradients-in-place/89290/3",861          "can_accept_answer": false,862          "can_unaccept_answer": false,863          "accepted_answer": false,864          "topic_accepted_answer": null865        },866        {867          "id": 212566,868          "name": "Thomas V",869          "username": "tom",870          "avatar_template": "/user_avatar/discuss.pytorch.org/tom/{size}/3162_2.png",871          "created_at": "2020-07-15T11:42:28.471Z",872          "cooked": "<p>Note that</p>\n<ol>\n<li>the error message comes from modifying something in-place that has been used in the forward and is needed for the backward. You might check the backtrace mentioned here: (Note that it typically is in C++ stderr and not shown in Jupyter unless you use nightlies when it is in Python stderr.)</li>\n</ol>\n<blockquote>\n<p>Hint: the backtrace further above shows the operation that failed to compute its gradient.</p>\n</blockquote>\n<ol start=\"2\">\n<li>If for the type of thing you are doing, I would probably not use <code>backward</code> for the intermediates but use <code>torch.autograd.grad</code>. Basically, <code>backward</code> is best thought of as existing for the very narrow case of “compute gradients then fed into the optimizer”.</li>\n</ol>\n<p>Best regards</p>\n<p>Thomas</p>",873          "post_number": 4,874          "post_type": 1,875          "posts_count": 8,876          "updated_at": "2020-07-15T11:42:28.471Z",877          "reply_count": 1,878          "reply_to_post_number": 3,879          "quote_count": 0,880          "incoming_link_count": 19,881          "reads": 110,882          "readers_count": 109,883          "score": 167.0,884          "yours": false,885          "topic_id": 89290,886          "topic_slug": "how-to-modify-gradients-in-place",887          "display_username": "Thomas V",888          "primary_group_name": null,889          "flair_name": null,890          "flair_url": null,891          "flair_bg_color": null,892          "flair_color": null,893          "flair_group_id": null,894          "badges_granted": [],895          "version": 1,896          "can_edit": false,897          "can_delete": false,898          "can_recover": false,899          "can_see_hidden_post": false,900          "can_wiki": false,901          "read": true,902          "user_title": null,903          "reply_to_user": {904            "id": 18090,905            "username": "Florian_Dietz",906            "name": "Florian Dietz",907            "avatar_template": "/user_avatar/discuss.pytorch.org/florian_dietz/{size}/11502_2.png"908          },909          "bookmarked": false,910          "actions_summary": [911            {912              "id": 2,913              "count": 1914            }915          ],916          "moderator": false,917          "admin": false,918          "staff": false,919          "user_id": 616,920          "hidden": false,921          "trust_level": 2,922          "deleted_at": null,923          "user_deleted": false,924          "edit_reason": null,925          "can_view_edit_history": true,926          "wiki": false,927          "post_url": "/t/how-to-modify-gradients-in-place/89290/4",928          "can_accept_answer": false,929          "can_unaccept_answer": false,930          "accepted_answer": false,931          "topic_accepted_answer": null932        },933        {934          "id": 212580,935          "name": "Florian Dietz",936          "username": "Florian_Dietz",937          "avatar_template": "/user_avatar/discuss.pytorch.org/florian_dietz/{size}/11502_2.png",938          "created_at": "2020-07-15T12:28:02.336Z",939          "cooked": "<p>That’s interesting. I didn’t know there was a difference between <code>torch.autograd.grad</code> and <code>torch.autograd.backward</code>. It looks like the first one is functional, while the second has side-effects. Is that correct? Is there anything you would recommend to read to understand this better? I’m worried I might break something if I make a switch at this point without fully understanding everything.</p>",940          "post_number": 5,941          "post_type": 1,942          "posts_count": 8,943          "updated_at": "2020-07-15T12:28:02.336Z",944          "reply_count": 1,945          "reply_to_post_number": 4,946          "quote_count": 0,947          "incoming_link_count": 4,948          "reads": 96,949          "readers_count": 95,950          "score": 44.2,951          "yours": false,952          "topic_id": 89290,953          "topic_slug": "how-to-modify-gradients-in-place",954          "display_username": "Florian Dietz",955          "primary_group_name": null,956          "flair_name": null,957          "flair_url": null,958          "flair_bg_color": null,959          "flair_color": null,960          "flair_group_id": null,961          "badges_granted": [],962          "version": 1,963          "can_edit": false,964          "can_delete": false,965          "can_recover": false,966          "can_see_hidden_post": false,967          "can_wiki": false,968          "read": true,969          "user_title": null,970          "reply_to_user": {971            "id": 616,972            "username": "tom",973            "name": "Thomas V",974            "avatar_template": "/user_avatar/discuss.pytorch.org/tom/{size}/3162_2.png"975          },976          "bookmarked": false,977          "actions_summary": [],978          "moderator": false,979          "admin": false,980          "staff": false,981          "user_id": 18090,982          "hidden": false,983          "trust_level": 1,984          "deleted_at": null,985          "user_deleted": false,986          "edit_reason": null,987          "can_view_edit_history": true,988          "wiki": false,989          "post_url": "/t/how-to-modify-gradients-in-place/89290/5",990          "can_accept_answer": false,991          "can_unaccept_answer": false,992          "accepted_answer": false,993          "topic_accepted_answer": null994        },995        {996          "id": 212595,997          "name": "Thomas V",998          "username": "tom",999          "avatar_template": "/user_avatar/discuss.pytorch.org/tom/{size}/3162_2.png",1000          "created_at": "2020-07-15T13:47:31.171Z",1001          "cooked": "<p>Yeah, so basically, the difference is “only” functional vs. side-effects.<br>\nFor optimizers, you need to have <code>.backward</code> as .grad is what they consume.<br>\nBut for other purposes it would seem that <code>autograd.grad</code> makes is clear that the result is yours.<br>\nProbably a very careful reading of the documentation (the Autograd Mechanics note and torch.autograd come to mind).</p>\n<p>Best regards</p>\n<p>Thomas</p>",1002          "post_number": 6,1003          "post_type": 1,1004          "posts_count": 8,1005          "updated_at": "2020-07-15T13:47:31.171Z",1006          "reply_count": 1,1007          "reply_to_post_number": 5,1008          "quote_count": 0,1009          "incoming_link_count": 13,1010          "reads": 94,1011          "readers_count": 93,1012          "score": 103.8,1013          "yours": false,1014          "topic_id": 89290,1015          "topic_slug": "how-to-modify-gradients-in-place",1016          "display_username": "Thomas V",1017          "primary_group_name": null,1018          "flair_name": null,1019          "flair_url": null,1020          "flair_bg_color": null,1021          "flair_color": null,1022          "flair_group_id": null,1023          "badges_granted": [],1024          "version": 1,1025          "can_edit": false,1026          "can_delete": false,1027          "can_recover": false,1028          "can_see_hidden_post": false,1029          "can_wiki": false,1030          "read": true,1031          "user_title": null,1032          "reply_to_user": {1033            "id": 18090,1034            "username": "Florian_Dietz",1035            "name": "Florian Dietz",1036            "avatar_template": "/user_avatar/discuss.pytorch.org/florian_dietz/{size}/11502_2.png"1037          },1038          "bookmarked": false,1039          "actions_summary": [1040            {1041              "id": 2,1042              "count": 11043            }1044          ],1045          "moderator": false,1046          "admin": false,1047          "staff": false,1048          "user_id": 616,1049          "hidden": false,1050          "trust_level": 2,1051          "deleted_at": null,1052          "user_deleted": false,1053          "edit_reason": null,1054          "can_view_edit_history": true,1055          "wiki": false,1056          "post_url": "/t/how-to-modify-gradients-in-place/89290/6",1057          "can_accept_answer": false,1058          "can_unaccept_answer": false,1059          "accepted_answer": false,1060          "topic_accepted_answer": null1061        },1062        {1063          "id": 212609,1064          "name": "Florian Dietz",1065          "username": "Florian_Dietz",1066          "avatar_template": "/user_avatar/discuss.pytorch.org/florian_dietz/{size}/11502_2.png",1067          "created_at": "2020-07-15T14:43:55.102Z",1068          "cooked": "<p>Thanks! That’s good to know. Now I just need to figure out if that’s worth all the refactoring…</p>",1069          "post_number": 7,1070          "post_type": 1,1071          "posts_count": 8,1072          "updated_at": "2020-07-15T14:43:55.102Z",1073          "reply_count": 1,1074          "reply_to_post_number": 6,1075          "quote_count": 0,1076          "incoming_link_count": 2,1077          "reads": 88,1078          "readers_count": 87,1079          "score": 27.6,1080          "yours": false,1081          "topic_id": 89290,1082          "topic_slug": "how-to-modify-gradients-in-place",1083          "display_username": "Florian Dietz",1084          "primary_group_name": null,1085          "flair_name": null,1086          "flair_url": null,1087          "flair_bg_color": null,1088          "flair_color": null,1089          "flair_group_id": null,1090          "badges_granted": [],1091          "version": 1,1092          "can_edit": false,1093          "can_delete": false,1094          "can_recover": false,1095          "can_see_hidden_post": false,1096          "can_wiki": false,1097          "read": true,1098          "user_title": null,1099          "reply_to_user": {1100            "id": 616,1101            "username": "tom",1102            "name": "Thomas V",1103            "avatar_template": "/user_avatar/discuss.pytorch.org/tom/{size}/3162_2.png"1104          },1105          "bookmarked": false,1106          "actions_summary": [],1107          "moderator": false,1108          "admin": false,1109          "staff": false,1110          "user_id": 18090,1111          "hidden": false,1112          "trust_level": 1,1113          "deleted_at": null,1114          "user_deleted": false,1115          "edit_reason": null,1116          "can_view_edit_history": true,1117          "wiki": false,1118          "post_url": "/t/how-to-modify-gradients-in-place/89290/7",1119          "can_accept_answer": false,1120          "can_unaccept_answer": false,1121          "accepted_answer": false,1122          "topic_accepted_answer": null1123        },1124        {1125          "id": 216263,1126          "name": "Florian Dietz",1127          "username": "Florian_Dietz",1128          "avatar_template": "/user_avatar/discuss.pytorch.org/florian_dietz/{size}/11502_2.png",1129          "created_at": "2020-07-28T08:41:13.721Z",1130          "cooked": "<p>Quick update: In the meantime, I have noticed that my code contained a bug. I tried to apply a loss to a calculation after some parameters used in it had already been modified by another calculation. This is what caused the error message. The question I asked is still valid, and the answers are still useful. But just in case somebody wonders, the reason for the error message was not the in-place modification of gradients.</p>",1131          "post_number": 8,1132          "post_type": 1,1133          "posts_count": 8,1134          "updated_at": "2020-07-28T08:41:13.721Z",1135          "reply_count": 0,1136          "reply_to_post_number": 7,1137          "quote_count": 0,1138          "incoming_link_count": 8,1139          "reads": 84,1140          "readers_count": 83,1141          "score": 56.8,1142          "yours": false,1143          "topic_id": 89290,1144          "topic_slug": "how-to-modify-gradients-in-place",1145          "display_username": "Florian Dietz",1146          "primary_group_name": null,1147          "flair_name": null,1148          "flair_url": null,1149          "flair_bg_color": null,1150          "flair_color": null,1151          "flair_group_id": null,1152          "badges_granted": [],1153          "version": 1,1154          "can_edit": false,1155          "can_delete": false,1156          "can_recover": false,1157          "can_see_hidden_post": false,1158          "can_wiki": false,1159          "read": true,1160          "user_title": null,1161          "reply_to_user": {1162            "id": 18090,1163            "username": "Florian_Dietz",1164            "name": "Florian Dietz",1165            "avatar_template": "/user_avatar/discuss.pytorch.org/florian_dietz/{size}/11502_2.png"1166          },1167          "bookmarked": false,1168          "actions_summary": [],1169          "moderator": false,1170          "admin": false,1171          "staff": false,1172          "user_id": 18090,1173          "hidden": false,1174          "trust_level": 1,1175          "deleted_at": null,1176          "user_deleted": false,1177          "edit_reason": null,1178          "can_view_edit_history": true,1179          "wiki": false,1180          "post_url": "/t/how-to-modify-gradients-in-place/89290/8",1181          "can_accept_answer": false,1182          "can_unaccept_answer": false,1183          "accepted_answer": false,1184          "topic_accepted_answer": null1185        }1186      ],1187      "stream": [1188        212502,1189        212543,1190        212561,1191        212566,1192        212580,1193        212595,1194        212609,1195        2162631196      ]1197    },1198    "timeline_lookup": [1199      [1200        1,

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