rmm icon indicating copy to clipboard operation
rmm copied to clipboard

Replace all internal usage of `get_upstream` with `get_upstream_resource`

Open miscco opened this issue 11 months ago • 4 comments

We want to get away from raw resources, so prepare deprecation of it by replacing all internal usages

This PR relies on preparation in downstream repositories

miscco avatar Mar 01 '24 13:03 miscco

@miscco if you would like to merge this before downstream PRs, you could move the deprecations to a separate PR that won't be merged yet.

harrism avatar Mar 01 '24 21:03 harrism

I'd favor splitting this PR into the new functions and then the deprecations, it does seem to help with moving the work along.

bdice avatar Mar 01 '24 21:03 bdice

As far as I can see, there are two occurrences of get_upstream outside of rmm

https://github.com/rapidsai/cudf/pull/15203 https://github.com/rapidsai/raft/pull/2207

The only one I am not 100% sure how to get rid of is one other in raft where it explicitly checks whether a resource of of a given type, which is neither possible with the current resource_ref not is it desired

Given that those PRs are very small and limited in scope I believe we can wait a few days getting them in

miscco avatar Mar 03 '24 10:03 miscco

Also the RMM Cython needs to be updated, and all uses of its current method.

harrism avatar Mar 04 '24 03:03 harrism

@miscco does this PR also result in changing the semantics of MR equality as discussed in #1402 ?

harrism avatar Mar 06 '24 20:03 harrism

Also the RMM Cython needs to be updated, and all uses of its current method.

We decided that this didn't seem to be necessary, since, for now, the Cython get_upstream function doesn't call into C++ (it returns a member variable of the cython class).

wence- avatar Mar 08 '24 11:03 wence-

/merge

miscco avatar Mar 14 '24 16:03 miscco