Skip to content

[gpuCI] Forward-merge branch-21.12 to branch-22.02 [skip gpuci]#915

Merged
GPUtester merged 9 commits intobranch-22.02from
branch-21.12
Nov 11, 2021
Merged

[gpuCI] Forward-merge branch-21.12 to branch-22.02 [skip gpuci]#915
GPUtester merged 9 commits intobranch-22.02from
branch-21.12

Conversation

@GPUtester
Copy link
Contributor

Forward-merge triggered by push to branch-21.12 that creates a PR to keep branch-22.02 up-to-date. If this PR is unable to be immediately merged due to conflicts, it will remain open for the team to manually merge.

robertmaynard and others added 9 commits November 4, 2021 16:58
After merging #893, there are now 2 `librmm` `conda` packages being published instead of 1. Therefore the upload script needs to be updated accordingly.

Skipping CI since the upload script isn't run on PRs anyway.

Authors:
  - AJ Schmidt (https://github.com/ajschmidt8)

Approvers:
  - Jordan Jacobelli (https://github.com/Ethyling)

URL: #909
…or (#898)

#892 added `failure_callback_resource_adaptor` which provides the ability to respond to memory allocation failures. However, it was hard-coded to catch (and rethrow) `std::bad_alloc` exceptions.  This PR makes the type of exception the adaptor catches a template parameter, to provide greater flexibility. The default exception type is now `rmm::out_of_memory` since we expect this to be the common use case.

Also a few changes to fix clang-tidy warnings.

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

Approvers:
  - Rong Ou (https://github.com/rongou)
  - Mads R. B. Kristensen (https://github.com/madsbk)
  - Jake Hemstad (https://github.com/jrhemstad)

URL: #898
Adds a cmake option (`CODE_COVERAGE`) to compile a build with relevant options to GCC and NVCC to generate code coverage profiling. 

This can then be used with coverage tools like `gcovr` or coveralls to generate a detailed coverage summary (e.g. in HTML, JSON, XML, etc.).

Also adds a gcovr.cfg with basic options and a conda dependency on gcovr. ~Finally, it adds some explicit template instantiations in test files to ensure all template class methods are included in coverage analysis (so coverage % isn't artificially high).~ (reserved for future PR) 

Instructions for generating code coverage

```
mkdir -p <RMM_ROOT>/build/debug && cd <RMM_ROOT>build/debug
cmake .. -DCMAKE_BUILD_TYPE=Debug -DCODE_COVERAGE=ON
make
ctest ## or ninja
cd <RMM_ROOT>
covr -r . -j 12 -o build/debug/coverage/ build/debug/tests/CMakeFiles/
```

Note that parallel building should not be used, because `--keep` is used with .cu files.

With rapids-compose, just set build type to Debug in .env, then

```
build-rmm-cpp -DCODE_COVERAGE=ON
test-rmm-cpp
covr -r . -j 12 -o build/debug/coverage/ build/debug/tests/CMakeFiles/
```

Then open `build/debug/coverage/coverage_details.html`.  It looks like this:

![image](https://user-images.githubusercontent.com/783069/140244835-28ae15e5-0520-435c-b3ee-e9f14847c3f8.png)

Summary of changes required to get good coverage analysis:
* Compile with `--coverage,-fprofile-abs-path,-fkeep-inline-functions,-fno-elide-constructors` and link with `--coverage`.
* Compile CUDA code `--keep` (otherwise gcov gets errors finding NVCC's deleted intermediate-stage files)
* ~Explicitly instantiate template classes at least once in test source files. This ensures any unused methods in these classes get shown as not covered by tests.~ Reserved for a future PR to improve code coverage.

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

Approvers:
  - Rong Ou (https://github.com/rongou)
  - Robert Maynard (https://github.com/robertmaynard)
  - AJ Schmidt (https://github.com/ajschmidt8)

URL: #905
This PR tweaks the changes from #893 and #909 so that `rmm` produces two packages (`has_cma` and `no_cma`) instead of `librmm`.

Authors:
  - AJ Schmidt (https://github.com/ajschmidt8)

Approvers:
  - Jordan Jacobelli (https://github.com/Ethyling)

URL: #910
This PR backports #886 to `branch-21.10` in order to install `spdlog` when `rmm` is installed.
[gpuCI] Forward-merge branch-21.10 to branch-21.12 [skip gpuci]
Getting these clang-tidy warnings in debug build:
```console
/home/rou/src/rmm/include/rmm/cuda_stream.hpp:86:5: warning: do not implicitly decay an array into a pointer; consider using gsl::array_view or an explicit cast instead [cppcoreguidelines-pro-bounds-array-to-pointer-decay]
    RMM_LOGGING_ASSERT(is_valid());
    ^
/home/rou/src/rmm/include/rmm/detail/error.hpp:260:7: note: expanded from macro 'RMM_LOGGING_ASSERT'
      assert(success);                                                                            \
      ^
/usr/include/assert.h:95:51: note: expanded from macro 'assert'
      : __assert_fail (#expr, __FILE__, __LINE__, __ASSERT_FUNCTION))
                                                  ^
/usr/include/assert.h:129:30: note: expanded from macro '__ASSERT_FUNCTION'
#   define __ASSERT_FUNCTION    __extension__ __PRETTY_FUNCTION__
                                ^
```

Looks to be a pending issue with clang-tidy: https://reviews.llvm.org/D88833

Authors:
  - Rong Ou (https://github.com/rongou)

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

URL: #914
@GPUtester GPUtester requested review from a team as code owners November 11, 2021 18:38
@GPUtester
Copy link
Contributor Author

SUCCESS - forward-merge complete.

@GPUtester GPUtester merged commit 7b6658e into branch-22.02 Nov 11, 2021
@github-actions github-actions bot added CMake conda cpp Pertains to C++ code gpuCI labels Nov 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CMake conda cpp Pertains to C++ code gpuCI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants