-
Notifications
You must be signed in to change notification settings - Fork 6.7k
[MXNET-1249] Fix Object Detector Performance with GPU #13522
Conversation
| : IndexedSeq[IndexedSeq[(String, Array[Float])]] = { | ||
|
|
||
| val predictResult = predictor.predictWithNDArray(input)(0) | ||
| val predictResult = predictor.predictWithNDArray(input)(0).asInContext(Context.cpu()) |
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.
If possible, can we apply this to ImageClassifier class as well ?
Maybe this can provide a speed boost there as well ?
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.
Same nitpick I had on imageclassifier. A comment explaining this wouldn't hurt since it's not obvious why we're doing this.
piyushghai
left a comment
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.
Looks ok to me. 💯 🥇
Please also add comments where you are the parArray. That's a nice optimization that might not be very obvious while reading the code :)
scala-package/infer/src/main/scala/org/apache/mxnet/infer/Classifier.scala
Show resolved
Hide resolved
| : IndexedSeq[IndexedSeq[(String, Array[Float])]] = { | ||
|
|
||
| val predictResult = predictor.predictWithNDArray(input)(0) | ||
| val predictResult = predictor.predictWithNDArray(input)(0).asInContext(Context.cpu()) |
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.
Same nitpick I had on imageclassifier. A comment explaining this wouldn't hurt since it's not obvious why we're doing this.
andrewfayres
left a comment
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.
LGTM
…icense file" (#13558) * Revert "Chi_square_check for discrete distribution fix (#13543)" This reverts commit cf6e8cb. * Revert "Updated docs for randint operator (#13541)" This reverts commit e0ff3c3. * Revert "Simplifications and some fun stuff for the MNIST Gluon tutorial (#13094)" This reverts commit 8bbac82. * Revert "Fix #13521 (#13537)" This reverts commit f6b4665. * Revert "Add a retry to qemu_provision (#13551)" This reverts commit f6f8401. * Revert "[MXNET-769] Use MXNET_HOME in a tempdir in windows to prevent access denied due t… (#13531)" This reverts commit bd8e0f8. * Revert "[MXNET-1249] Fix Object Detector Performance with GPU (#13522)" This reverts commit 1c8972c. * Revert "Fixing a 404 in the ubuntu setup doc (#13542)" This reverts commit cb0db29. * Revert "Bumped minor version from 1.4.0 to 1.5.0 on master, updated License file (#13478)" This reverts commit 40db619.
Description
Found Object Detector contains performance problem with GPU which is slower than CPU. The root cause is the long time taken in the post-processing.
@piyushghai @andrewfayres @zachgk
Checklist
Essentials
Please feel free to remove inapplicable items for your PR.