mirror of
https://github.com/pytorch/pytorch.git
synced 2026-11-20 09:04:25 +08:00
Enable NNC tests vol. i. add test_tensorexpr.py tests [WIP] (#34897)
Summary: This PR add tensorexpr cpp tests to test_jit.py Pull Request resolved: https://github.com/pytorch/pytorch/pull/34897 Differential Revision: D20630760 Pulled By: Krovatkin fbshipit-source-id: 7d2f27aca6b1e23e3ffed1c765d8f590688118e3
This commit is contained in:
committed by
Facebook GitHub Bot
parent
ccc0e35275
commit
f3a5081bd4
@@ -1,5 +1,6 @@
|
||||
#include <test/cpp/jit/tests.h>
|
||||
#include <c10/util/Exception.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
|
||||
|
||||
Reference in New Issue
Block a user