diff options
author | Soumith Chintala <soumith@gmail.com> | 2019-04-03 12:27:19 -0700 |
---|---|---|
committer | Facebook Github Bot <facebook-github-bot@users.noreply.github.com> | 2019-04-03 12:47:34 -0700 |
commit | b5d8844bbee40410ea981464da7186ce31ad0311 (patch) | |
tree | 9a41b8cf5e1b2ce59df905eb09158f2787f9ec3b /aten | |
parent | ed9724f3858e97f3baba5da640d0736c92c73270 (diff) | |
download | pytorch-b5d8844bbee40410ea981464da7186ce31ad0311.tar.gz pytorch-b5d8844bbee40410ea981464da7186ce31ad0311.tar.bz2 pytorch-b5d8844bbee40410ea981464da7186ce31ad0311.zip |
push magma init into lazyInitCUDA (#18527)
Summary:
Tries to fix C++ API's usage of MAGMA-based functions.
Attempts to Fix https://github.com/pytorch/pytorch/issues/18074
Pull Request resolved: https://github.com/pytorch/pytorch/pull/18527
Differential Revision: D14691694
Pulled By: soumith
fbshipit-source-id: dd04e74418e486d73ea4a92193ddf79352ed71ba
Diffstat (limited to 'aten')
-rw-r--r-- | aten/src/ATen/cuda/detail/CUDAHooks.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/aten/src/ATen/cuda/detail/CUDAHooks.cpp b/aten/src/ATen/cuda/detail/CUDAHooks.cpp index c93ef77222..eb9b2f32d1 100644 --- a/aten/src/ATen/cuda/detail/CUDAHooks.cpp +++ b/aten/src/ATen/cuda/detail/CUDAHooks.cpp @@ -33,6 +33,9 @@ std::unique_ptr<THCState, void (*)(THCState*)> CUDAHooks::initCUDA() const { THCState* thc_state = THCState_alloc(); THCudaInit(thc_state); +#ifdef USE_MAGMA + THCMagma_init(thc_state); +#endif return std::unique_ptr<THCState, void (*)(THCState*)>( thc_state, [](THCState* p) { if (p) |