pytorch/test/cpp/tensorexpr/gtest.cpp
Mikhail Zolotukhin 35e7efeb9a [TensorExpr] Add CUDA codegen. (#34227)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/34227

This PR adds a CUDA support to tensor expressions.

Differential Revision: D20251836

Test Plan: Imported from OSS

Pulled By: ZolotukhinM

fbshipit-source-id: ab36a55834cceff30c8371fef6cca1054a32f017
2020-03-16 11:49:29 -07:00

25 lines
517 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_TESTS(TENSOREXPR_GTEST)
#undef TENSOREXPR_GTEST
#ifdef USE_CUDA
#define TENSOREXPR_GTEST_CUDA(name) \
TEST(TensorExprTest, name##_CUDA) { \
test##name(); \
}
TH_FORALL_TESTS_CUDA(TENSOREXPR_GTEST_CUDA)
#undef TENSOREXPR_GTEST_CUDA
#endif
} // namespace jit
} // namespace torch