You could sidestep the error message by using weight = self.weight.detach() to get a local tensor (sharing the same storage), and then use weight in place of self.weight.
I don’t have advice whether the inplace modification plays well with DataParallel.
Best regards
Thomas