-
Notifications
You must be signed in to change notification settings - Fork 7k
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
Add decode_image op #2718
Add decode_image op #2718
Conversation
Codecov Report
@@ Coverage Diff @@
## master #2718 +/- ##
==========================================
+ Coverage 72.87% 72.91% +0.03%
==========================================
Files 95 95
Lines 8237 8233 -4
Branches 1285 1279 -6
==========================================
Hits 6003 6003
+ Misses 1839 1838 -1
+ Partials 395 392 -3
Continue to review full report at Codecov.
|
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!
* Add decode_image op * Fix lint * More lint * Add C10_EXPORT
* Add decode_image op * Fix lint * More lint * Add C10_EXPORT
Hello. Thanks for adding this functionality. Just a quick question: would there be any plan for a GPU implementation for this op? |
Fixes #2686
For a follow-up PR, I'm thinking about removing
read_jpeg
/read_png
(and potentiallyread_image
) because they are now just wrappers around_read_file
+decode*
. I'll also move_read_file
to C++, so that all ops can be torchscriptable.The implementation in
read_image_cpu.cpp
can definitely be improved, but this is just a first version to get things moving forward.