blob: 485ee5c29b6bd5a26ce78a3b55fecd160faf7761 [file] [log] [blame]
#include <gtest/gtest.h>
#include <ATen/ATen.h>
#include <cmath>
TEST(Tensor, AllocatesTensorOnTheCorrectDevice_MultiCUDA) {
auto tensor = at::tensor({1, 2, 3}, at::device({at::kCUDA, 1}));
ASSERT_EQ(tensor.device().type(), at::Device::Type::CUDA);
ASSERT_EQ(tensor.device().index(), 1);
}