Repository navigation
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/116926
Note: Links to docs will display an error until the docs builds have been completed. ❌ 4 New FailuresAs of commit 8f16fd3 with merge base 2dca3e9 ( NEW FAILURES - The following jobs have failed:
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
|
|
|
@pytorchbot label "topic: not user facing" |
|
Also fixes #116242 |
|
Didn't find following labels among repository labels: module:cuda |
|
@pytorchbot label "module: cuda" |
Not sure if this PR depends on it (though it might); building pytorch with the CUDA Toolkit 12.x installed out of the box simply fails on Windows because the cudaToolsExt libraries are no longer there; the PR makes changes that alleviate this. |
malfet
left a comment
There was a problem hiding this comment.
Thank you for the change, but do you mind splitting this one int two PRs:
- One that fixes compilation problem in vec_base.h (please mention the compiler error that were generated before it applied)
- Another that fixes nvtx discovery (though I it would be better to modify torch:nvtoolsext discovery logic with trying to find it in the cuda toolkit folder and then fallback to the one embedded into the nccl, rather than add
CUDA_VERSION_MAJOR > 12condition, which is not actually correct, nvtx is shipped with the toolkit but no longer installed by default)
| // identifier is odr-used or not, and in any case it's hard to tell if | ||
| // a variable is odr-used or not. So best to just cut the problem at the root. | ||
| static constexpr size_type size_T = sizeof(T); // Workaround to compile with VS2022. | ||
| //static constexpr size_type size_T = sizeof(T); // Workaround to compile with VS2022. |
There was a problem hiding this comment.
Do you mind deleting this line altogether? And half of the preamble about not supporting C++17 yet?
|
I can't find cudaToolsExt on Windows too, that is why I was pushing the PR. Unfortunately, some META builds should be fixed before it can be landed. |
|
Since this PR seems stale for a week, I've created another one to just focus on MSVC error: |
Fixes #115922 This PR is prepared to separate existing #116926 and to apply suggestions in the review. `scalar_t` which is defined as `c10::impl::ScalarTypeToCPPType<ScalarType::Half>::t` appears to be causing the issue with `Visual Studio 2022 17.8.4` (coming with `MSVC 14.38.33130`) Error message: ``` aten\src\ATen/cpu/vec/vec_base.h(150): fatal error C1001: Internal compiler error. (compiler file 'D:\a_work\1\s\src\vctools\Compiler\CxxFE\sl\p1\c\toinil.c', line 910) ``` --- Related line was added for a similar issue before as a workaround (`scalar_t` definition) [Fix compile error for vs2022](#85958) Pull Request resolved: #117497 Approved by: https://github.com/ezyang, https://github.com/malfet
Hi, I've been encountering both of these issues too and I can provide a bit more information on them.
|
|
And just in case it's helpful, it's not a proper fix I believe, but I made the NvToolsExt issue go away by: Adding in cuda.cmake L59 after find_package(CUDAToolkit REQUIRED): And in share/cmake/Torch/TorchConfig.cmake, this needs to be commented in the if(MSVC)... branch: And then I think I also needed to add this environment variable in Windows: A dirty workaround for sure but perhaps it helps someone to craft the right PR. |
…r this NVTX PR gets merged). - pytorch/pytorch#116926
…r this NVTX PR gets merged). - pytorch/pytorch#116926
…r this NVTX PR gets merged). - pytorch/pytorch#116926
…k fine after this NVTX PR gets merged). - pytorch/pytorch#116926
…k fine after this NVTX PR gets merged). - pytorch/pytorch#116926
…k fine after this NVTX PR gets merged). - pytorch/pytorch#116926
…k fine after this NVTX PR gets merged). - pytorch/pytorch#116926
|
Any update on the NVTX issue? See my comment here for what's happening:
|
|
@patrikhuber We had some troubles when imported the previous NVTX PR into META since some inner builds failed. |
I'm not sure what you mean with "previous NVTX PR" but I'm not necessarily advocating to merge this PR, I'm just saying this is quite a big issue (basically it breaks using/importing the library with CUDA 12 on Windows) and it would be nice to get it fixed. |
Fixes #115922 This PR is prepared to separate existing #116926 and to apply suggestions in the review. `scalar_t` which is defined as `c10::impl::ScalarTypeToCPPType<ScalarType::Half>::t` appears to be causing the issue with `Visual Studio 2022 17.8.4` (coming with `MSVC 14.38.33130`) Error message: ``` aten\src\ATen/cpu/vec/vec_base.h(150): fatal error C1001: Internal compiler error. (compiler file 'D:\a_work\1\s\src\vctools\Compiler\CxxFE\sl\p1\c\toinil.c', line 910) ``` --- Related line was added for a similar issue before as a workaround (`scalar_t` definition) [Fix compile error for vs2022](#85958) Pull Request resolved: #117497 Approved by: https://github.com/ezyang, https://github.com/malfet (cherry picked from commit fa86fa7)
Fixes #115922 This PR is prepared to separate existing #116926 and to apply suggestions in the review. `scalar_t` which is defined as `c10::impl::ScalarTypeToCPPType<ScalarType::Half>::t` appears to be causing the issue with `Visual Studio 2022 17.8.4` (coming with `MSVC 14.38.33130`) Error message: ``` aten\src\ATen/cpu/vec/vec_base.h(150): fatal error C1001: Internal compiler error. (compiler file 'D:\a_work\1\s\src\vctools\Compiler\CxxFE\sl\p1\c\toinil.c', line 910) ``` --- Related line was added for a similar issue before as a workaround (`scalar_t` definition) [Fix compile error for vs2022](#85958) Pull Request resolved: #117497 Approved by: https://github.com/ezyang, https://github.com/malfet (cherry picked from commit fa86fa7) Co-authored-by: Ozan Aydin <148207261+ozanMSFT@users.noreply.github.com>
|
@patrikhuber I meant #109843 |
|
I think the proper way forward with this is that PyTorch has to use |
this worked for me. i am on cuda 11.8. I only needed to change the NVTOOLEXT_HOME and change this line list(APPEND TORCH_INCLUDE_DIRS ${NVTOOLEXT_HOME}) under the MSVC section in the TorchConfig.cmake. Thanks |
|
@patrikhuber That means we need to jump CMake version, which may affect packaging. |
It looks like the nvtx3 target was added in 3.25 https://cmake.org/cmake/help/latest/module/FindCUDAToolkit.html#findcudatoolkit. |
|
Looks like this PR hasn't been updated in a while so we're going to go ahead and mark this as |
|
I guess if #109843 could be merged, then this could be closed. The other MSVC build problem that this PR tackled was already fixed and merged here #117497. @pbelcak maybe you want to have a look at #109843? In any case, @malfet, it would be really great if the NVTX CMake issues could finally be solved, merged, and released. |
|
Bumping up the CMake version doesn't help since the affected In I know that libtorch is not really the best supported part of PyTorch out there but this is seriously breaking projects just because of a binary becoming a header-only library. |
|
I have an older download of |
|
This points a working solution (at least in my case) that does not involve copying DLLs from somewhere. The installer of CUDA 11.8 allows to select only the NXVT component that is then installed at |
Fixes #115922 and #101135
cc @ptrblck @msaroufim @jgong5 @mingfeima @XiaobingSuper @sanchitintel @ashokei @jingxu10