| [master][Modify]Add _gather patch support for InternVL3
Co-authored-by: iquoyuw<wuyouqi1@h-partners.com>
# message auto-generated for no-merge-commit merge:
!1697 merge internvl3-7b into master
[master][Modify]Add _gather patch support for InternVL3
Created-by: weixin_47897441
Commit-by: iquoyuw
Merged-by: ascend-robot
Description: ## Motivation
Add _gather patch support for InternVL3 model.
## Modification
This modification extends the device type check to include the "Ascend" device type in addition to "cuda" and "npu".
## Self-test (Optional)
This patch enables accurate training of Internvl3 on the MS framework by aligning its 100-iteration, 16-bit loss/gradient with the PT framework, and no new accuracy issues are caused.

## BC-breaking (Optional)
If there are compatibility issues, such as dependencies on cann/torch_npu versions, they need to be explained in the PR.
## Checklist
**Before PR**:
- [ ] The new code needs to comply with the Clean Code specification.
- [ ] The PR content is self-checked, and the expression can be clear and the writing standardized
**After PR**:
- [ ] CLA has been signed and all committers have signed the CLA in this PR.
- [ ] The ci-pipeline is passed, Code Check is passed.
See merge request: Ascend/MindSpeed-MM!1697 | 6 个月前 |