Skip to content

Conversation

prabhat00155
Copy link
Contributor

@prabhat00155 prabhat00155 commented Feb 24, 2022

#5310 introduced extra operations that may affect performance. Adding conditional checks to only use onnx functions when in tracing mode.

@facebook-github-bot
Copy link
Contributor

facebook-github-bot commented Feb 24, 2022

💊 CI failures summary and remediations

As of commit 7ca71f0 (more details on the Dr. CI page):


  • 1/1 failures introduced in this PR

1 failure not recognized by patterns:

Job Step Action
CircleCI cmake_macos_cpu curl -o conda.sh https://repo.anaconda.com/miniconda/Miniconda3-latest-MacOSX-x86_64.sh
sh conda.sh -b
source $HOME/miniconda3/bin/activate
conda install -yq conda-build cmake
packaging/build_cmake.sh
🔁 rerun

This comment was automatically generated by Dr. CI (expand for details).

Please report bugs/suggestions to the (internal) Dr. CI Users group.

Click here to manually regenerate this comment.

@zhiqwang
Copy link
Contributor

Hi @datumbox and @prabhat00155 , do you think that we should also add a unit-test for SSD and fcos when exporting to ONNX, as I know, the downstream TVM also use the JIT tracing mode.

@datumbox
Copy link
Contributor

@zhiqwang If you have the capacity to do this on a follow up PR that would be lovely. One issue we faced previously with onnx unit-tests is that they are very brittle and easy to break. I personally don't have much experience working with ONNX so if you can do it, I'll take it 😄

@zhiqwang
Copy link
Contributor

Hi @datumbox

If you have the capacity to do this on a follow up PR that would be lovely.

I can try to add it! Recently I also found that TensorRT 8.2+ has very good support for ONNX. It will become very easy for one stage models (SSD / RetineNet / Fcos) to be deployed on TensorRT through ONNX.

datumbox and others added 2 commits February 24, 2022 18:30
Co-authored-by: Shubham Bhokare <32080845+shubhambhokare1@users.noreply.github.com>
@datumbox datumbox merged commit e9fca7b into pytorch:main Feb 24, 2022
@prabhat00155 prabhat00155 deleted the prabhat00155/topk branch February 25, 2022 14:47
facebook-github-bot pushed a commit that referenced this pull request Feb 25, 2022
Summary:
* Use onnx function only in tracing mode

* Add missing import

* Address review comments

* Fix type annotation

* Ignore return type error

* Remove unused import

* Add fake cast

* Fix mypy error

* Fix mypy error

* Update torchvision/models/detection/_utils.py

* _fake_cast_onnx approach

Reviewed By: jdsgomes

Differential Revision: D34475312

fbshipit-source-id: 09b14cba0242d2e433051707c9081e25bc9cecbc

Co-authored-by: Shubham Bhokare <32080845+shubhambhokare1@users.noreply.github.com>
Co-authored-by: Vasilis Vryniotis <datumbox@users.noreply.github.com>
Co-authored-by: Shubham Bhokare <32080845+shubhambhokare1@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants