mirror of
https://github.com/saymrwulf/pytorch.git
synced 2026-05-14 20:57:59 +00:00
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/36615 Test Plan: Imported from OSS Differential Revision: D21027733 Pulled By: ZolotukhinM fbshipit-source-id: e19cd85c1634f4e40805814ac71eec719d6587f8
34 lines
787 B
C++
34 lines
787 B
C++
#include <test/cpp/tensorexpr/tests.h>
|
|
|
|
#include <gtest/gtest.h>
|
|
|
|
namespace torch {
|
|
namespace jit {
|
|
|
|
#define TENSOREXPR_GTEST(name) \
|
|
TEST(TensorExprTest, name) { \
|
|
test##name(); \
|
|
}
|
|
TH_FORALL_TENSOREXPR_TESTS(TENSOREXPR_GTEST)
|
|
#undef TENSOREXPR_GTEST
|
|
|
|
#ifdef TORCH_ENABLE_LLVM
|
|
#define TENSOREXPR_GTEST_LLVM(name) \
|
|
TEST(TensorExprTest, name##_LLVM) { \
|
|
test##name(); \
|
|
}
|
|
TH_FORALL_TENSOREXPR_TESTS_LLVM(TENSOREXPR_GTEST_LLVM)
|
|
#undef TENSOREXPR_GTEST_LLVM
|
|
#endif
|
|
|
|
#ifdef USE_CUDA
|
|
#define TENSOREXPR_GTEST_CUDA(name) \
|
|
TEST(TensorExprTest, name##_CUDA) { \
|
|
test##name(); \
|
|
}
|
|
TH_FORALL_TENSOREXPR_TESTS_CUDA(TENSOREXPR_GTEST_CUDA)
|
|
#undef TENSOREXPR_GTEST_CUDA
|
|
#endif
|
|
|
|
} // namespace jit
|
|
} // namespace torch
|