Repository navigation
Make statistics a mandatory arg for statistics providers #1017
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
Closed
nirandaperera
wants to merge
16
commits into
rapidsai:main
from
nirandaperera:stat-mandatory-arg-for-providers
Closed
Changes from 14 commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
9445b50
making statistics mandatory arg
nirandaperera 2d93022
missing changes
nirandaperera a6803e6
set_stats
nirandaperera 891af67
Revert "set_stats"
nirandaperera 2ce411f
reset from options
nirandaperera 36cd37a
revert
nirandaperera 2eca536
set stats and weak ptr
nirandaperera 9ae3d1c
move progress thread to communicator
nirandaperera 9f0c309
Merge branch 'main' of github.com:rapidsai/rapidsmpf into stat-mandat…
nirandaperera 5659dc0
Apply suggestions from code review
nirandaperera 4e0d47c
addressing initial comments
nirandaperera bdda47a
Merge branch 'stat-mandatory-arg-for-providers' of github.com:niranda…
nirandaperera 37ff748
addressing comments
nirandaperera 78d8a04
add test
nirandaperera ab50f50
addressing comments
nirandaperera 30df058
Merge branch 'main' of github.com:rapidsai/rapidsmpf into stat-mandat…
nirandaperera File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -324,7 +324,9 @@ int main(int argc, char** argv) { | |
|
|
||
| // Initialize configuration options from environment variables. | ||
| rapidsmpf::config::Options options{rapidsmpf::config::get_environment_variables()}; | ||
| auto progress_thread = std::make_shared<rapidsmpf::ProgressThread>(); | ||
|
|
||
| auto stats = rapidsmpf::Statistics::create(); | ||
| auto progress_thread = std::make_shared<rapidsmpf::ProgressThread>(stats); | ||
|
|
||
| std::shared_ptr<rapidsmpf::Communicator> comm; | ||
| if (args.comm_type == "mpi") { | ||
|
|
@@ -364,20 +366,11 @@ int main(int argc, char** argv) { | |
| memory_limits[rapidsmpf::MemoryType::DEVICE] = args.device_mem_limit_mb << 20; | ||
| } | ||
|
|
||
| auto stats = rapidsmpf::Statistics::create(); | ||
|
|
||
| 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, | ||
| pinned_mr, | ||
| std::move(memory_limits), | ||
| std::nullopt, | ||
| std::make_shared<rmm::cuda_stream_pool>( | ||
| 16, rmm::cuda_stream::flags::non_blocking | ||
| ), | ||
| stats | ||
| stats, stat_enabled_mr, pinned_mr, std::move(memory_limits) | ||
|
nirandaperera marked this conversation as resolved.
Outdated
|
||
| ); | ||
|
|
||
| auto& log = *comm->logger(); | ||
|
|
@@ -411,7 +404,7 @@ int main(int argc, char** argv) { | |
| for (std::uint64_t i = 0; i < total_num_runs; ++i) { | ||
| // Clear statistics before the last run so only the final run is reported. | ||
| if (i == total_num_runs - 1) { | ||
| ctx->statistics()->clear(); | ||
| stats->clear(); | ||
| } | ||
|
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. Does the
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. It does, but its the same as |
||
| double const elapsed = run(ctx, comm, args, stream).count(); | ||
| std::stringstream ss; | ||
|
|
@@ -458,15 +451,14 @@ int main(int argc, char** argv) { | |
| log.print(ss.str()); | ||
| } | ||
|
|
||
| auto statistics = ctx->statistics(); | ||
| if (args.enable_memory_profiler) { | ||
| log.print(statistics->report({ | ||
| log.print(stats->report({ | ||
| .mr = stat_enabled_mr, | ||
| .pinned_mr = pinned_mr, | ||
| .header = "Statistics (of the last run):", | ||
| })); | ||
| } else { | ||
| log.print(statistics->report({.header = "Statistics (of the last run):"})); | ||
| log.print(stats->report({.header = "Statistics (of the last run):"})); | ||
| } | ||
|
|
||
| if (!use_bootstrap) { | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.