-
Notifications
You must be signed in to change notification settings - Fork 22
[MINOR] Adding a RAPIDSMPF_DETAIL mode
#612
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
Open
nirandaperera
wants to merge
9
commits into
rapidsai:main
Choose a base branch
from
nirandaperera:adding-debug-mode
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
d9197cd
adding a debug mode
nirandaperera 1bed432
minor change
nirandaperera 1e1307c
rename macro
nirandaperera d2829c1
Merge branch 'main' of github.com:rapidsai/rapidsmpf into adding-debu…
nirandaperera 1fc278b
renamed macro
nirandaperera 11dfcc6
Merge branch 'main' of github.com:rapidsai/rapidsmpf into adding-debu…
nirandaperera 0451c53
Merge branch 'main' into adding-debug-mode
nirandaperera 68b90f4
Update cpp/CMakeLists.txt
nirandaperera 30d771d
Merge branch 'main' into adding-debug-mode
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -171,7 +171,7 @@ class Shuffler::Progress { | |
| * @return The progress state of the shuffler. | ||
| */ | ||
| ProgressThread::ProgressState operator()() { | ||
| RAPIDSMPF_NVTX_SCOPED_RANGE("Shuffler.Progress", p_iters++); | ||
| RAPIDSMPF_NVTX_SCOPED_RANGE_VERBOSE("Shuffler.Progress", p_iters++); | ||
| auto const t0_event_loop = Clock::now(); | ||
|
|
||
| // Tags for each stage of the shuffle | ||
|
|
@@ -186,7 +186,7 @@ class Shuffler::Progress { | |
| { | ||
| auto const t0_send_metadata = Clock::now(); | ||
| auto ready_chunks = shuffler_.outgoing_postbox_.extract_all_ready(); | ||
| RAPIDSMPF_NVTX_SCOPED_RANGE("meta_send", ready_chunks.size()); | ||
| RAPIDSMPF_NVTX_SCOPED_RANGE_VERBOSE("meta_send", ready_chunks.size()); | ||
| for (auto&& chunk : ready_chunks) { | ||
| // All messages in the chunk maps to the same key (checked by the PostBox) | ||
| // thus we can use the partition ID of the first message in the chunk to | ||
|
|
@@ -226,8 +226,10 @@ class Shuffler::Progress { | |
| // `incoming_chunks_`. | ||
| { | ||
| auto const t0_metadata_recv = Clock::now(); | ||
| RAPIDSMPF_NVTX_SCOPED_RANGE("meta_recv"); | ||
| RAPIDSMPF_NVTX_SCOPED_RANGE_VERBOSE("meta_recv"); | ||
| #if RAPIDSMPF_VERBOSE_INFO | ||
| int i = 0; | ||
| #endif | ||
| while (true) { | ||
| auto const [msg, src] = shuffler_.comm_->recv_any(metadata_tag); | ||
| if (msg) { | ||
|
|
@@ -245,17 +247,23 @@ class Shuffler::Progress { | |
| } else { | ||
| break; | ||
| } | ||
| #if RAPIDSMPF_VERBOSE_INFO | ||
| i++; | ||
| #endif | ||
| } | ||
| stats.add_duration_stat( | ||
| "event-loop-metadata-recv", Clock::now() - t0_metadata_recv | ||
| ); | ||
| #if RAPIDSMPF_VERBOSE_INFO | ||
| RAPIDSMPF_NVTX_MARKER("meta_recv_iters", i); | ||
| #endif | ||
|
Comment on lines
+257
to
+259
Member
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. Or better than renaming |
||
| } | ||
|
|
||
| // Post receives for incoming chunks | ||
| { | ||
| RAPIDSMPF_NVTX_SCOPED_RANGE("post_chunk_recv", incoming_chunks_.size()); | ||
| RAPIDSMPF_NVTX_SCOPED_RANGE_VERBOSE( | ||
| "post_chunk_recv", incoming_chunks_.size() | ||
| ); | ||
| auto const t0_post_incoming_chunk_recv = Clock::now(); | ||
| for (auto it = incoming_chunks_.begin(); it != incoming_chunks_.end();) { | ||
| auto& [src, chunk] = *it; | ||
|
|
@@ -342,7 +350,7 @@ class Shuffler::Progress { | |
| // requested data. | ||
| { | ||
| auto const t0_init_gpu_data_send = Clock::now(); | ||
| RAPIDSMPF_NVTX_SCOPED_RANGE( | ||
| RAPIDSMPF_NVTX_SCOPED_RANGE_VERBOSE( | ||
| "init_gpu_send", | ||
| std::transform_reduce( | ||
| ready_ack_receives_.begin(), | ||
|
|
@@ -379,7 +387,9 @@ class Shuffler::Progress { | |
| // Check if any data in transit is finished. | ||
| { | ||
| auto const t0_check_future_finish = Clock::now(); | ||
| RAPIDSMPF_NVTX_SCOPED_RANGE("check_fut_finish", in_transit_futures_.size()); | ||
| RAPIDSMPF_NVTX_SCOPED_RANGE_VERBOSE( | ||
| "check_fut_finish", in_transit_futures_.size() | ||
| ); | ||
| if (!in_transit_futures_.empty()) { | ||
| std::vector<ChunkID> finished = | ||
| shuffler_.comm_->test_some(in_transit_futures_); | ||
|
|
@@ -439,7 +449,9 @@ class Shuffler::Progress { | |
| std::unordered_map<Rank, std::vector<std::unique_ptr<Communicator::Future>>> | ||
| ready_ack_receives_; ///< Receives matching ready for data messages. | ||
|
|
||
| #if RAPIDSMPF_VERBOSE_INFO | ||
| int64_t p_iters = 0; ///< Number of progress iterations (for NVTX) | ||
| #endif | ||
| }; | ||
|
|
||
| std::vector<PartID> Shuffler::local_partitions( | ||
|
|
||
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.
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.
Nit: now that this needs guards, rename
ito something a bit more descriptive.