mirror of
https://github.com/zebrajr/pytorch.git
synced 2025-12-06 12:20:52 +01:00
[export] Update PT2 archive docs (#162308)
Summary: Minor updates based on the recent refactoring for weight saving and loading Test Plan: doc change only Rollback Plan: Differential Revision: D81821994 Pull Request resolved: https://github.com/pytorch/pytorch/pull/162308 Approved by: https://github.com/angelayi
This commit is contained in:
parent
583bbf7761
commit
a965f09793
|
|
@ -22,18 +22,22 @@ The following is a sample archive. We will walk through the archive folder by fo
|
||||||
├── data
|
├── data
|
||||||
│ ├── aotinductor
|
│ ├── aotinductor
|
||||||
│ │ └── model1
|
│ │ └── model1
|
||||||
│ │ ├── aotinductor_pickle_data.json
|
│ │ ├── cf5ez6ifexr7i2hezzz4s7xfusj4wtisvu2gddeamh37bw6bghjw.kernel_metadata.json
|
||||||
│ │ ├── cf5ez6ifexr7i2hezzz4s7xfusj4wtisvu2gddeamh37bw6bghjw.cpp
|
│ │ ├── cf5ez6ifexr7i2hezzz4s7xfusj4wtisvu2gddeamh37bw6bghjw.kernel.cpp
|
||||||
│ │ ├── cf5ez6ifexr7i2hezzz4s7xfusj4wtisvu2gddeamh37bw6bghjw.so
|
│ │ ├── cf5ez6ifexr7i2hezzz4s7xfusj4wtisvu2gddeamh37bw6bghjw.wrapper_metadata.json
|
||||||
|
│ │ ├── cf5ez6ifexr7i2hezzz4s7xfusj4wtisvu2gddeamh37bw6bghjw.wrapper.cpp
|
||||||
|
│ │ ├── cf5ez6ifexr7i2hezzz4s7xfusj4wtisvu2gddeamh37bw6bghjw.wrapper.so
|
||||||
│ │ ├── cg7domx3woam3nnliwud7yvtcencqctxkvvcafuriladwxw4nfiv.cubin
|
│ │ ├── cg7domx3woam3nnliwud7yvtcencqctxkvvcafuriladwxw4nfiv.cubin
|
||||||
│ │ └── cubaaxppb6xmuqdm4bej55h2pftbce3bjyyvljxbtdfuolmv45ex.cubin
|
│ │ └── cubaaxppb6xmuqdm4bej55h2pftbce3bjyyvljxbtdfuolmv45ex.cubin
|
||||||
│ ├── weights
|
│ ├── weights
|
||||||
│ │ ├── model1_model_param_config.json
|
│ │ ├── model1_weights_config.json
|
||||||
|
│ │ ├── model2_weights_config.json
|
||||||
│ │ ├── weight_0
|
│ │ ├── weight_0
|
||||||
│ │ ├── weight_1
|
│ │ ├── weight_1
|
||||||
│ │ ├── weight_2
|
│ │ ├── weight_2
|
||||||
│ └── constants
|
│ └── constants
|
||||||
│ │ ├── model1_model_constants_config.json
|
│ │ ├── model1_constants_config.json
|
||||||
|
│ │ ├── model2_constants_config.json
|
||||||
│ │ ├── tensor_0
|
│ │ ├── tensor_0
|
||||||
│ │ ├── tensor_1
|
│ │ ├── tensor_1
|
||||||
│ │ ├── custom_obj_0
|
│ │ ├── custom_obj_0
|
||||||
|
|
@ -67,11 +71,12 @@ example, compilation artifacts for the `model1` model on A100 and H100 will be
|
||||||
saved in `model1-a100` and `model1-h100` folders separately.
|
saved in `model1-a100` and `model1-h100` folders separately.
|
||||||
|
|
||||||
The folder typically contains
|
The folder typically contains
|
||||||
* `<uuid>.so`: Dynamic library compiled from <uuid>.cpp.
|
* `<uuid>.wrapper.so`: Dynamic library compiled from <uuid>.cpp.
|
||||||
* `<uuid>.cpp`: AOTInductor generated cpp wrapper file.
|
* `<uuid>.wrapper.cpp`: AOTInductor generated cpp wrapper file.
|
||||||
|
* `<uuid>.kernel.cpp`: AOTInductor generated cpp kernel file.
|
||||||
* `*.cubin`: Triton kernels compiled from triton codegen kernels
|
* `*.cubin`: Triton kernels compiled from triton codegen kernels
|
||||||
|
* `<uuid>.wrapper_metadata.json`: Metadata which was passed in from the `aot_inductor.metadata` inductor config
|
||||||
* (optional) `<uuid>.json`: External fallback nodes for custom ops to be executed by `ProxyExecutor`, serialized according to `ExternKernelNode` struct. If the model doesn’t use custom ops/ProxyExecutor, this file would be omitted.
|
* (optional) `<uuid>.json`: External fallback nodes for custom ops to be executed by `ProxyExecutor`, serialized according to `ExternKernelNode` struct. If the model doesn’t use custom ops/ProxyExecutor, this file would be omitted.
|
||||||
* `<uuid>_metadata.json`: Metadata which was passed in from the `aot_inductor.metadata` inductor config
|
|
||||||
|
|
||||||
### Weights
|
### Weights
|
||||||
|
|
||||||
|
|
@ -79,16 +84,16 @@ Path: `/data/weights/*`
|
||||||
|
|
||||||
Model parameters and buffers are saved in the `/data/weights/` folder. Each
|
Model parameters and buffers are saved in the `/data/weights/` folder. Each
|
||||||
tensor is saved as a separated file. The file only contains the raw data blob,
|
tensor is saved as a separated file. The file only contains the raw data blob,
|
||||||
tensor metadata are saved separately in the
|
tensor metadata and mapping from model weight FQN to saved raw data blob are saved separately in the
|
||||||
`<model_name>_model_param_config.json`.
|
`<model_name>_weights_config.json`.
|
||||||
|
|
||||||
### Constants
|
### Constants
|
||||||
|
|
||||||
Path: `/data/constants/*`
|
Path: `/data/constants/*`
|
||||||
|
|
||||||
TensorConstants, non-persistent buffers and TorchBind objects are saved in the
|
TensorConstants, non-persistent buffers and TorchBind objects are saved in the
|
||||||
`/data/constants/` folder. Metadata is saved separately in the
|
`/data/constants/` folder. Metadata and mapping from model constant FQN to saved raw data blob are saved separately in the
|
||||||
`<model_name>_model_constants_config.json`
|
`<model_name>_constants_config.json`
|
||||||
|
|
||||||
### Sample Inputs
|
### Sample Inputs
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user