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

[REVIEW] Avoid useless copy when exchanging flag buffers in CSR WeakCC #3096

Merged
merged 4 commits into from
Nov 12, 2020

Conversation

Nyrio
Copy link
Contributor

@Nyrio Nyrio commented Oct 30, 2020

As I was going through the DBSCAN code, I noticed that in the CSR Weak Connected Components implementation, the flag buffers are exchanged with memory copies (and, worse, with 2 device->host and 2 host->device copies).

This can be done by simply switching the pointers. It is faster, uses less memory, and more elegant.

@Nyrio Nyrio requested a review from a team as a code owner October 30, 2020 19:25
@GPUtester
Copy link
Contributor

Can one of the admins verify this patch?

1 similar comment
@GPUtester
Copy link
Contributor

Can one of the admins verify this patch?

@GPUtester
Copy link
Contributor

Please update the changelog in order to start CI tests.

View the gpuCI docs here.

@codecov-io
Copy link

codecov-io commented Oct 30, 2020

Codecov Report

Merging #3096 (a6d4fdb) into branch-0.17 (a6622de) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@             Coverage Diff              @@
##           branch-0.17    #3096   +/-   ##
============================================
  Coverage        69.38%   69.38%           
============================================
  Files              193      193           
  Lines            14704    14704           
============================================
  Hits             10203    10203           
  Misses            4501     4501           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a6622de...a6d4fdb. Read the comment docs.

Copy link
Member

@teju85 teju85 left a comment

Choose a reason for hiding this comment

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

Thanks Louis for the PR. One minor comment.

cpp/src_prims/sparse/csr.cuh Outdated Show resolved Hide resolved
@Nyrio Nyrio requested a review from teju85 November 2, 2020 12:03
@dantegd dantegd added 4 - Waiting on Reviewer Waiting for reviewer to review or respond CUDA / C++ CUDA issue labels Nov 2, 2020
Copy link
Member

@teju85 teju85 left a comment

Choose a reason for hiding this comment

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

Changes LGTM. Thanks @Nyrio for the fix.

@teju85 teju85 merged commit 708ae47 into rapidsai:branch-0.17 Nov 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
4 - Waiting on Reviewer Waiting for reviewer to review or respond CUDA / C++ CUDA issue
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants