-
Notifications
You must be signed in to change notification settings - Fork 217
Add microbenchmarks #1140
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
base: main
Are you sure you want to change the base?
Add microbenchmarks #1140
Conversation
|
👋 Hi benlwalker! Thank you for contributing to ai-dynamo/nixl. Your PR reviewers will review your contribution then trigger the CI to test your changes. 🚀 |
The nixlTelemetryPlugin::getName() and getVersion() methods were returning std::string by value, creating temporary objects. The nixlTelemetryPluginHandle wrapper was calling .data() on these temporaries and returning the pointer, which became dangling once the temporary was destroyed. This bug was caught by GCC's -Werror=return-local-addr warning in release builds with optimizations enabled, causing compilation to fail. The methods now return references to member strings that remain valid for the lifetime of the plugin object, eliminating the dangling pointer. Signed-off-by: Ben Walker <[email protected]>
We are adding microbenchmarks to the test suite. These need to be compiled in release mode. Signed-off-by: Ben Walker <[email protected]>
31bb20d to
dd6a24d
Compare
benchmark Add a directory to be used for micro-benchmarks. The first benchmark added is for nixlAgent::makeXferReq Signed-off-by: Ben Walker <[email protected]>
dd6a24d to
42063b9
Compare
| protected: | ||
| void | ||
| SetUp() override { | ||
| env_.addVar("NIXL_TELEMETRY_ENABLE", "n"); |
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.
why is it needed? We may have other vars affecting perf, e.g. NIXL_LOG_LEVEL
(also it is disabled by default)
| @@ -0,0 +1,29 @@ | |||
| # SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved. | |||
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.
pls update all copyrights to 2026
What?
Add a new gtest directory to hold microbenchmarks. Then add a new benchmark for nixlAgent::makeXferReq.
Why?
These will allow us to test the performance of isolated pieces of NIXL easily.
How?
This is a gtest based test. It runs like the other unit tests. I could have used Google Benchmark but I didn't want to pull in another dependency.