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

Refactor host device macros #9797

Merged
merged 12 commits into from
Jan 10, 2022

Conversation

vyasr
Copy link
Contributor

@vyasr vyasr commented Nov 30, 2021

This PR is a follow-up to #9530 to standardize the names of the macros used for the __host__ __device__ attributes. Aliases for __device__ and combinations with inlining have been removed, and the only remaining macro is CUDF_HOST_DEVICE which is __host__ __device__ in device code and empty in host code. See #9530 (comment) for more discussion.

@vyasr vyasr requested a review from a team as a code owner November 30, 2021 01:07
@vyasr vyasr self-assigned this Nov 30, 2021
@github-actions github-actions bot added the libcudf Affects libcudf (C++/CUDA) code. label Nov 30, 2021
@vyasr vyasr added 3 - Ready for Review Ready for review by team code quality improvement Improvement / enhancement to an existing function non-breaking Non-breaking change labels Nov 30, 2021
@github-actions github-actions bot added the CMake CMake build issue label Dec 8, 2021
@vyasr vyasr force-pushed the refactor/host_device_macros branch from b9959d4 to 3192065 Compare December 9, 2021 20:21
@vyasr vyasr requested a review from a team as a code owner December 9, 2021 20:21
@github-actions github-actions bot removed the CMake CMake build issue label Dec 9, 2021
@vyasr vyasr removed the request for review from a team December 9, 2021 20:22
@codecov
Copy link

codecov bot commented Dec 9, 2021

Codecov Report

Merging #9797 (8824c31) into branch-22.02 (967a333) will decrease coverage by 0.06%.
The diff coverage is n/a.

Impacted file tree graph

@@               Coverage Diff                @@
##           branch-22.02    #9797      +/-   ##
================================================
- Coverage         10.49%   10.42%   -0.07%     
================================================
  Files               119      119              
  Lines             20305    20475     +170     
================================================
+ Hits               2130     2134       +4     
- Misses            18175    18341     +166     
Impacted Files Coverage Δ
python/dask_cudf/dask_cudf/sorting.py 92.30% <0.00%> (-0.61%) ⬇️
python/cudf/cudf/__init__.py 0.00% <0.00%> (ø)
python/cudf/cudf/core/frame.py 0.00% <0.00%> (ø)
python/cudf/cudf/core/index.py 0.00% <0.00%> (ø)
python/cudf/cudf/io/parquet.py 0.00% <0.00%> (ø)
python/cudf/cudf/core/series.py 0.00% <0.00%> (ø)
python/cudf/cudf/utils/utils.py 0.00% <0.00%> (ø)
python/cudf/cudf/utils/dtypes.py 0.00% <0.00%> (ø)
python/cudf/cudf/utils/ioutils.py 0.00% <0.00%> (ø)
python/cudf/cudf/core/dataframe.py 0.00% <0.00%> (ø)
... and 15 more

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 eba4f03...8824c31. Read the comment docs.

@vyasr vyasr requested a review from harrism January 6, 2022 01:53
@vyasr
Copy link
Contributor Author

vyasr commented Jan 6, 2022

@harrism @jrhemstad this should be good to go now if everyone is satisfied with the outcome of the discussion. The only macro left is CUDF_HOST_DEVICE, the __device__ only macros have been removed, and inline and __forceinline__ are specified explicitly everywhere (although no inlining behavior has been changed in this PR).

@vyasr
Copy link
Contributor Author

vyasr commented Jan 10, 2022

@gpucibot merge

@rapids-bot rapids-bot bot merged commit 496aa47 into rapidsai:branch-22.02 Jan 10, 2022
@harrism
Copy link
Member

harrism commented Jan 11, 2022

FYI, merging this broke the cuSpatial build.

rapids-bot bot pushed a commit to rapidsai/cuspatial that referenced this pull request Jan 11, 2022
One file in libcuspatial used `CUDA_HOST_DEVICE` from cudf/types.hpp instead of just `__device__ inline`, which is all it needed.  rapidsai/cudf#9797 changed the name of the macro, which broke the build.

This trivial PR fixes it and removes that particular unnecessary dependency.

Authors:
  - Mark Harris (https://github.com/harrism)

Approvers:
  - Paul Taylor (https://github.com/trxcllnt)
  - Christopher Harris (https://github.com/cwharris)

URL: #475
@vyasr vyasr deleted the refactor/host_device_macros branch January 14, 2022 18:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3 - Ready for Review Ready for review by team 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.

5 participants