Repository navigation
Remove memory resources from Statistics #1003
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
Changes from 11 commits
1ba1c28
0a08600
ac296bc
6c83c42
0c34b67
27b8958
98bc32a
7110a2b
2817ab6
20f51da
e2b7187
14b6450
c2e1454
e11ee85
b295870
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should still be removed. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| { | ||
| "packages": {} | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -122,6 +122,10 @@ include(../cmake/Modules/ConfigureCUDA.cmake) # set other CUDA compilation flags | |
|
|
||
| # ################################################################################################## | ||
| # * dependencies ---------------------------------------------------------------------------------- | ||
|
|
||
| include("${rapids-cmake-dir}/cpm/package_override.cmake") | ||
| rapids_cpm_package_override("${CMAKE_CURRENT_SOURCE_DIR}/../cmake/cpm_override_packages.json") | ||
|
|
||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think you are not using this. |
||
| rapids_cpm_init() | ||
|
|
||
| rapids_find_package( | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -363,13 +363,14 @@ int main(int argc, char** argv) { | |
| }; | ||
| } | ||
|
|
||
| auto stats = args.enable_memory_profiler | ||
| ? std::make_shared<rapidsmpf::Statistics>(stat_enabled_mr) | ||
| : std::make_shared<rapidsmpf::Statistics>(/* enable = */ true); | ||
| auto stats = std::make_shared<rapidsmpf::Statistics>(/* enable = */ true); | ||
|
|
||
| auto pinned_mr = args.pinned_mem_disable | ||
| ? rapidsmpf::PinnedMemoryResource::Disabled | ||
| : rapidsmpf::PinnedMemoryResource::make_if_available(); | ||
| auto br = std::make_shared<rapidsmpf::BufferResource>( | ||
| stat_enabled_mr, | ||
| args.pinned_mem_disable ? rapidsmpf::PinnedMemoryResource::Disabled | ||
| : rapidsmpf::PinnedMemoryResource::make_if_available(), | ||
| pinned_mr, | ||
| std::move(memory_available), | ||
| std::nullopt, | ||
| std::make_shared<rmm::cuda_stream_pool>( | ||
|
|
@@ -455,7 +456,17 @@ int main(int argc, char** argv) { | |
| } | ||
| log.print(ss.str()); | ||
| } | ||
| log.print(ctx->statistics()->report("Statistics (of the last run):")); | ||
|
|
||
| if (args.enable_memory_profiler) { | ||
| log.print(ctx->statistics()->report( | ||
| stat_enabled_mr, pinned_mr, "Statistics (of the last run):" | ||
| )); | ||
| } else { | ||
| log.print(ctx->statistics()->report( | ||
| std::nullopt, std::nullopt, "Statistics (of the last run):" | ||
| )); | ||
| } | ||
|
Comment on lines
+460
to
+468
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Let's make the MRs arguments after the header line, I think?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Most common use was |
||
|
|
||
| if (!use_bootstrap) { | ||
| RAPIDSMPF_MPI(MPI_Finalize()); | ||
| } | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| /** | ||
| * SPDX-FileCopyrightText: Copyright (c) 2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved. | ||
| * SPDX-License-Identifier: Apache-2.0 | ||
| */ | ||
|
|
||
| #pragma once | ||
|
|
||
| #include <cuda/memory_resource> | ||
|
|
||
| namespace rapidsmpf { | ||
|
|
||
| /// @brief Owning type-erased device memory resource. | ||
| using any_device_resource = cuda::mr::any_resource<cuda::mr::device_accessible>; | ||
|
|
||
| /// @brief Owning type-erased host- and device-accessible memory resource. | ||
| using any_host_device_resource = | ||
| cuda::mr::any_resource<cuda::mr::host_accessible, cuda::mr::device_accessible>; | ||
|
|
||
| } // namespace rapidsmpf |
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.
I think this file should be removed.