Skip to content
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

Device max memory watermark tracking #2392

Merged
merged 11 commits into from
Sep 24, 2024

Conversation

zpuller
Copy link
Contributor

@zpuller zpuller commented Sep 10, 2024

Unblocks NVIDIA/spark-rapids#11457

Adds tracking of the max memory allocated on device over the lifespan of each task, and exposes this metric so that the Spark RAPIDS plugin can hook it up to a Spark accumulator.

Signed-off-by: Zach Puller <[email protected]>
Signed-off-by: Zach Puller <[email protected]>
@zpuller zpuller marked this pull request as draft September 11, 2024 15:13
Copy link
Collaborator

@revans2 revans2 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking good.

src/main/cpp/src/SparkResourceAdaptorJni.cpp Outdated Show resolved Hide resolved
Signed-off-by: Zach Puller <[email protected]>
Signed-off-by: Zach Puller <[email protected]>
Signed-off-by: Zach Puller <[email protected]>
Signed-off-by: Zach Puller <[email protected]>
@zpuller zpuller changed the title [DRAFT] Device metrics Device max memory watermark tracking Sep 17, 2024
@zpuller zpuller marked this pull request as ready for review September 17, 2024 18:40
@zpuller
Copy link
Contributor Author

zpuller commented Sep 17, 2024

build

1 similar comment
@zpuller
Copy link
Contributor Author

zpuller commented Sep 18, 2024

build

src/main/cpp/src/SparkResourceAdaptorJni.cpp Outdated Show resolved Hide resolved
@@ -1360,6 +1375,11 @@ class spark_resource_adaptor final : public rmm::mr::device_memory_resource {
}
transition(thread->second, thread_state::THREAD_RUNNING);
thread->second.is_cpu_alloc = false;
// num_bytes is likely not padded, which could cause slight inaccuracies
// but for now it shouldn't matter for watermark purposes
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please make sure that we document this in the metrics page when it is fully ready

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Which page are you referring to exactly?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

src/main/cpp/src/SparkResourceAdaptorJni.cpp Outdated Show resolved Hide resolved
Signed-off-by: Zach Puller <[email protected]>
Signed-off-by: Zach Puller <[email protected]>
src/main/cpp/src/SparkResourceAdaptorJni.cpp Outdated Show resolved Hide resolved
src/main/cpp/src/SparkResourceAdaptorJni.cpp Outdated Show resolved Hide resolved
src/main/cpp/src/SparkResourceAdaptorJni.cpp Outdated Show resolved Hide resolved
src/main/cpp/src/SparkResourceAdaptorJni.cpp Show resolved Hide resolved
src/main/cpp/src/SparkResourceAdaptorJni.cpp Outdated Show resolved Hide resolved
Signed-off-by: Zach Puller <[email protected]>
revans2
revans2 previously approved these changes Sep 23, 2024
@revans2
Copy link
Collaborator

revans2 commented Sep 23, 2024

build

Signed-off-by: Zach Puller <[email protected]>
@zpuller
Copy link
Contributor Author

zpuller commented Sep 23, 2024

build

Signed-off-by: Zach Puller <[email protected]>
@zpuller
Copy link
Contributor Author

zpuller commented Sep 23, 2024

build

@revans2 revans2 merged commit 8fb2f38 into NVIDIA:branch-24.10 Sep 24, 2024
3 checks passed
@zpuller zpuller deleted the device_metrics branch October 9, 2024 20:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants