PLUGINS/UCX: Timeout warning for device memory list creation. - #1410
Conversation
|
👋 Hi rakhmets! Thank you for contributing to ai-dynamo/nixl. Your PR reviewers will review your contribution then trigger the CI to test your changes. 🚀 |
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
📝 WalkthroughWalkthroughAdds a centralized Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Poem
🚥 Pre-merge checks | ✅ 1 | ❌ 2❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (1 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
📝 Coding Plan
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
src/plugins/ucx/mem_list.cpp (1)
20-35:⚠️ Potential issue | 🔴 CriticalMove
<chrono>and<thread>out of the#elsebranch.The function
createMemListat line 146 is defined only whenHAVE_UCX_GPU_DEVICE_APIis defined, yet it usesstd::chrono::steady_clock,std::chrono_literals, andstd::this_thread::sleep_for(lines 155, 161, 163, 169). However, the headers<chrono>and<thread>are placed in the#elsebranch (lines 30, 34), making the GPU build dependent on transitive includes. Move these headers outside the preprocessor block or place them inside the#ifdef HAVE_UCX_GPU_DEVICE_APIbranch to ensure proper compilation.Suggested fix
+#include <chrono> +#include <thread> + `#ifdef` HAVE_UCX_GPU_DEVICE_API `#include` "common/configuration.h" `#include` "rkey.h" `#include` "ucx_backend.h" `#include` "ucx_utils.h" @@ -#else -#include <chrono> +#else `#include` <exception> `#include` <string> `#include` <string_view> -#include <thread> `#endif`🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@src/plugins/ucx/mem_list.cpp` around lines 20 - 35, The build breaks because createMemList (defined when HAVE_UCX_GPU_DEVICE_API is set) uses std::chrono and std::this_thread but the <chrono> and <thread> headers are incorrectly placed in the `#else` branch; move the headers so they are available when HAVE_UCX_GPU_DEVICE_API is defined—either include <chrono> and <thread> above the `#ifdef` HAVE_UCX_GPU_DEVICE_API block or add them inside the `#ifdef` branch alongside the other includes—so functions like createMemList, uses of std::chrono::steady_clock, std::chrono_literals, and std::this_thread::sleep_for compile without relying on transitive includes.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Outside diff comments:
In `@src/plugins/ucx/mem_list.cpp`:
- Around line 20-35: The build breaks because createMemList (defined when
HAVE_UCX_GPU_DEVICE_API is set) uses std::chrono and std::this_thread but the
<chrono> and <thread> headers are incorrectly placed in the `#else` branch; move
the headers so they are available when HAVE_UCX_GPU_DEVICE_API is defined—either
include <chrono> and <thread> above the `#ifdef` HAVE_UCX_GPU_DEVICE_API block or
add them inside the `#ifdef` branch alongside the other includes—so functions like
createMemList, uses of std::chrono::steady_clock, std::chrono_literals, and
std::this_thread::sleep_for compile without relying on transitive includes.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro
Run ID: b7e733d9-3bef-401d-bdaf-68856dce5186
📒 Files selected for processing (1)
src/plugins/ucx/mem_list.cpp
Signed-off-by: Raul Akhmetshin <rakhmetshin@nvidia.com>
a141f87 to
c28081d
Compare
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@src/plugins/ucx/mem_list.cpp`:
- Around line 158-166: The NIXL_WARN message in the retry loop around
ucp_device_remote_mem_list_create (uses variables timeout, start, check_timeout
and env key NIXL_UCX_TIMEOUT_WARNING) currently implies a hard failure; change
the log text to indicate it's only a warning that the retry wait has reached the
configured duration (e.g., "Reached warning threshold of X ms, still
waiting/retrying") and explicitly state that NIXL_UCX_TIMEOUT_WARNING is
interpreted as milliseconds when logging or documenting; keep the existing
behavior of setting check_timeout = false so the message only appears once.
- Around line 40-43: Move the constexpr std::string_view error_message out of
the nixl::ucx namespace and into an anonymous namespace at the top of the .cpp
to give it internal linkage (e.g., namespace { constexpr std::string_view
error_message{"Failed to create device memory list"}; }), remove the original
declaration inside namespace nixl::ucx, and leave all uses of error_message
unchanged so the symbol is now file-local per the project's implementation-file
convention.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro
Run ID: 6c62554f-d3f2-4e09-8cd1-16b5cb3ed3c4
📒 Files selected for processing (1)
src/plugins/ucx/mem_list.cpp
Signed-off-by: Raul Akhmetshin <rakhmetshin@nvidia.com>
|
/build |
Signed-off-by: Raul Akhmetshin <rakhmetshin@nvidia.com>
|
/build |
What?
Added a warning message in case the time limit for creating the device memory list is exceeded.
Applied logic from the Device API V1 #947.
Summary by CodeRabbit