Skip to content
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

[Relay][TOPI] Gluncv SSD support on the GPU #2784

Merged
merged 89 commits into from
Apr 29, 2019
Merged

Conversation

Laurawly
Copy link
Contributor

@Laurawly Laurawly commented Mar 12, 2019

Following PR #2353, applying apis accordingly, support glunocv ssd models on the GPU.
Also exposed coord_start, score_index variables to frontend for supporting more object detection networks. Added argsort as an operator, support both CPU and GPU. Adaptive pooling op exposed.

@Laurawly Laurawly requested review from tqchen and kevinthesun March 12, 2019 01:11
topi/python/topi/cuda/nms.py Show resolved Hide resolved
topi/python/topi/cuda/nms.py Show resolved Hide resolved
topi/python/topi/cuda/nms.py Show resolved Hide resolved
@kevinthesun
Copy link
Contributor

Overall lgtm. One more thing is what is the situation of gpu related grammar sugars supporting in hybrid script? @were If possible we can migrate vision op to hybrid script implementation as well.

@Laurawly
Copy link
Contributor Author

Overall lgtm. One more thing is what is the situation of gpu related grammar sugars supporting in hybrid script? @were If possible we can migrate vision op to hybrid script implementation as well.

Currently, I'm still experimenting with the hybrid script. There could still be some problems. But I'll communicate with @were during the process.

@Laurawly Laurawly force-pushed the dev branch 6 times, most recently from 83d1ab2 to b66ff61 Compare March 15, 2019 21:52
@Laurawly Laurawly requested a review from kevinthesun March 15, 2019 21:54
@Laurawly Laurawly force-pushed the dev branch 4 times, most recently from d6830a2 to 02855fa Compare March 18, 2019 05:43
@Laurawly Laurawly requested a review from Huyuwei as a code owner March 19, 2019 20:42
@Laurawly Laurawly force-pushed the dev branch 4 times, most recently from a4789e8 to a7b5d9e Compare March 22, 2019 20:25
@Laurawly Laurawly closed this Mar 22, 2019
@Laurawly Laurawly deleted the dev branch March 22, 2019 20:28
@Laurawly Laurawly restored the dev branch March 22, 2019 20:31
@kevinthesun
Copy link
Contributor

LGTM. @Laurawly Can you open an issue to track the progress to migrate from ir_builder to hybrid script?

Copy link
Member

@icemelon icemelon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some high level comment:

  • argsort doesn't consider output dtype as int
  • we shouldn't place sort-related op under vision category

topi/python/topi/cuda/sort.py Show resolved Hide resolved
tests/python/relay/test_op_level5.py Outdated Show resolved Hide resolved
src/relay/op/vision/sort_op.cc Outdated Show resolved Hide resolved
topi/python/topi/vision/sort.py Outdated Show resolved Hide resolved
topi/python/topi/vision/sort.py Outdated Show resolved Hide resolved
src/contrib/sort/sort.cc Show resolved Hide resolved
Copy link
Member

@icemelon icemelon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you also update the doc?

@@ -188,3 +188,20 @@ def schedule_proposal(outs):
The computation schedule for the op.
"""
return _default_schedule(outs, False)

@tvm.target.generic_func
def schedule_argsort(outs):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

move this function to topi/generic/sort.py

@Laurawly Laurawly requested a review from icemelon April 27, 2019 05:28
@@ -164,6 +164,15 @@ This level enables additional math and transform operators.
tvm.relay.vision.yolo_reorg


**Level 6: Algorithm Operators**
-------------------
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove this line

@tqchen
Copy link
Member

tqchen commented Apr 27, 2019

@Laurawly please act on @icemelon9 's remaining comment

@tqchen tqchen added status: need update need update based on feedbacks and removed status: need review labels Apr 27, 2019
@Laurawly
Copy link
Contributor Author

@Laurawly please act on @icemelon9 's remaining comment

Comments addressed.

@icemelon icemelon added status: accepted and removed status: need update need update based on feedbacks labels Apr 29, 2019
@icemelon icemelon merged commit a706ad1 into apache:master Apr 29, 2019
@icemelon
Copy link
Member

Thanks everyone. This is now merged.

@Laurawly Laurawly deleted the dev branch April 30, 2019 17:12
wweic pushed a commit to wweic/tvm that referenced this pull request May 13, 2019
* ssd gluoncv gpu op updated

* ssd gluoncv gpu op updated

* tutorials and testes modified

* tutorials and testes modified

* fix lint

* fix lint

* address comment

* multibox bug fixed

* space line added

* use less threads per block

* use less threads per block

* less threads per block for get valid count

* less threads per block for get valid count

* merge with master

* Revert "less threads per block for get valid count"

This reverts commit 08896cf.

* Revert "less threads per block for get valid count"

This reverts commit 08896cf.

* typo fixed

* elem length made to a variable

* fix lint error

* fix lint error

* lint fixed

* bug fixed

* bug fixed

* lint fixed

* error fixed

* error fixed

* test ci

* test ci

* seperate argsort to be an independent op

* seperate argsort to be an independent op

* fix lint

* fix lint

* remove unsupported models

* typo fixed

* argsort added to realy

* solve conflicts with master

* fix lint

* fix lint

* test push

* Revert "test push"

This reverts commit 6db0088.

* fix lint error

* fix more lint

* cpu test_sort udpated

* debug ci

* nms fixed

* expose argsort to relay frontend

* test ci

* fix lint

* sort register error fixed

* fix nnvm

* nms type fixed

* adaptive pooling added to relay

* Revert "adaptive pooling added to relay"

This reverts commit 1119f1f.

* fix lint

* expose argsort op

* fix lint

* fix lint

* fix lint

* sort test updated

* sort bug fixed

* nnvm error fixed

* fix argsort default data type returned to be float insteaf of int

* fix lint

* fix lint

* test fixed

* fix valid count

* fix titanx bug

* tutorial add both targets

* titanx error fixed

* try to fix CI old gpu error

* try to solve CI GPU error

* get_valid_count added

* reverse get_valid_count

* get valid count optimized

* address comments

* fix ci error

* remove unessesary block sync

* add back one sync

* address comments

* address more comments

* more comments

* move sort to be indepent algorithm

* typo fixed

* more typos

* comments addressed

* doc updated

* fix pylint

* address final comments

* apache license added
wweic pushed a commit to neo-ai/tvm that referenced this pull request May 13, 2019
* ssd gluoncv gpu op updated

* ssd gluoncv gpu op updated

* tutorials and testes modified

* tutorials and testes modified

* fix lint

* fix lint

* address comment

* multibox bug fixed

* space line added

* use less threads per block

* use less threads per block

* less threads per block for get valid count

* less threads per block for get valid count

* merge with master

* Revert "less threads per block for get valid count"

This reverts commit 08896cf.

* Revert "less threads per block for get valid count"

This reverts commit 08896cf.

* typo fixed

* elem length made to a variable

* fix lint error

* fix lint error

* lint fixed

* bug fixed

* bug fixed

* lint fixed

* error fixed

* error fixed

* test ci

* test ci

* seperate argsort to be an independent op

* seperate argsort to be an independent op

* fix lint

* fix lint

* remove unsupported models

* typo fixed

* argsort added to realy

* solve conflicts with master

* fix lint

* fix lint

* test push

* Revert "test push"

This reverts commit 6db0088.

* fix lint error

* fix more lint

* cpu test_sort udpated

* debug ci

* nms fixed

* expose argsort to relay frontend

* test ci

* fix lint

* sort register error fixed

* fix nnvm

* nms type fixed

* adaptive pooling added to relay

* Revert "adaptive pooling added to relay"

This reverts commit 1119f1f.

* fix lint

* expose argsort op

* fix lint

* fix lint

* fix lint

* sort test updated

* sort bug fixed

* nnvm error fixed

* fix argsort default data type returned to be float insteaf of int

* fix lint

* fix lint

* test fixed

* fix valid count

* fix titanx bug

* tutorial add both targets

* titanx error fixed

* try to fix CI old gpu error

* try to solve CI GPU error

* get_valid_count added

* reverse get_valid_count

* get valid count optimized

* address comments

* fix ci error

* remove unessesary block sync

* add back one sync

* address comments

* address more comments

* more comments

* move sort to be indepent algorithm

* typo fixed

* more typos

* comments addressed

* doc updated

* fix pylint

* address final comments

* apache license added
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.

7 participants