-
Notifications
You must be signed in to change notification settings - Fork 154
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
Rework libcuspatial CMakeLists.txt to export targets for CPM #365
Conversation
…:cudftestutil is built
This PR ensures all `cudf::*` library aliases are created and promoted to `IMPORTED_GLOBAL` when `find_package(cudf)` finds cudf in a local build directory. ~This PR shouldn't affect CI or the targets you'd see when `libcudf` is installed (e.g. by conda), only local source builds.~ edit: This now fixes `cudf::*` alias targets for the `libcudf` installations too, needed by rapidsai/cuspatial#365. Validation method: ```shell $ docker run --rm -it \ -w /tmp/findpackagecudf \ -v "/tmp/findpackagecudf:/tmp/findpackagecudf" \ gpuci/miniconda-cuda:10.2-devel-ubuntu18.04 bash # Set up mamba environment conda install -y -n base -c conda-forge mamba mamba update -y -n base -c defaults conda && mamba update -y -n base -c conda-forge mamba mamba install -y -n base -c conda-forge -c rapidsai-nightly \ git gtest gmock ninja cmake=3.18 gdal=3.0.2 boost-cpp=1.72.0 cudatoolkit=10.2 libcudf=0.19 # Copy changes in this PR (from the host) to container's /opt/conda/lib/cmake/cudf # cmake --install $CUDF_ROOT --prefix $CUDF_ROOT/local-install # docker cp $CUDF_ROOT/local-install/lib/cmake/cudf frosty_agnesi:/opt/conda/lib/cmake/ # Clone cuspatial git clone https://github.com/trxcllnt/cuspatial.git && cd cuspatial && git checkout fix/cmake-exports # Configure cuspatial rm -rf cpp/build && mkdir -p cpp/build \ && cmake -GNinja -B cpp/build -S cpp \ -DBUILD_TESTS=ON -DBUILD_BENCHMARKS=ON -DCMAKE_CUDA_ARCHITECTURES= ``` Authors: - Paul Taylor (@trxcllnt) - Robert Maynard (@robertmaynard) Approvers: - Robert Maynard (@robertmaynard) - Keith Kraus (@kkraus14) - Ray Douglass (@raydouglass) URL: #7734
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just some tiny C++ things.
virtual void SetUp(const ::benchmark::State& state) override | ||
{ | ||
mr = std::make_shared<rmm::mr::cuda_memory_resource>(); | ||
rmm::mr::set_current_device_resource(mr.get()); // set default resource to cuda | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this needed? The default resource is the cuda_memory_resource
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The benchmark base class instantiates an RMM pool resource in the SetUp
function. It's assigned to a local variable instead of the member var, so it segfaults. When I fix that, I get "Maximum pool size exceeded" on the first bench run.
I'm not sure why the second error is happening, and this PR is primarily about CMake. So this change just makes the benchmark code compile and run without crashing.
@gpucibot merge |
This PR includes many of the same changes as were made in cudf/pull/7107.
cuspatial::cuspatial
CMake alias targets.CPMFindPackage
to findlibcudf
installed on the system or buildlibcudf
from source.edit: Depends on rapidsai/cudf#7574 and rapidsai/cudf#7734