Enable JIT tests on Windows (#27029)

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

Reviewed By: eellison

Differential Revision: D20458664

Pulled By: jamesr66a

fbshipit-source-id: 22be918543703869f471e89b3478423198351bf3
This commit is contained in:
peter
2020-03-16 11:18:16 -07:00
committed by Facebook GitHub Bot
parent 1af6002321
commit 24c9e61e79
6 changed files with 20 additions and 13 deletions
+6 -6
View File
@@ -4,13 +4,14 @@
namespace torch {
namespace jit {
#if defined(_WIN32)
void runJITCPPTests(bool runCuda) {
TORCH_INTERNAL_ASSERT(false, "JIT tests not yet supported on Windows");
}
#ifdef _MSC_VER
#define JIT_TEST_API
#else
#define JIT_TEST_API TORCH_API
#endif
#define JIT_TEST(name) test##name();
TORCH_API void runJITCPPTests(bool runCuda) {
JIT_TEST_API void runJITCPPTests(bool runCuda) {
TH_FORALL_TESTS(JIT_TEST)
if (runCuda) {
TH_FORALL_TESTS_CUDA(JIT_TEST)
@@ -24,6 +25,5 @@ TORCH_API void runJITCPPTests(bool runCuda) {
testTorchSaveError();
}
#undef JIT_TEST
#endif
} // namespace jit
} // namespace torch