Skip to content

Conversation

@benlwalker
Copy link
Contributor

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.

@benlwalker benlwalker requested a review from a team as a code owner December 17, 2025 16:03
@copy-pr-bot
Copy link

copy-pr-bot bot commented Dec 17, 2025

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@github-actions
Copy link

👋 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]>
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]>
protected:
void
SetUp() override {
env_.addVar("NIXL_TELEMETRY_ENABLE", "n");
Copy link
Contributor

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.
Copy link
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants