pytorch/test/cpp/jit/torch_python_test.cpp
Suraj Menon aa01a95c6d Revert D20630760: [pytorch][PR] Enable NNC tests vol. i. add test_tensorexpr.py tests [WIP]
Test Plan: revert-hammer

Differential Revision:
D20630760

Original commit changeset: 7d2f27aca6b1

fbshipit-source-id: 28ac92b3390651a4a67061d6ebf208515b9b9463
2020-03-25 20:34:46 -07:00

30 lines
715 B
C++

#include <test/cpp/jit/tests.h>
#include <c10/util/Exception.h>
namespace torch {
namespace jit {
#ifdef _MSC_VER
#define JIT_TEST_API
#else
#define JIT_TEST_API TORCH_API
#endif
#define JIT_TEST(name) test##name();
JIT_TEST_API void runJITCPPTests(bool runCuda) {
TH_FORALL_TESTS(JIT_TEST)
if (runCuda) {
TH_FORALL_TESTS_CUDA(JIT_TEST)
}
// This test is special since it requires prior setup in python.
// So it is not part of the general test list (which is shared between the gtest
// and python test runners), but is instead invoked manually by the
// torch_python_test.cpp
testEvalModeForLoadedModule();
testTorchSaveError();
}
#undef JIT_TEST
} // namespace jit
} // namespace torch