You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# You can use the mutable module just like the original pytorch module. The compilation happens while you first call the mutable module.
40
40
mutable_module(*inputs)
@@ -45,7 +45,7 @@
45
45
46
46
# %%
47
47
# Making changes to mutable module can trigger refit or re-compilation. For example, loading a different state_dict and setting new weight values will trigger refit, and adding a module to the model will trigger re-compilation.
# comparison = {k: (np.allclose(correct[k][0], mapping[k][0].cpu().numpy(), 1e-2, 1e-2), correct[k][0], mapping[k][0]) for k in mapping if k in correct}
167
+
170
168
forlayer_nameinweight_list:
171
169
iflayer_namenotinmapping:
172
170
logger.warning(f"{layer_name} is not found in weight mapping.")
@@ -235,7 +233,7 @@ def refit_module_weights(
235
233
compiled_module=copy.deepcopy(compiled_module)
236
234
elifinline_module:
237
235
raiseAssertionError(
238
-
"Exported program does not support modifying in place. Please set inplace to false and use the returned graph module."
236
+
"Exported program does not support modifying in place. Please set in_place to false and use the returned graph module."
239
237
)
240
238
241
239
# Get the settings and check the setting to be uniform
0 commit comments