mirror of
https://github.com/pytorch/pytorch.git
synced 2025-11-06 17:24:59 +08:00
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
This commit is contained in:
committed by
Facebook Github Bot
parent
ed9724f385
commit
b5d8844bbe
@ -113,3 +113,11 @@ TEST(TensorTest, ToDeviceAndDtype_MultiCUDA) {
|
||||
tensor = tensor.to(at::kCPU, at::kInt);
|
||||
REQUIRE_TENSOR_OPTIONS(at::kCPU, -1, at::kInt, at::kStrided);
|
||||
}
|
||||
|
||||
TEST(TensorTest, MagmaInitializesCorrectly_CUDA) {
|
||||
auto tensor = at::arange(1, 17, at::TensorOptions(at::kFloat).device(at::Device("cuda")));
|
||||
tensor = tensor.view({4, 4});
|
||||
if (at::hasMAGMA()) {
|
||||
at::inverse(tensor);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user