Skip to content
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

[FEA] Provide an escape hatch to libraries that operate cudf aware #17524

Open
galipremsagar opened this issue Dec 5, 2024 · 0 comments · May be fixed by #17629
Open

[FEA] Provide an escape hatch to libraries that operate cudf aware #17524

galipremsagar opened this issue Dec 5, 2024 · 0 comments · May be fixed by #17629
Assignees
Labels
cudf.pandas Issues specific to cudf.pandas feature request New feature or request

Comments

@galipremsagar
Copy link
Contributor

Is your feature request related to a problem? Please describe.
cudf.pandas acts a proxy layer wrapped around cudf or pandas objects. There are libraries like xgboost and cuml that choose different code-paths or handle the objects differently depending on if the object is residing on GPU memory or CPU memory. A classic example is xgboost:

https://github.com/dmlc/xgboost/blob/c0f1f568996a059abfa799d2fa4b6433de894a09/python-package/xgboost/sklearn.py#L1578-L1603

When cudf.pandas objects go through these code-flows, it becomes harder and more compute/transfer intensive to move cudf.pandas objects to CPU memory. The reason being cudf.pandas objects will never pass is_cudf_.. checks and rather will always pass is_pandas_... checks. Thus cudf.pandas objects end up being forced to take CPU code paths. This can be avoided if we provide a public API that can be called on cudf.pandas proxy objects to return a GPU object.

I recently made a fix to xgboost as a stop-gap measure to make cudf.pandas proxy objects extract GPU objects: dmlc/xgboost#11014

Rather than accessing private attributes, it would be better to have a public API that will return the GPU object.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cudf.pandas Issues specific to cudf.pandas feature request New feature or request
Projects
Status: In Progress
2 participants