mirror of
https://github.com/pytorch/pytorch.git
synced 2025-11-07 01:50:04 +08:00
Fix Windows build and test in CI (#11716)
Summary: This PR adds Windows support for the C++ frontend. A lot of declarations were missing `TORCH_API` macros, and lots of code just did not compile on MSVC. ebetica ezyang orionr Pull Request resolved: https://github.com/pytorch/pytorch/pull/11716 Reviewed By: orionr Differential Revision: D13038253 Pulled By: goldsborough fbshipit-source-id: c8e5a45efd26117aeb99e768b56fcd5a89fcb9f8
This commit is contained in:
committed by
Facebook Github Bot
parent
f649d8b3a9
commit
8311bbee7f
@ -18,7 +18,7 @@ TEST(TensorTest, AllocatesTensorOnTheCorrectDevice_MultiCUDA) {
|
||||
ASSERT_EQ(tensor.device().index(), 1);
|
||||
}
|
||||
|
||||
TEST(TensorTest, ToDevice_CUDA) {
|
||||
TEST(TensorTest, ToDevice_MultiCUDA) {
|
||||
auto tensor = at::empty({3, 4});
|
||||
REQUIRE_TENSOR_OPTIONS(at::kCPU, -1, at::kFloat, at::kStrided);
|
||||
|
||||
@ -59,7 +59,7 @@ TEST(TensorTest, ToDevice_CUDA) {
|
||||
REQUIRE_TENSOR_OPTIONS(at::kCUDA, 0, at::kInt, at::kStrided);
|
||||
}
|
||||
|
||||
TEST(TensorTest, ToTensorAndTensorAttributes_CUDA) {
|
||||
TEST(TensorTest, ToTensorAndTensorAttributes_MultiCUDA) {
|
||||
auto tensor = at::empty({3, 4});
|
||||
REQUIRE_TENSOR_OPTIONS(at::kCPU, -1, at::kFloat, at::kStrided);
|
||||
|
||||
@ -97,7 +97,7 @@ TEST(TensorTest, ToDoesNotCopyWhenOptionsAreAllTheSame_CUDA) {
|
||||
ASSERT_EQ(hopefully_not_copy.data<float>(), tensor.data<float>());
|
||||
}
|
||||
|
||||
TEST(TensorTest, ToDeviceAndDtype_CUDA) {
|
||||
TEST(TensorTest, ToDeviceAndDtype_MultiCUDA) {
|
||||
auto tensor = at::empty({3, 4});
|
||||
REQUIRE_TENSOR_OPTIONS(at::kCPU, -1, at::kFloat, at::kStrided);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user