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

[BUG] cuDF cpp build error utilities.cuh: "get_num_child_rows defined but not used' #7265

Closed
NvTimLiu opened this issue Feb 1, 2021 · 0 comments · Fixed by #7266
Closed
Assignees
Labels
bug Something isn't working libcudf Affects libcudf (C++/CUDA) code.

Comments

@NvTimLiu
Copy link
Contributor

NvTimLiu commented Feb 1, 2021

Describe the bug

Compile error:

https://ci.ngcc.nvidia.com/job/spark/job/cudf18_nightly/63/consoleText
[2021-01-31T08:11:52.114Z] [ 69%] Building CUDA object CMakeFiles/cudf_reshape.dir/src/reshape/byte_cast.cu.o
[2021-01-31T08:12:00.656Z] [ 73%] Building CUDA object CMakeFiles/cudf_reductions.dir/src/reductions/min.cu.o
[2021-01-31T08:12:10.611Z] /ansible-managed/jenkins-slave/slave3/workspace/spark/cudf18_nightly/cpp/include/cudf/lists/detail/utilities.cuh:31:18: error: 'cudf::size_type cudf::detail::get_num_child_rows(const cudf::column_view&, rmm::cuda_stream_view)' defined but not used [-Werror=unused-function]
[2021-01-31T08:12:10.611Z]  static cudf::size_type get_num_child_rows(cudf::column_view const& list_offsets,
[2021-01-31T08:12:10.611Z]                   ^~~~~~~~~~~~~~~~~~
[2021-01-31T08:12:11.981Z] cc1plus: all warnings being treated as errors
[2021-01-31T08:12:12.238Z] make[2]: *** [CMakeFiles/cudf_hash.dir/build.make:82: CMakeFiles/cudf_hash.dir/src/hash/hashing.cu.o] Error 1
[2021-01-31T08:12:12.238Z] make[1]: *** [CMakeFiles/Makefile2:220: CMakeFiles/cudf_hash.dir/all] Error 2
[2021-01-31T08:12:12.238Z] make[1]: *** Waiting for unfinished jobs....
[2021-01-31T08:12:12.238Z] [ 73%] Building CUDA object CMakeFiles/cudf_reductions.dir/src/reductions/minmax.cu.o
[2021-01-31T08:12:38.767Z] [ 69%] Building CUDA object CMakeFiles/cudf_replace.dir/src/replace/nans.cu.o
[2021-01-31T08:12:39.336Z] [ 69%] Building CUDA object CMakeFiles/cudf_reshape.dir/src/reshape/explode.cu.o

Steps/Code to reproduce bug
Follow this guide http://matthewrocklin.com/blog/work/2018/02/28/minimal-bug-reports to craft a minimal bug report. This helps us reproduce the issue you're having and resolve the issue more quickly.

Environment overview (please complete the following information)

Environment details
https://gitlab-master.nvidia.com/nvspark/cudf/-/blob/nv-branch-0.18/java/ci/build-in-docker.sh

Additional context
Add any other context about the problem here.

@NvTimLiu NvTimLiu added bug Something isn't working Needs Triage Need team to review and classify labels Feb 1, 2021
@harrism harrism added libcudf Affects libcudf (C++/CUDA) code. and removed Needs Triage Need team to review and classify labels Feb 2, 2021
@rapids-bot rapids-bot bot closed this as completed in #7266 Feb 4, 2021
rapids-bot bot pushed a commit that referenced this issue Feb 4, 2021
Fixes #7265.

`cudf::detail::get_num_child_rows()` is currently defined in `cudf/lists/detail/utilities.cuh`. The build pipelines for #7189 are fine, but there seem to be build failures in dependent projects such as `spark-rapids`:
```
[2021-01-31T08:12:10.611Z] /.../workspace/spark/cudf18_nightly/cpp/include/cudf/lists/detail/utilities.cuh:31:18: error: 'cudf::size_type cudf::detail::get_num_child_rows(const cudf::column_view&, rmm::cuda_stream_view)' defined but not used [-Werror=unused-function]
[2021-01-31T08:12:10.611Z]  static cudf::size_type get_num_child_rows(cudf::column_view const& list_offsets,
[2021-01-31T08:12:10.611Z]                   ^~~~~~~~~~~~~~~~~~
[2021-01-31T08:12:11.981Z] cc1plus: all warnings being treated as errors
[2021-01-31T08:12:12.238Z] make[2]: *** [CMakeFiles/cudf_hash.dir/build.make:82: CMakeFiles/cudf_hash.dir/src/hash/hashing.cu.o] Error 1
[2021-01-31T08:12:12.238Z] make[1]: *** [CMakeFiles/Makefile2:220: CMakeFiles/cudf_hash.dir/all] Error 2
```
In any case, it is less than ideal for the function to be completely defined in the header, especially given that the likes of `hashing.cu` are exposed to it (by way of `scatter.cuh`). 

This commit moves the function definition to a separate translation unit, without changing implementation or interface.

Authors:
  - MithunR (@mythrocks)

Approvers:
  - @nvdbaranec
  - Mike Wilson (@hyperbolic2346)
  - David (@davidwendt)

URL: #7266
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working libcudf Affects libcudf (C++/CUDA) code.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants