Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #594 +/- ##
=======================================
Coverage 87.49% 87.50%
=======================================
Files 96 96
Lines 6781 6784 +3
=======================================
+ Hits 5933 5936 +3
Misses 848 848
|
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Fix multi-GPU cudaErrorLaunchFailure during cross-device result aggregation when using RMM without pool allocation (pool_allocator=False).
The error manifests as a MemoryError on a tiny allocation during Phase 4 (cross-device copy dev1 → dev0):
MemoryError: std::bad_alloc: CUDA error (failed to allocate 15592 bytes) at:
.../rmm/mr/cuda_memory_resource.hpp:51: cudaErrorLaunchFailure unspecified launch failure
Root cause: When CuPy's cp.asarray() performs a cross-device D2D copy and the result is consumed inline (
sums+= cp.asarray(data["sums"])), the fused allocation + copy + addition exposes a stale CUDA async error through cudaMalloc (called by RMM's cuda_memory_resource). Splitting the D2D copy into a separate assignment avoids this.The bug is hidden by:
Affected functions: edistance.pairwise, co_occurrence, moran, geary (all multi-GPU paths)
Fix: Split inline cp.asarray D2D copy + addition into two statements, and sync non-blocking streams instead of null stream where applicable.
Before (fails with RMM no-pool on large workloads)
After (works reliably)