Linux-cpp-lisp:

recompile


Hi @Linux-cpp-lisp,
The reason this is happening is because if the argument to symbolic_trace is not an nn.Module, we treat it as a free function, regardless of whether it’s a class method or not. I’ll file an issue and see if we can figure out a way to distinguish this case v.s. the truly-free-function case: [FX] Cannot symbolically trace class method · Issue #54785 · pytorch/pytorch · GitHub 2