-
Notifications
You must be signed in to change notification settings - Fork 197
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
[BUG] raft::allocate bypasses RMM #308
Comments
Not sure where you found that allocate that indeed it shouldn’t be around unless it’s for a test perhaps? But in general the allocate that is used by raft (and cuML) is here
Cc @viclafargue since you’re doing the raft rmm refactor, it’d be good to double check nothing in the main code is using this cudamalloc |
Yes, with the RAFT refactor, raft/cpp/include/raft/cudart_utils.h Lines 268 to 277 in 7725a80
The new design of |
@dantegd it's in And it's called all over the place (both RAFT and cuML), not just in tests. Just search the codebase for |
Moreover, very little code should need to call As an example, if you search for this string in libcudf it comes up 10 times, 8 of which are inside allocators. And I think all 10 will be gone from libcudf in the near future. |
@harrism I fully agree, though I commented that it is in tests mostly since I did the searchfor cpp/src/ml_mg_utils.cuh
cpp/src_prims/metrics/scores.cuh Just was curious if I missed some place else. Regardless of that, the PR of @viclafargue should solve the issue of bypassing, and yes the whole codebase is moving to use containers directly and has been for a while, can't find an issue on a quick search though, @divyegala would you happen to know if we have an issue for use of containers? |
OK, I see now it's mostly in tests. I do see it in That said, why is it OK for test code to be lower quality than core library code? If the tests allocate most memory using a raw byte allocator, that means they are using raw pointers. No Raw Pointers is an important goal to achieve, so I would add a corollary: No Raw Allocation. Second, bypassing RMM in tests is a bad idea, as it means you can't easily switch the underlying memory resource used in the tests to help isolate behavior happening in real apps where RMM MRs are used. |
@harrism I could remove it from
|
@viclafargue this now should have been dealt with #286, correct? Should we update the issue or open a new one about removing |
|
I'm reopening this because there are still calls to This is a great example of why RMM clients should use |
Sorry, just saw there are new issues opened. Do they cover all uses of MR->allocate()? |
Well, replacing |
This issue has been labeled |
This issue has been labeled |
Answers #308. Requires the appropriate changes in `cuML` and `cuGraph` before merging. Authors: - Victor Lafargue (https://github.com/viclafargue) Approvers: - Corey J. Nolet (https://github.com/cjnolet) URL: #400
Describe the bug
Surprised to see that this quite commonly called function (in RAFT and cuML) calls directly into cudaMalloc, making memory pool use impossible.
The text was updated successfully, but these errors were encountered: