-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
update lately npu modification #2387
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Feature] Support engine with NPU backend.
fix autocast bugs on npu (#2273)
add npu extension and focal loss adapter
* add npu test case
Co-authored-by: Zaida Zhou <[email protected]>
Npu-dev: FocalLoss Adapter BugFix
Add masked_ Conv2d operator in NPU
Masked_conv2d NPU
zhouzaida
reviewed
Nov 8, 2022
remove npu-install-info in README.md
annotate the clang-format in pre-commit-config-zh-ch.yaml
zhouzaida
reviewed
Nov 14, 2022
zhouzaida
reviewed
Nov 14, 2022
zhouzaida
reviewed
Nov 14, 2022
zhouzaida
reviewed
Nov 14, 2022
mmcv/ops/modulated_deform_conv.py
Outdated
weight, | ||
offset_all, | ||
conv2d_bias, | ||
kernel_size=[k2, k1], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is the order of these two parameters, (h, w) or (w, h)?
zhouzaida
reviewed
Nov 14, 2022
Clean code: fix the clean code problem in masked_conv2d and modulated…
zhouzaida
approved these changes
Nov 14, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Motivation
This PR contains some npu-adapters of mmcv ops, which contain nms, focal_loss, masked_conv and modulated_deform_conv. we can run these ops(above) on ascend-npu device by these adapters.
Modification
nms_npu.cpp is added to the PR which is used for nms npu-adaptation, while focal_loss_npu.cpp, masked_conv,py, modulated_deform_conv.py and test_masked_conv.py are modified by the PR. we have fixed some kernel bugs and modify the focal_loss adapter to improve the op performance. masked_conv and modulated_deform_conv can be conveniently adapted by some torch_npu.ops, as a result , we can make them available for npu by just modifying the py scripts. Finally, we modify the ut test for masked_conv2d which can make it running on npu-device.
Q & A
welcome to contact us for more information if you have any questions about the PR.