pytorch/test/cpp/tensorexpr/gtest.cpp
Mikhail Zolotukhin 317f598103 [TensorExpr] Clang-format test/cpp/tensorexpr/*. (#36615)
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
2020-04-14 19:08:18 -07:00

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