mindformers.core.init_context
- mindformers.core.init_context(use_parallel=False, context_config=None, parallel_config=None)[source]
Initialize the context.
- Parameters
- Returns
Int, the local_rank number.
Int, the total available devices number.
Examples
>>> from mindformers import init_context >>> init_context(use_parallel=False)