mindspore.parallel.set_op_strategy_config
- mindspore.parallel.set_op_strategy_config(mode='SAVE', path='')[source]
Set strategy json configuration when using sharding propagation.
Warning
This is an experimental interface, may be changed or canceled in the future; This interface currently doesn't support saving or loading strategies using layout.
Note
It only works when parallel_mode=ParallelMode.AUTO_PARALLEL and search_mode='sharding_propagation'.
It only supports saving and reloading with the same configuration for the same network. If the network or training hyperparameters are modified after using the SAVE mode to save the strategies of operator to the setting json file, which may lead to the failure of using the LOAD mode to load operator strategies from json.
When performing distributed training, users can first save the strategy using dryrun on a single device and then load strategy to perform distributed training.
- Parameters
- Raises