Commit d41bba8
committed
Update on "Fix type sharing on loaded ScriptModules"
After save/load, we lose concrete type information. So if you tried to
script something that contained a loaded ScriptModule as a submodule,
the following sequence happened:
1. During ConcreteType inference, the loaded submodule got a new
inferred type.
2. But it already has a type! So there was a type mismatch.
To fix this, we should generate a ConcreteType directly from the loaded
submodule type (similar to what we do for interfaces). This makes sense
too--the ConcreteModuleType should be empty, since all the "sugaredness"
was stripped out during the save/load process.File tree
255 files changed
+6013
-3234
lines changed- .circleci
- cimodel/data
- scripts
- verbatim-sources
- .github/workflows
- .jenkins/pytorch
- win-test-helpers
- android
- libs
- pytorch_android
- host
- src/main/cpp
- aten/src
- ATen
- core
- dispatch
- native
- cuda
- mkldnn
- quantized/cpu
- sparse
- templates
- test
- THC/generic
- TH
- benchmarks/operator_benchmark
- pt
- binaries
- c10/core
- caffe2
- contrib/pytorch
- core
- operators
- perfkernels
- proto
- python
- quantization/server
- utils/threadpool
- cmake
- public
- docs
- cpp/source
- source
- notes
- scripts
- test
- backward_compatibility
- cpp_api_parity
- cpp
- api
- dist_autograd
- jit
- jit
- mobile/op_deps
- onnx
- third_party
- tools
- autograd/templates
- setup_helpers
- torch
- csrc
- api
- include/torch
- nn
- functional
- modules
- container
- options
- optim
- serialize
- src
- nn
- modules
- options
- serialize
- autograd
- functions
- cuda
- distributed
- autograd
- context
- engine
- functions
- c10d
- rpc
- jit
- mobile
- passes
- script
- utils
- distributed
- autograd
- rpc
- jit
- nn
- intrinsic
- modules
- quantized
- modules
- modules
- quantized/modules
- onnx
- quantization
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
255 files changed
+6013
-3234
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
340 | 340 | | |
341 | 341 | | |
342 | 342 | | |
343 | | - | |
| 343 | + | |
344 | 344 | | |
345 | 345 | | |
346 | | - | |
347 | | - | |
348 | | - | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
349 | 349 | | |
350 | 350 | | |
351 | 351 | | |
| |||
411 | 411 | | |
412 | 412 | | |
413 | 413 | | |
414 | | - | |
| 414 | + | |
415 | 415 | | |
416 | 416 | | |
417 | 417 | | |
| |||
426 | 426 | | |
427 | 427 | | |
428 | 428 | | |
429 | | - | |
| 429 | + | |
430 | 430 | | |
431 | 431 | | |
432 | 432 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
27 | | - | |
| 27 | + | |
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
36 | | - | |
| 36 | + | |
37 | 37 | | |
38 | 38 | | |
39 | | - | |
| 39 | + | |
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
| |||
0 commit comments