mindspore.parallel.build_searched_strategy
- mindspore.parallel.build_searched_strategy(strategy_filename)[source]
Extract the sharding strategy for each parameter in the network from the strategy file for distributed inference scenarios.
- Parameters
strategy_filename (str) – Name of strategy file.
- Returns
Dict, whose key is parameter name and value is slice strategy of this parameter.
- Raises
ValueError – Strategy file is incorrect.
TypeError – strategy_filename is not a string.
- Supported Platforms:
Ascend
Examples
>>> from mindspore.parallel import build_searched_strategy >>> strategy = build_searched_strategy("./strategy_train.ckpt")