Hi Alex. Thanks for the reply. jit.ignore seems to disable the function being decorated. Is there any alternatives if I want to keep the decorated function as part of the inference part?
In my case, there are two codebases (1. python & cython 2. c++ & torchscript).
On the one hand, the forward pass of the model contains two steps. First decoding the input to features, and then conduct search algorithms (e.g., MCTS) to give the output. And to accelerate the search process, it is written in cython. The code logics here might be quite complex and may not be encapsulated in an operator.
On the other hand, a codebase loaded the above model and carry out the inference process as follows.
torch::jit::script::Module model_;
model_=model_(torch::jit::load(path, torch::Device(device)))
std::vector<torch::jit::IValue> jitInput;
//... push input to the vector
auto jitOutput = model_.forward(jitInput);;