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

CPU/GPU interoperability POC #4874

Merged
merged 29 commits into from
Oct 18, 2022

Conversation

viclafargue
Copy link
Contributor

No description provided.

@viclafargue viclafargue requested a review from a team as a code owner August 23, 2022 08:15
@github-actions github-actions bot added the Cython / Python Cython or Python issue label Aug 23, 2022
Copy link
Contributor

@wphicks wphicks left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks really great! I think it covers just about everything that's needed. Only thing I don't love is the name of interoperability.py, since I'm not sure it would be immediately clear to new developers what that refers to. Maybe device_selection.py or something else instead?

@caryr35 caryr35 added this to PR-WIP in v22.10 Release via automation Aug 29, 2022
@caryr35 caryr35 moved this from PR-WIP to PR-Needs review in v22.10 Release Aug 29, 2022
@dantegd dantegd added the 2 - In Progress Currenty a work in progress label Aug 30, 2022
viclafargue and others added 9 commits September 1, 2022 14:01
…sai#4862)

Removes possibility of another projects RAPIDS.cmake being used, and removes need to always download a version.

Authors:
  - Robert Maynard (https://github.com/robertmaynard)

Approvers:
  - Dante Gama Dessavre (https://github.com/dantegd)

URL: rapidsai#4862
For housekeeping, this PR removes unused cuDF imports across a variety of files.

It does not refactor any code that currently relies on cuDF.

Authors:
  - Nick Becker (https://github.com/beckernick)

Approvers:
  - Dante Gama Dessavre (https://github.com/dantegd)

URL: rapidsai#4873
Import treelite models into FIL in a different precision.

- e.g. load float64 treelite models as a float32 FIL model, or vice versa

Authors:
  - Andy Adinets (https://github.com/canonizer)
  - William Hicks (https://github.com/wphicks)

Approvers:
  - Philip Hyunsu Cho (https://github.com/hcho3)
  - William Hicks (https://github.com/wphicks)

URL: rapidsai#4839
- [x] All points distance membership vector
- [x] All points outlier membership vector
- [x] All points probability in some cluster
- [x] All points membership vector
- [x] Tests

Authors:
  - Tarang Jain (https://github.com/tarang-jain)

Approvers:
  - Corey J. Nolet (https://github.com/cjnolet)

URL: rapidsai#4800
@divyegala divyegala requested review from a team as code owners September 7, 2022 18:48
@divyegala divyegala added feature request New feature or request non-breaking Non-breaking change labels Sep 7, 2022
@beckernick
Copy link
Member

Gave this a test locally. It's really smooth! Quick comment:

  • When dispatching linear regression to CPU, the weights/bias attributes are not propagated back up to the cuML estimator -- they're accessible only via the underlying sk_model_. Ideally, cuML users won't need to think about the distinction between PGU and CPU dispatched models. They can access attributes in the same way regardless of hardware.
import cuml
from cuml.common.device_selection import using_device_type, set_global_device_type
from sklearn.datasets import make_regression

X, y = make_regression(
    n_samples=100000,
    noise=50,
    n_features=100,
)

set_global_device_type("cpu")

clf = cuml.linear_model.LinearRegression()
clf.fit(X,y)
print(clf.score(X, y))
print(clf.coef_, clf.intercept_)
0.9451533686273299
None None

@dantegd
Copy link
Member

dantegd commented Oct 5, 2022

rerun tests

@cjnolet
Copy link
Member

cjnolet commented Oct 6, 2022

I'm waiting on the raft packages to deploy to the rapidsai-nightly channel and then we should be able to rerun this PR.

@viclafargue
Copy link
Contributor Author

I'm waiting on the raft packages to deploy to the rapidsai-nightly channel and then we should be able to rerun this PR.

Should we remove the latest commit?

@cjnolet
Copy link
Member

cjnolet commented Oct 6, 2022

Should we remove the latest commit?

Yes. Though it might be easier to revert the commit so you don't have to rebase / force push.

@github-actions github-actions bot removed the CUDA/C++ label Oct 6, 2022
@cjnolet
Copy link
Member

cjnolet commented Oct 6, 2022

JFYI: We're still waiting for pylibraft / raft-dask to be deployed to conda, which could take another 25-40mins. I reverted the last commit in the meantime.

@cjnolet
Copy link
Member

cjnolet commented Oct 6, 2022

rerun tests

@viclafargue
Copy link
Contributor Author

rerun tests

@codecov-commenter
Copy link

Codecov Report

Base: 79.26% // Head: 79.30% // Increases project coverage by +0.04% 🎉

Coverage data is based on head (495c676) compared to base (d65121a).
Patch coverage: 95.12% of modified lines in pull request are covered.

Additional details and impacted files
@@               Coverage Diff                @@
##           branch-22.10    #4874      +/-   ##
================================================
+ Coverage         79.26%   79.30%   +0.04%     
================================================
  Files               181      183       +2     
  Lines             11540    11618      +78     
================================================
+ Hits               9147     9214      +67     
- Misses             2393     2404      +11     
Flag Coverage Δ
dask 46.10% <58.53%> (+0.07%) ⬆️
non-dask 68.77% <93.90%> (+0.11%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
python/cuml/common/array_descriptor.py 100.00% <ø> (ø)
python/cuml/common/input_utils.py 93.85% <50.00%> (-0.39%) ⬇️
python/cuml/internals/global_settings.py 91.89% <86.36%> (-8.11%) ⬇️
python/cuml/common/__init__.py 100.00% <100.00%> (ø)
python/cuml/common/device_selection.py 100.00% <100.00%> (ø)
python/cuml/common/memory_utils.py 82.35% <100.00%> (+2.47%) ⬆️
python/cuml/dask/common/base.py 94.44% <100.00%> (+0.03%) ⬆️
python/cuml/experimental/common/__init__.py 100.00% <100.00%> (ø)
python/cuml/explainer/common.py 88.57% <100.00%> (+0.16%) ⬆️
python/cuml/testing/utils.py 89.19% <100.00%> (+0.07%) ⬆️
... and 1 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@cjnolet
Copy link
Member

cjnolet commented Oct 7, 2022

@viclafargue webare past code freeze for 22.10 and decided to push this to 22.12. Can you base this ok the 22.12 branch?

@viclafargue viclafargue changed the base branch from branch-22.10 to branch-22.12 October 7, 2022 12:37
@dantegd
Copy link
Member

dantegd commented Oct 17, 2022

rerun tests

@caryr35 caryr35 added this to PR-WIP in v22.12 Release via automation Oct 18, 2022
@caryr35 caryr35 moved this from PR-WIP to PR-Reviewer approved in v22.12 Release Oct 18, 2022
@caryr35 caryr35 removed this from PR-Reviewer approved in v22.10 Release Oct 18, 2022
@dantegd
Copy link
Member

dantegd commented Oct 18, 2022

@gpucibot merge

@rapids-bot rapids-bot bot merged commit cd23871 into rapidsai:branch-22.12 Oct 18, 2022
v22.12 Release automation moved this from PR-Reviewer approved to Done Oct 18, 2022
jakirkham pushed a commit to jakirkham/cuml that referenced this pull request Feb 27, 2023
Authors:
  - Victor Lafargue (https://github.com/viclafargue)
  - Dante Gama Dessavre (https://github.com/dantegd)
  - Robert Maynard (https://github.com/robertmaynard)
  - Nick Becker (https://github.com/beckernick)
  - Andy Adinets (https://github.com/canonizer)
  - Tarang Jain (https://github.com/tarang-jain)
  - Divye Gala (https://github.com/divyegala)
  - Corey J. Nolet (https://github.com/cjnolet)

Approvers:
  - Dante Gama Dessavre (https://github.com/dantegd)
  - Corey J. Nolet (https://github.com/cjnolet)

URL: rapidsai#4874
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2 - In Progress Currenty a work in progress CMake Cython / Python Cython or Python issue feature request New feature or request non-breaking Non-breaking change
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

None yet

10 participants