File tree 1 file changed +2
-9
lines changed
1 file changed +2
-9
lines changed Original file line number Diff line number Diff line change 177
177
TorchVersionVariable ,
178
178
TypingVariable ,
179
179
)
180
- from .nn_module import (
181
- FSDPManagedNNModuleVariable ,
182
- UnspecializedBuiltinNNModuleVariable ,
183
- UnspecializedNNModuleVariable ,
184
- )
180
+ from .nn_module import FSDPManagedNNModuleVariable , UnspecializedNNModuleVariable
185
181
from .optimizer import OptimizerVariable
186
182
from .script_object import TorchScriptObjectVariable
187
183
@@ -1278,10 +1274,7 @@ def wrap_module(self, value: torch.nn.Module):
1278
1274
# this will get cleaned up once compile ends
1279
1275
self .tx .output .nn_modules [self .name ] = value
1280
1276
1281
- if value .__module__ .startswith (("torch.nn." , "torch.ao." )):
1282
- result = UnspecializedBuiltinNNModuleVariable (value , source = self .source )
1283
- else :
1284
- result = UnspecializedNNModuleVariable (value , source = self .source )
1277
+ result = UnspecializedNNModuleVariable (value , source = self .source )
1285
1278
if not SideEffects .cls_supports_mutation_side_effects (type (value )):
1286
1279
# don't allow STORE_ATTR mutation with custom __setattr__
1287
1280
return result
You can’t perform that action at this time.
0 commit comments