-
Notifications
You must be signed in to change notification settings - Fork 61
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
CDLP optimizations #94
Comments
I was thinking about we could parallelize the "min mode" selection in the CDLP algorithm. A possible approach would be:
Alternatively, we could parallelize the current RLE loop. See e.g. https://erkaman.github.io/posts/cuda_rle.html. |
Hi Gábor :) @szarnyasg I think it's possible with 4 elems in a tuple - what do you think about the following? def acc(a, b):
a_left_value, a_left_count, a_right_value, a_right_count = a
b_left_value, b_left_count, b_right_value, b_right_count = b
right_value, right_count = b_right_value, b_right_count
if a_right_value == b_left_count:
left_value, left_count = a_right_value, a_right_count + b_left_count
if left_value == b_right_value:
right_value, right_count = left_value, left_count
if a_left_count > left_count:
left_value, left_count = a_left_value, a_left_count
else:
if a_left_count > b_left_count:
left_value, left_count = a_left_value, a_left_count
else:
left_value, left_count = b_left_value, b_left_count
return left_value, left_count, right_value, right_count |
Hi @aaronzo, unfortunately, I have stopped contributing to LAGraph due to my other obligations. Your algorithm looks good! I hope it will work both in terms of correctness / performance. Cheers, Gabor |
While doing 51fd40f, I observed a few opportunities for optimizing the CDLP algorithm:
l = diag^{-1} (L)
, e.g. GrB_extractTuplesAdditionally:
The text was updated successfully, but these errors were encountered: