xuuyangg f67ef9c128
[Fix] Fix mix training on Ascend NPU (#3215)
## Motivation

Address an issue where mix training is not enabled when optimizer_config
is present in the config on Ascend NPU

## Modification

Previously, mix training was not enabled when optimizer_config was
present in the configuration on Ascend NPU. This commit addresses the
issue by ensuring that mix training is enabled under these
circumstances.

## Use cases 

It has been validated on the
knet_s3_upernet_swin-l_8x2_640x640_adamw_80k_ade20k.py config.

## Checklist

1. Pre-commit or other linting tools are used to fix the potential lint
issues.
2. The modification is covered by complete unit tests. If not, please
add more unit test to ensure the correctness.
3. If the modification has potential influence on downstream projects,
this PR should be tested with downstream projects, like MMDet or
MMDet3D.
4. The documentation has been modified accordingly, like docstring or
example tutorials.
2023-07-22 14:07:31 +08:00
..