Enable tensorexpr cpp tests in CI. try #2 (#35454)

Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/35454

Differential Revision: D20665160

Pulled By: Krovatkin

fbshipit-source-id: e04cbe92b2ee5a3288f3c4e5c83533bfea85bf85
This commit is contained in:
Nikolay Korovaiko
2020-03-27 12:03:42 -07:00
committed by Facebook GitHub Bot
parent 930d218fbf
commit 9e22d15f14
20 changed files with 779 additions and 531 deletions
+13
View File
@@ -1,5 +1,6 @@
#include <c10/util/Exception.h>
#include <test/cpp/jit/tests.h>
#include <test/cpp/tensorexpr/tests.h>
namespace torch {
namespace jit {
@@ -25,5 +26,17 @@ JIT_TEST_API void runJITCPPTests(bool runCuda) {
testTorchSaveError();
}
#undef JIT_TEST
#define JIT_TEST(name) test##name();
JIT_TEST_API void runTENSOREXPRCPPTests(bool runCuda) {
TH_FORALL_TENSOREXPR_TESTS(JIT_TEST)
if (runCuda) {
#ifdef USE_CUDA
TH_FORALL_TENSOREXPR_TESTS_CUDA(JIT_TEST)
#endif
}
}
#undef JIT_TEST
} // namespace jit
} // namespace torch