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

Simplify type dispatch with device_storage_dispatch #7419

Merged
merged 9 commits into from
Feb 23, 2021

Conversation

codereport
Copy link
Contributor

@codereport codereport commented Feb 22, 2021

Resolves #7390

Compile times:

// Before
real	33m29.842s
user	300m0.478s
sys	10m46.871s

// After
real	33m20.127s
user	299m24.825s
sys	10m35.779s

Binary sizes:

Before: -rwxr-xr-x  1 rapids rapids 328M Feb 22 15:10 libcudf_base.so
After:  -rwxr-xr-x  1 rapids rapids 327M Feb 23 07:49 libcudf_base.so

@codereport codereport added 2 - In Progress Currently a work in progress libcudf Affects libcudf (C++/CUDA) code. improvement Improvement / enhancement to an existing function non-breaking Non-breaking change labels Feb 22, 2021
@codereport codereport self-assigned this Feb 22, 2021
@jrhemstad
Copy link
Contributor

jrhemstad commented Feb 22, 2021

Do you have any measurements of the impact of this change on compile time or binary size?

@codecov
Copy link

codecov bot commented Feb 22, 2021

Codecov Report

❗ No coverage uploaded for pull request base (branch-0.19@580f9a2). Click here to learn what that means.
The diff coverage is n/a.

Impacted file tree graph

@@              Coverage Diff               @@
##             branch-0.19    #7419   +/-   ##
==============================================
  Coverage               ?   82.23%           
==============================================
  Files                  ?      101           
  Lines                  ?    17060           
  Branches               ?        0           
==============================================
  Hits                   ?    14029           
  Misses                 ?     3031           
  Partials               ?        0           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 580f9a2...5239a20. Read the comment docs.

@codereport
Copy link
Contributor Author

Do you have any measurements of the impact of this change on compile time or binary size?

Compile time no, I will post when I measure. Binary size doesn't seem to have changed (based on current commits)

Before: -rwxr-xr-x  1 rapids rapids 328M Feb 22 15:10 libcudf_base.so
After:  -rwxr-xr-x  1 rapids rapids 328M Feb 22 15:10 libcudf_base.so

@codereport
Copy link
Contributor Author

codereport commented Feb 23, 2021

Compile times:

// Before
real	33m29.842s
user	300m0.478s
sys	10m46.871s

// After
real	33m20.127s
user	299m24.825s
sys	10m35.779s

Binary sizes:

Before: -rwxr-xr-x  1 rapids rapids 328M Feb 22 15:10 libcudf_base.so
After:  -rwxr-xr-x  1 rapids rapids 327M Feb 23 07:49 libcudf_base.so

@codereport codereport added 3 - Ready for Review Ready for review by team and removed 2 - In Progress Currently a work in progress labels Feb 23, 2021
@codereport codereport marked this pull request as ready for review February 23, 2021 13:06
@codereport codereport requested a review from a team as a code owner February 23, 2021 13:06
Copy link
Contributor

@davidwendt davidwendt left a comment

Choose a reason for hiding this comment

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

Looks good. You may need to update some copyrights.

@jrhemstad
Copy link
Contributor

Compile times:

// Before
real	33m29.842s
user	300m0.478s
sys	10m46.871s

// After
real	33m20.127s
user	299m24.825s
sys	10m35.779s

Binary sizes:

Before: -rwxr-xr-x  1 rapids rapids 328M Feb 22 15:10 libcudf_base.so
After:  -rwxr-xr-x  1 rapids rapids 327M Feb 23 07:49 libcudf_base.so

Welp, so much for that idea. Either the compiler was already making the optimization or the switch is just too complicated to detect the identical instantiations. Anyways, I still think this is a clean way to handle the storage type. Thanks for doing this.

@codereport
Copy link
Contributor Author

Anyways, I still think this is a clean way to handle the storage type. Thanks for doing this.

I agree, I still think this is a lot cleaner for the cases that work. All you have to do is find the type_dispatcher call, add the <dispatch_storage_type and you are done.

@codereport codereport added 5 - Ready to Merge Testing and reviews complete, ready to merge and removed 3 - Ready for Review Ready for review by team labels Feb 23, 2021
@codereport
Copy link
Contributor Author

@gpucibot merge

@rapids-bot rapids-bot bot merged commit 2234554 into rapidsai:branch-0.19 Feb 23, 2021
rapids-bot bot pushed a commit that referenced this pull request Feb 25, 2021
)

Resolves #7441

Missed a necessary change to `type_dispatcher` invocation in `/lists/copyting/gather.cu` in #7419

Authors:
  - Conor Hoekstra (@codereport)

Approvers:
  - David (@davidwendt)
  - @nvdbaranec
  - Robert (Bobby) Evans (@revans2)

URL: #7449
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
5 - Ready to Merge Testing and reviews complete, ready to merge improvement Improvement / enhancement to an existing function libcudf Affects libcudf (C++/CUDA) code. non-breaking Non-breaking change
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[FEA] Simplify type-dispatch for code that only cares about the storage type
3 participants