"docs/vscode:/vscode.git/clone" did not exist on "29855c2716a99fbb79e0b73dca9c18b650bd8107"
Commit 0e0a67f4 authored by Salil Desai's avatar Salil Desai Committed by Facebook GitHub Bot
Browse files

Clean Up MobileOptimizerType Rewrite Flags Public API and Documentation

Summary:
X-link: https://github.com/pytorch/pytorch/pull/92081

Pull Request resolved: https://github.com/facebookresearch/d2go/pull/459

Reland of D41690203 (https://github.com/facebookresearch/d2go/commit/18de6ffb19037e8ea11057515cc3d6d966a6e799)

Remove MobileOptimizerType and all rewrite flags from torch.X and torch._C.X to clean up torch.X and torch._C.X namespaces

The affected rewrite flags are
- CONV_BN_FUSION
- FUSE_ADD_RELU
- HOIST_CONV_PACKED_PARAMS
- INSERT_FOLD_PREPACK_OPS
- REMOVE_DROPOUT
- VULKAN_AUTOMATIC_GPU_TRANSFER

Bc-Breaking Change:

Before this change, the rewrite flags were accessible through all of
1. torch.utils.mobile_optimizer.MobileOptimizerType.X
2. torch._C.MobileOptimizerType.X
3. torch.X
4. torch.MobileOptimizerType.X
5. torch._C.X

But after this change, only torch.utils.mobile_optimizer.MobileOptimizerType.X  (option 1 above) and the newly added torch._C._MobileOptimizerType.X remain

Corresponding updates to PyTorch Tutorial Docs are in https://github.com/pytorch/tutorials/pull/2163

Reviewed By: SS-JIA

Differential Revision: D42442395

fbshipit-source-id: 14500b3667f541fd1ec85b1624125120176c6fd0
parent abf0ca0c
...@@ -17,9 +17,8 @@ from detectron2.utils.file_io import PathManager ...@@ -17,9 +17,8 @@ from detectron2.utils.file_io import PathManager
from mobile_cv.common.misc.file_utils import make_temp_directory from mobile_cv.common.misc.file_utils import make_temp_directory
from mobile_cv.common.misc.iter_utils import recursive_iterate from mobile_cv.common.misc.iter_utils import recursive_iterate
from torch import nn from torch import nn
from torch._C import MobileOptimizerType
from torch.utils.bundled_inputs import augment_model_with_bundled_inputs from torch.utils.bundled_inputs import augment_model_with_bundled_inputs
from torch.utils.mobile_optimizer import optimize_for_mobile from torch.utils.mobile_optimizer import MobileOptimizerType, optimize_for_mobile
logger = logging.getLogger(__name__) logger = logging.getLogger(__name__)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment