mirror of
https://github.com/saymrwulf/pytorch.git
synced 2026-05-15 21:00:47 +00:00
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
25 lines
517 B
C++
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
|