Skip to content

[Docs]: Add ops definition #1434

Merged
ZwwWayne merged 10 commits intoopen-mmlab:dev-v1.3.17from
RunningLeon:mmcv_ops_doc
Nov 10, 2021
Merged

[Docs]: Add ops definition #1434
ZwwWayne merged 10 commits intoopen-mmlab:dev-v1.3.17from
RunningLeon:mmcv_ops_doc

Conversation

@RunningLeon
Copy link
Copy Markdown
Collaborator

@RunningLeon RunningLeon commented Oct 26, 2021

Motivation

This PR adds a document about custom operators' definition in mmcv for pytorch2onnx. It is intended to make the ops definition standard and popular in the community. Current following ops are included in this document:

  • MMCVBorderAlign
  • MMCVCARAFE
  • MMCVCAWeight
  • MMCVCAMap
  • MMCVCornerPool
  • MMCVDeformConv2d
  • MMCVModulatedDeformConv2d
  • MMCVDeformRoIPool
  • MMCVMaskedConv2d
  • MMCVPSAMask
  • NonMaxSuppression
  • MMCVRoIAlign
  • MMCVRoIAlignRotated

torch ops

There are some ops from PyTorch that are not supported when exporting to ONNX. They are included in here as well.

  • cummax
  • cummin

Modification

None

BC-breaking (Optional)

No

@RunningLeon RunningLeon requested a review from zhouzaida October 26, 2021 06:27
@zhouzaida
Copy link
Copy Markdown
Collaborator

please add the doc to the index.rst (https://github.com/open-mmlab/mmcv/blob/master/docs/index.rst)

@zhouzaida
Copy link
Copy Markdown
Collaborator

We also should translate the docs to Chinese if you have time to do it.

@RunningLeon
Copy link
Copy Markdown
Collaborator Author

We also should translate the docs to Chinese if you have time to do it.

May add the Chinese version later if we have time.

@zhouzaida
Copy link
Copy Markdown
Collaborator

We also should translate the docs to Chinese if you have time to do it.

May add the Chinese version later if we have time.

got it

@zhouzaida zhouzaida requested a review from grimoire October 26, 2021 09:09
@RunningLeon
Copy link
Copy Markdown
Collaborator Author

@zhouzaida Don't know why lint failed.
Works good on my machine.

(pt1.8) PJLAB\maningsheng@shai14000064l:~/projects/openmmlab/mmcv-pt1.8$ pre-commit run --all-files
flake8...................................................................Passed
seed isort known_third_party.............................................Passed
isort....................................................................Passed
yapf.....................................................................Passed
Trim Trailing Whitespace.................................................Passed
Check Yaml...............................................................Passed
Fix End of Files.........................................................Passed
Fix requirements.txt.....................................................Passed
Fix double quoted strings................................................Passed
Check for merge conflicts................................................Passed
Fix python encoding pragma...............................................Passed
Mixed line ending........................................................Passed
Check markdown files.....................................................Passed
codespell................................................................Passed
docformatter.............................................................Passed

@RunningLeon
Copy link
Copy Markdown
Collaborator Author

@zhouzaida Could you take a look at this PR?
Maybe we should consider:

  1. Which ops should be included.
  2. Whether names of op and argument are good enough.
  3. Any other good suggestions?

@zhouzaida
Copy link
Copy Markdown
Collaborator

zhouzaida commented Oct 29, 2021

@zhouzaida Could you take a look at this PR? Maybe we should consider:

  1. Which ops should be included.
  2. Whether names of op and argument are good enough.
  3. Any other good suggestions?

Please improve the PR message.

@RunningLeon
Copy link
Copy Markdown
Collaborator Author

@zhouzaida Any comments on this PR?

@zhouzaida
Copy link
Copy Markdown
Collaborator

The definitions of some ops are repeated with other files like https://github.com/open-mmlab/mmcv/blob/master/docs/deployment/tensorrt_custom_ops.md. Is it necessary to delete other repeated files?

@RunningLeon
Copy link
Copy Markdown
Collaborator Author

The definitions of some ops are repeated with other files like https://github.com/open-mmlab/mmcv/blob/master/docs/deployment/tensorrt_custom_ops.md. Is it necessary to delete other repeated files?

May keep them as references and remove them later when everything becomes clear and stable.

@zhouzaida zhouzaida changed the base branch from master to dev-v1.3.17 November 2, 2021 10:20
@zhouzaida zhouzaida mentioned this pull request Nov 7, 2021
13 tasks
@ZwwWayne ZwwWayne merged commit 2c8a04e into open-mmlab:dev-v1.3.17 Nov 10, 2021
ZwwWayne added a commit that referenced this pull request Nov 10, 2021
* [Improve] improve checkpoint loading log (#1446)

* add first version

* remove syncbn

* remove unused ops

* update input names

* remove empty line

* update index.rst

* resolve comments

* fix type

* Update mmcv_ops_definition.md

Co-authored-by: WangJiaZhen <47851024+teamwong111@users.noreply.github.com>
Co-authored-by: maningsheng <mnsheng@yeah.net>
Co-authored-by: Zaida Zhou <58739961+zhouzaida@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants