[Object Detection] Gluoncv SSD support on CPU#2353
Conversation
a7f1766 to
7f2712f
Compare
7ef52f3 to
81bb789
Compare
|
Now full support for nnvm is ready. For relay, the only issue is flaky compilation probably caused by relay compiler engine: https://discuss.tvm.ai/t/relay-flaky-compilation-behavior/1478 The code is ready to be reviewed now. @tqchen @zhreshold @Laurawly @vinx13 @were Thanks for @were 's support of hybrid script! |
c1a4876 to
fbe61e9
Compare
| **Author**: `Yao Wang <https://github.com/kevinthesun>`_ | ||
|
|
||
| This article is an introductory tutorial to deploy SSD models with TVM. | ||
| <<<<<<< HEAD |
0b243b8 to
36250a6
Compare
|
The relay issue has been resolved. |
| np_out2[i, j, k] = -1 | ||
|
|
||
| target = "llvm" | ||
| ctx = tvm.cpu() |
There was a problem hiding this comment.
Expanding target and ctx to for target, ctx in ctx_list(): can make this function look more generalized.
There was a problem hiding this comment.
Will it fail in CI if gpu targets haven't been supported yet?
There was a problem hiding this comment.
If so, adding if target == 'cuda' : continue will work.
| f(tvm_data, tvm_valid_count, tvm_out) | ||
| tvm.testing.assert_allclose(tvm_out.asnumpy(), np_result, rtol=1e-4) | ||
|
|
||
| for device in ['llvm', 'opencl', 'cuda']: |
There was a problem hiding this comment.
Does this one fail with 'opencl' and 'cuda'?
There was a problem hiding this comment.
get_valid_counts need to be implemented for gpu targets.
| dshape = (1, 3, 512, 512) | ||
| dtype = "float32" | ||
| target = "llvm" | ||
| ctx = tvm.cpu() |
There was a problem hiding this comment.
Maybe better to use ctx_list to make it more generalized.
8b12d06 to
9bf0c06
Compare
|
@tqchen I added pip3 install gluoncv to Dockerfile.ci_gpu and Dockerfile.demo_gpu, but still can't import gluoncv. Is anywhere I missed? |
|
To make sure we cache the image correctly without repetitive rebuilds. The docker image does not rebuild automatically, please send a separate PR to update the docker file, and I will update the docker image. |
81413f2 to
7eb53da
Compare
7eb53da to
88a7325
Compare
|
@tqchen Docker image not updated yet? |
|
Working on the docker now. |
|
Please check if the new ci error has things to do with this PR |
88a7325 to
1544aab
Compare
|
I just ran this test 10000 times locally but didn't get any failure. I'll re-trigger the ci to see what's the problem. |
|
The CI is now green, but please comment on the flaky case, to see if that could due to random-ness and tie (similar to argmax) or it is something that we can ignore |
99556f4 to
d20024c
Compare
|
Thanks, @kevinthesun @were @vinx13 @Laurawly this is now merged |
This PR refactors vision operators with hybrid script(thanks to @were). Now gluoncv SSD with resnet and mobilenet are supported in nnvm. SSD with vgg are not supported since x86 conv2d_NCHWc doesn't support dilation yet. Two tasks need to be done: