From fd492df96a1e80b2288e6283b60abdf31f4ccb94 Mon Sep 17 00:00:00 2001 From: Charles Hastings Date: Tue, 25 Jun 2024 08:45:48 -0700 Subject: [PATCH 1/5] tweak rmm configuration for C++ unit tests --- cpp/tests/utilities/base_fixture.hpp | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/cpp/tests/utilities/base_fixture.hpp b/cpp/tests/utilities/base_fixture.hpp index cb302674a25..71924de5b06 100644 --- a/cpp/tests/utilities/base_fixture.hpp +++ b/cpp/tests/utilities/base_fixture.hpp @@ -68,14 +68,18 @@ inline auto make_cuda() { return std::make_shared inline auto make_managed() { return std::make_shared(); } -inline auto make_pool() +// use_max set to true will use half of available GPU memory for RMM, otherwise +// otherwise we'll use 1/10. +inline auto make_pool(bool use_max = false) { // Reduce the default pool allocation to 1/6th of the GPU memory so that we can // run more than 2 tests in parallel at the same time. Changes to this value could // effect the maximum amount of parallel tests, and therefore `tests/CMakeLists.txt` // `_CUGRAPH_TEST_PERCENT` default value will need to be audited. auto const [free, total] = rmm::available_device_memory(); - auto const min_alloc = rmm::align_down(std::min(free, total / 6), rmm::CUDA_ALLOCATION_ALIGNMENT); + auto const min_alloc = + use_max ? rmm::align_down(std::min(free, total / 2), rmm::CUDA_ALLOCATION_ALIGNMENT) + : rmm::align_down(std::min(free, total / 10), rmm::CUDA_ALLOCATION_ALIGNMENT); return rmm::mr::make_owning_wrapper(make_cuda(), min_alloc); } @@ -99,7 +103,8 @@ inline auto make_binning() * @throw cugraph::logic_error if the `allocation_mode` is unsupported. * * @param allocation_mode String identifies which resource type. - * Accepted types are "pool", "cuda", and "managed" only. + * Accepted types are "pool", "cuda", "managed" and + * "maxpool" only. * @return Memory resource instance */ inline std::shared_ptr create_memory_resource( @@ -108,6 +113,7 @@ inline std::shared_ptr create_memory_resource( if (allocation_mode == "binning") return make_binning(); if (allocation_mode == "cuda") return make_cuda(); if (allocation_mode == "pool") return make_pool(); + if (allocation_mode == "maxpool") return make_pool(true); if (allocation_mode == "managed") return make_managed(); CUGRAPH_FAIL("Invalid RMM allocation mode"); } From eb5b78ac5fea8672a14ed1b6ba1c4d0bff0b41c7 Mon Sep 17 00:00:00 2001 From: Charles Hastings Date: Tue, 25 Jun 2024 19:20:54 -0700 Subject: [PATCH 2/5] fix comment to match values --- cpp/tests/utilities/base_fixture.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cpp/tests/utilities/base_fixture.hpp b/cpp/tests/utilities/base_fixture.hpp index 71924de5b06..25011c0c97a 100644 --- a/cpp/tests/utilities/base_fixture.hpp +++ b/cpp/tests/utilities/base_fixture.hpp @@ -72,7 +72,7 @@ inline auto make_managed() { return std::make_shared Date: Tue, 25 Jun 2024 20:32:11 -0700 Subject: [PATCH 3/5] fix thrift dependency at 0.5.0 --- dependencies.yaml | 2 +- python/cugraph-service/client/pyproject.toml | 2 +- python/cugraph-service/server/pyproject.toml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dependencies.yaml b/dependencies.yaml index 91593bf9168..9a452d10b40 100644 --- a/dependencies.yaml +++ b/dependencies.yaml @@ -495,7 +495,7 @@ dependencies: common: - output_types: [conda, pyproject] packages: - - &thrift thriftpy2 + - &thrift thriftpy2=0.5.0 python_run_cugraph_service_server: common: - output_types: [conda, pyproject] diff --git a/python/cugraph-service/client/pyproject.toml b/python/cugraph-service/client/pyproject.toml index d8261c38b2d..8467cb243a3 100644 --- a/python/cugraph-service/client/pyproject.toml +++ b/python/cugraph-service/client/pyproject.toml @@ -19,7 +19,7 @@ authors = [ license = { text = "Apache 2.0" } requires-python = ">=3.9" dependencies = [ - "thriftpy2", + "thriftpy2=0.5.0", ] # This list was generated by `rapids-dependency-file-generator`. To make changes, edit ../../../dependencies.yaml and run `rapids-dependency-file-generator`. classifiers = [ "Intended Audience :: Developers", diff --git a/python/cugraph-service/server/pyproject.toml b/python/cugraph-service/server/pyproject.toml index d953d263af5..bf1e0136393 100644 --- a/python/cugraph-service/server/pyproject.toml +++ b/python/cugraph-service/server/pyproject.toml @@ -29,7 +29,7 @@ dependencies = [ "numpy>=1.23,<2.0a0", "rapids-dask-dependency==24.8.*", "rmm==24.8.*", - "thriftpy2", + "thriftpy2=0.5.0", "ucx-py==0.39.*", ] # This list was generated by `rapids-dependency-file-generator`. To make changes, edit ../../../dependencies.yaml and run `rapids-dependency-file-generator`. classifiers = [ From 0029ab82d101e412f7f4ecb1b9d17578a2971f1a Mon Sep 17 00:00:00 2001 From: Charles Hastings Date: Tue, 25 Jun 2024 21:41:37 -0700 Subject: [PATCH 4/5] fix format --- dependencies.yaml | 2 +- python/cugraph-service/client/pyproject.toml | 2 +- python/cugraph-service/server/pyproject.toml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dependencies.yaml b/dependencies.yaml index 9a452d10b40..da59146c0bd 100644 --- a/dependencies.yaml +++ b/dependencies.yaml @@ -495,7 +495,7 @@ dependencies: common: - output_types: [conda, pyproject] packages: - - &thrift thriftpy2=0.5.0 + - &thrift thriftpy2==0.5.0 python_run_cugraph_service_server: common: - output_types: [conda, pyproject] diff --git a/python/cugraph-service/client/pyproject.toml b/python/cugraph-service/client/pyproject.toml index 8467cb243a3..9cc6037ffbd 100644 --- a/python/cugraph-service/client/pyproject.toml +++ b/python/cugraph-service/client/pyproject.toml @@ -19,7 +19,7 @@ authors = [ license = { text = "Apache 2.0" } requires-python = ">=3.9" dependencies = [ - "thriftpy2=0.5.0", + "thriftpy2==0.5.0", ] # This list was generated by `rapids-dependency-file-generator`. To make changes, edit ../../../dependencies.yaml and run `rapids-dependency-file-generator`. classifiers = [ "Intended Audience :: Developers", diff --git a/python/cugraph-service/server/pyproject.toml b/python/cugraph-service/server/pyproject.toml index bf1e0136393..825e1cd5bb0 100644 --- a/python/cugraph-service/server/pyproject.toml +++ b/python/cugraph-service/server/pyproject.toml @@ -29,7 +29,7 @@ dependencies = [ "numpy>=1.23,<2.0a0", "rapids-dask-dependency==24.8.*", "rmm==24.8.*", - "thriftpy2=0.5.0", + "thriftpy2==0.5.0", "ucx-py==0.39.*", ] # This list was generated by `rapids-dependency-file-generator`. To make changes, edit ../../../dependencies.yaml and run `rapids-dependency-file-generator`. classifiers = [ From 8611dd324522d8b1dbcbbe7ea272f68cdf8271bb Mon Sep 17 00:00:00 2001 From: Charles Hastings Date: Thu, 27 Jun 2024 07:10:45 -0700 Subject: [PATCH 5/5] looks like I updated the wrong one... reverting --- dependencies.yaml | 2 +- python/cugraph-service/client/pyproject.toml | 2 +- python/cugraph-service/server/pyproject.toml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dependencies.yaml b/dependencies.yaml index bd97f62ac3b..c37d2080771 100644 --- a/dependencies.yaml +++ b/dependencies.yaml @@ -495,7 +495,7 @@ dependencies: common: - output_types: [conda, pyproject] packages: - - &thrift thriftpy2==0.5.0 + - &thrift thriftpy2 python_run_cugraph_service_server: common: - output_types: [conda, pyproject] diff --git a/python/cugraph-service/client/pyproject.toml b/python/cugraph-service/client/pyproject.toml index 9cc6037ffbd..d8261c38b2d 100644 --- a/python/cugraph-service/client/pyproject.toml +++ b/python/cugraph-service/client/pyproject.toml @@ -19,7 +19,7 @@ authors = [ license = { text = "Apache 2.0" } requires-python = ">=3.9" dependencies = [ - "thriftpy2==0.5.0", + "thriftpy2", ] # This list was generated by `rapids-dependency-file-generator`. To make changes, edit ../../../dependencies.yaml and run `rapids-dependency-file-generator`. classifiers = [ "Intended Audience :: Developers", diff --git a/python/cugraph-service/server/pyproject.toml b/python/cugraph-service/server/pyproject.toml index 825e1cd5bb0..d953d263af5 100644 --- a/python/cugraph-service/server/pyproject.toml +++ b/python/cugraph-service/server/pyproject.toml @@ -29,7 +29,7 @@ dependencies = [ "numpy>=1.23,<2.0a0", "rapids-dask-dependency==24.8.*", "rmm==24.8.*", - "thriftpy2==0.5.0", + "thriftpy2", "ucx-py==0.39.*", ] # This list was generated by `rapids-dependency-file-generator`. To make changes, edit ../../../dependencies.yaml and run `rapids-dependency-file-generator`. classifiers = [