neural_compressor.adaptor.pytorch
Module Contents
Classes
Tample adaptor of PyTorch framework. |
|
Adaptor of PyTorch framework, all PyTorch API is in this class. |
|
Adaptor of PyTorch framework with Intel PyTorch Extension, |
|
Adaptor of PyTorch framework with FX graph mode, all PyTorch API is in this class. |
|
Adaptor of PyTorch framework, all PyTorch API is in this class. |
Functions
|
This is a helper function for graph_info, |
- neural_compressor.adaptor.pytorch.get_ops_recursively(model, prefix, ops={})[source]
- This is a helper function for graph_info,
and it will get all ops from model.
- Parameters:
model (object) – input model
prefix (string) – prefix of op name
ops (dict) – dict of ops from model {op name: type}.
- Returns:
None
- class neural_compressor.adaptor.pytorch.TemplateAdaptor(framework_specific_info)[source]
Tample adaptor of PyTorch framework.
- Parameters:
framework_specific_info (dict) – dictionary of tuning configure from yaml file.
- class neural_compressor.adaptor.pytorch.PyTorchAdaptor(framework_specific_info)[source]
Adaptor of PyTorch framework, all PyTorch API is in this class.
- Parameters:
framework_specific_info (dict) – dictionary of tuning configure from yaml file.
- class neural_compressor.adaptor.pytorch.PyTorch_IPEXAdaptor(framework_specific_info)[source]
- Adaptor of PyTorch framework with Intel PyTorch Extension,
all PyTorch IPEX API is in this class.
- Parameters:
framework_specific_info (dict) – dictionary of tuning configure from yaml file.