Commit 8fcf6b2
committed
Update module wrapper so that params are explicitly registered to the wrapper
Seeing issue with linear where the fqns for constants disappear.
Registering self.method_name as a submodule of wrapper means that the parameters are registered to the wrapper. cc @angelayi
```
File "/data/users/lfq/fbsource/buck-out/v2/gen/fbcode/1af94fa701700343/executorch/test/models/__export_delegated_program__/export_delegated_program#link-tree/torch/export/_trace.py", line 1980, in _export_for_training
export_artifact = export_func(
File "/data/users/lfq/fbsource/buck-out/v2/gen/fbcode/1af94fa701700343/executorch/test/models/__export_delegated_program__/export_delegated_program#link-tree/torch/export/_trace.py", line 1473, in _strict_export
_replace_param_buffer_names(param_buffer_table, export_graph_signature)
File "/data/users/lfq/fbsource/buck-out/v2/gen/fbcode/1af94fa701700343/executorch/test/models/__export_delegated_program__/export_delegated_program#link-tree/torch/export/_trace.py", line 272, in _replace_param_buffer_names
spec.target = param_buffer_table[spec.target]
KeyError: 'L__self___fn___self___linear.weight'
```
Differential Revision: [D73279618](https://our.internmc.facebook.com/intern/diff/D73279618/)
[ghstack-poisoned]1 parent 3060e8d commit 8fcf6b2
2 files changed
+18
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
87 | 87 | | |
88 | 88 | | |
89 | 89 | | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
90 | 102 | | |
91 | 103 | | |
92 | 104 | | |
| |||
114 | 126 | | |
115 | 127 | | |
116 | 128 | | |
117 | | - | |
| 129 | + | |
118 | 130 | | |
119 | 131 | | |
120 | 132 | | |
121 | 133 | | |
122 | 134 | | |
123 | 135 | | |
124 | 136 | | |
125 | | - | |
| 137 | + | |
126 | 138 | | |
127 | 139 | | |
| 140 | + | |
128 | 141 | | |
129 | 142 | | |
130 | | - | |
| 143 | + | |
131 | 144 | | |
132 | | - | |
133 | | - | |
134 | | - | |
| 145 | + | |
135 | 146 | | |
136 | 147 | | |
137 | 148 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
155 | 155 | | |
156 | 156 | | |
157 | 157 | | |
| 158 | + | |
158 | 159 | | |
159 | 160 | | |
160 | 161 | | |
| |||
0 commit comments