-
Notifications
You must be signed in to change notification settings - Fork 554
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
UMAP 32bits dispatch mechanism #6314
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Thanks for finishing out this change.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## branch-25.04 #6314 +/- ##
===============================================
Coverage ? 67.07%
===============================================
Files ? 202
Lines ? 13076
Branches ? 0
===============================================
Hits ? 8771
Misses ? 4305
Partials ? 0 ☔ View full report in Codecov by Sentry. |
/merge |
This PR has introduced an overflow when Looking through the code, I'm not sure I understand why we'd want to switch on this type at all? No arrays have Reproducer: import numpy as np
from cuml.manifold import UMAP
import rmm
rmm.mr.set_current_device_resource(rmm.mr.ManagedMemoryResource())
model = UMAP(
n_components=2,
n_neighbors=15,
build_algo="nn_descent",
init="random",
build_kwds={"nnd_n_clusters": 150},
)
# data is 130_000_000 x 512, float32
data = np.load("/path/to/large/data.npy", mmap_mode="r")
embeddings = model.fit_transform(data, data_on_host=True) I don't see where the overflow is occurring exactly ( |
Thanks for noticing and reporting the issue.The crash happens at a |
Thanks for tracking this down (and now that you point it out, I do remember the 2x factor post-symmetrize, but clearly both of us had forgotten it when looking at this dispatch code earlier).
|
Agree that the templating and dispatching mechanism might add unnecessary complexity in many places. The actually critical parts are :
It might be interesting to do a follow-up PR to simplify things by initializing to Regarding tracking down errors, it is possible to build with debug symbols, otherwise a simpler way to debug is simply to add print statements. It can also be interesting to call |
Answers #6310