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

[proto] Speed improvements for adjust hue op #6805

Merged
merged 15 commits into from
Oct 24, 2022

Conversation

vfdev-5
Copy link
Collaborator

@vfdev-5 vfdev-5 commented Oct 20, 2022

Results:

[--------------- Adjust_hue cpu torch.uint8 --------------]
                     |  adjust_hue stable  |  adjust_hue v2
1 threads: ------------------------------------------------
      (3, 400, 400)  |         18.9        |       13.9    
6 threads: ------------------------------------------------
      (3, 400, 400)  |          5.4        |        4.5    

Times are in milliseconds (ms).

[-------------- Adjust_hue cuda torch.uint8 --------------]
                     |  adjust_hue stable  |  adjust_hue v2
1 threads: ------------------------------------------------
      (3, 400, 400)  |         1829        |       671     
6 threads: ------------------------------------------------
      (3, 400, 400)  |         1477        |       673     

Times are in microseconds (us).

[-------------- Adjust_hue cpu torch.float32 -------------]
                     |  adjust_hue stable  |  adjust_hue v2
1 threads: ------------------------------------------------
      (3, 400, 400)  |         18.3        |       13.4    
6 threads: ------------------------------------------------
      (3, 400, 400)  |          5.4        |        4.4    

Times are in milliseconds (ms).

[------------- Adjust_hue cuda torch.float32 -------------]
                     |  adjust_hue stable  |  adjust_hue v2
1 threads: ------------------------------------------------
      (3, 400, 400)  |         1441        |       630     
6 threads: ------------------------------------------------
      (3, 400, 400)  |         1447        |       636     

Times are in microseconds (us).

Source, code

Copy link
Contributor

@datumbox datumbox left a comment

Choose a reason for hiding this comment

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

LGTM, just 2 minor comments.

@datumbox datumbox added module: transforms Perf For performance improvements prototype labels Oct 21, 2022
@vfdev-5 vfdev-5 requested review from datumbox and pmeier October 21, 2022 12:35
Copy link
Contributor

@datumbox datumbox left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

@datumbox datumbox merged commit 62da7d4 into pytorch:main Oct 24, 2022
facebook-github-bot pushed a commit that referenced this pull request Oct 27, 2022
Summary:
* WIP

* Updated rgb2hsv and a bit of hsv2rgb

* Fix issue with batch of images

* Few improvements

* hsv2rgb improvements

* PR review

* another update

* Fix cuda issue with empty images
torch.aminmax is failing

Reviewed By: YosuaMichael

Differential Revision: D40722899

fbshipit-source-id: 59edbba970a015fbc58c26828b36197945f46080

Co-authored-by: Vasilis Vryniotis <[email protected]>
@vfdev-5 vfdev-5 deleted the proto-improve-adjust_hue branch January 30, 2023 09:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants