Differences between torch.compile(model) and torch.compile(model.train_step) #1066
gaopinghai
started this conversation in
General
Replies: 1 comment
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am trying the
torch.compile()
feature. I notice that the mmengine use this function as below:where
traget = "train_step"
. But this way I got the error below.However, no error or warning comes out if I use
self.model = torch.compile(self.model, **compile_cfg)
. But the running speed has no difference. What is wrong?The error I got with the original code is:
Beta Was this translation helpful? Give feedback.
All reactions