Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: liuxu623 The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (1)
Included review availability: Your plan provides up to 2 included reviews per hour; 0 remain after this review. 📝 WalkthroughWalkthroughThe CUDA memory wrappers now handle NULL output pointers and configured memory limits. Untracked pointers now reach the real driver free path. A GPU-free compatibility test covers query, free, accounting, locking, and error behavior. ChangesCUDA compatibility fixes
Priority: ➖ Normal Estimated code review effort: 3 (Moderate) | ~20 minutes Change: Bug fix · Severity of issue fixed: Medium Merge Risk: ⚪ Minimal · up to The added compatibility test is built, linked, and registered consistently with its intended CUDA regression coverage. 🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
Full details: Linked Issues checkExplanation The implementation addresses the two runtime defects in Resolution Add and register regression coverage for the Full details: Docstring CoverageExplanation Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 14 functions across 3 files. (1 skipped: 1 unsupported.)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. A rabbit frees a buffer bright Comment |
ed86a59 to
aa322f4
Compare
Signed-off-by: liuxu <liuxu623@gmail.com>
aa322f4 to
545efc8
Compare
| return -1; | ||
| /* External-memory mappings and other untracked pointers still belong | ||
| * to the driver. Do not adjust accounting for memory we did not track. */ | ||
| return cuMemoryFree(dptr); |
There was a problem hiding this comment.
#258 has been forwarding untracked pointers here since august. does this part need to land twice?
There was a problem hiding this comment.
OptiX can call
cuMemGetInfo_v2with an omitted output, which currently causes the hook to dereference NULL. Separately, CUDA pointers returned by external-memory mapping are not in the allocator's tracked list, so a validcuMemFree_v2call returns-1instead of reaching the driver.This change queries memory information into local variables, propagates driver errors, and writes only requested outputs while preserving virtual memory reporting and clamping subtraction at zero. Synchronous frees of untracked pointers now reach the real driver and return its result without changing allocation accounting. The existing tracked-pointer path is unchanged.
Fixes #321.
Validation
The patched render completed all seven logged synchronous frees successfully. Library provenance was checked with
dladdr; no diagnostic workaround shim was loaded. The full production library was compiled directly with GCC inside the target container using the hook/multiprocess options frombuild.sh; a complete CMake build was not run.Scope
The hardware comparison used a dedicated GPU with per-process library loading and a configured virtual memory quota to avoid loading both library versions together. Virtual memory reporting was verified, but shared scheduling, concurrent isolation, and full application end-to-end behavior were not validated.
This fixes compatibility and release behavior; it does not add quota enforcement or allocation tracking for Vulkan-owned external memory. Reporting a virtual quota does not demonstrate that external allocations are constrained by it. Existing error/accounting behavior for tracked frees is outside this change.
AI assistance was used for implementation, tests, and this description.
Summary by CodeRabbit
Bug Fixes
Tests