pytorch/test/cpp/jit/test_create_autodiff_subgraphs.cpp
Michael Suo e9aa6898ab Revert D23802296: gtest-ify JIT tests, through the letter c
Test Plan: revert-hammer

Differential Revision:
D23802296 (d2b045030e)

Original commit changeset: 20c9798a414e

fbshipit-source-id: a28d56039ca404fe94ed7572f1febd1673e3e788
2020-09-23 17:42:19 -07:00

25 lines
623 B
C++

#include "test/cpp/jit/test_base.h"
#include "test/cpp/jit/test_utils.h"
#include "torch/csrc/jit/passes/create_autodiff_subgraphs.h"
namespace torch {
namespace jit {
void testCreateAutodiffSubgraphs() {
auto graph = build_lstm();
CreateAutodiffSubgraphs(graph, /*threshold=*/2);
// all of the ops are within the DifferentiableGraph
testing::FileCheck()
.check_not("aten::mm")
->check_not("aten::sigmoid")
->check_not("aten::tanh")
->check_not("aten::mul")
->check("DifferentiableGraph")
->check_next("return")
->run(*graph);
}
} // namespace jit
} // namespace torch