pytorch/cmake
peter 8fcd80af20 Fix "cuda: unknown error" on Windows (#21062)
Summary:
Thanks Jonas1312 for validating this workground.
Fixes #20635.
However, I don't know exactly why this one is needed.
The following are my guesses:
1. It is a CUDA bug. Static linking against `cudart` is the default now, so they didn't run enough tests for dynamic ones.
2. It is related to UCRT. But (1)according to msdn, shared DLLs should share the same CRT. (2) The CUDA related objects like `CUDevice` passing to `cudart` are stored on the stack, not the heap. (3) If this is the case, it should always fail, not sometimes. https://docs.microsoft.com/en-us/cpp/c-runtime-library/potential-errors-passing-crt-objects-across-dll-boundaries?view=vs-2019
3. It is a bug of our side. However, I was unable to find it.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/21062

Differential Revision: D15543557

Pulled By: ezyang

fbshipit-source-id: c23af45ebf582fad93ce5f029af6e1f06cf1d49d
2019-05-29 14:34:02 -07:00
..
External fix nccl compilation to make sure it compiles for architectures that pytorch compiles for (#18739) 2019-04-03 12:52:50 -07:00
Modules Restore TBB module (#20454) 2019-05-28 02:49:36 -07:00
Modules_CUDA_fix Sync FindCUDA/select_computer_arch.cmake from upstream (#19392) 2019-04-18 07:03:19 -07:00
public Fix "cuda: unknown error" on Windows (#21062) 2019-05-29 14:34:02 -07:00
BuildVariables.cmake
Caffe2Config.cmake.in
Caffe2ConfigVersion.cmake.in
cmake_uninstall.cmake.in
Codegen.cmake Don't split 256-bit AVX2 load/store intrinsics (#20609) 2019-05-17 09:16:17 -07:00
Dependencies.cmake Restore TBB module (#20454) 2019-05-28 02:49:36 -07:00
GoogleTestPatch.cmake Fix conda build for Windows (#19824) 2019-04-27 23:10:46 -07:00
MiscCheck.cmake rename BUILD_ATEN_MOBILE to INTERN_BUILD_MOBILE and make it private (#19942) 2019-05-01 00:20:24 -07:00
ProtoBuf.cmake One more fix for #18790 2019-04-12 09:29:15 -07:00
ProtoBufPatch.cmake Update third_party protobuf to v3.6.1 2019-01-23 09:34:53 -08:00
Summary.cmake Restore TBB module (#20454) 2019-05-28 02:49:36 -07:00
TorchConfig.cmake.in CMakeLists changes to enable libtorch for Android (#19762) 2019-05-03 09:28:53 -07:00
TorchConfigVersion.cmake.in
Utils.cmake Pass WERROR to CMake as an explicit parameter rather than an env var. 2019-01-28 20:57:18 -08:00
Whitelist.cmake