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

[LogisticRegression] Padding zeros to bypass the out-of-bound memory access of the raft stats (sum, mean, stddev) kernels #569

Merged
merged 4 commits into from
Feb 21, 2024

Conversation

lijinf2
Copy link
Collaborator

@lijinf2 lijinf2 commented Feb 20, 2024

This PR is a workaround to bypass gpu memory out-of-bound access of raft 24.02.

@lijinf2
Copy link
Collaborator Author

lijinf2 commented Feb 20, 2024

build

@@ -979,9 +979,33 @@ def _logistic_regression_fit(
if self.getStandardization() is True and is_sparse is True:
concated = concated.toarray()

num_pad_zero_cols = 0
if self.getStandardization() is True and concated.shape[1] % 32 != 0:
num_pad_zero_cols = concated.shape[1] % 32
Copy link
Collaborator

Choose a reason for hiding this comment

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

Shouldn't the number of padding columns be 32 - concated.shape[1] % 32 ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Good catch!

@lijinf2
Copy link
Collaborator Author

lijinf2 commented Feb 20, 2024

build

Copy link
Collaborator

@eordentlich eordentlich left a comment

Choose a reason for hiding this comment

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

Looks good. One more minor comment.

@@ -979,9 +979,35 @@ def _logistic_regression_fit(
if self.getStandardization() is True and is_sparse is True:
concated = concated.toarray()

num_pad_zero_cols = 0
Copy link
Collaborator

Choose a reason for hiding this comment

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

Maybe add a comment about why this is done and that it is temporary work around.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Sounds good. Added a comment.

@lijinf2
Copy link
Collaborator Author

lijinf2 commented Feb 20, 2024

build

@lijinf2
Copy link
Collaborator Author

lijinf2 commented Feb 21, 2024

build

Copy link
Collaborator

@eordentlich eordentlich left a comment

Choose a reason for hiding this comment

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

👍

@lijinf2 lijinf2 merged commit 8ad8215 into NVIDIA:branch-24.02 Feb 21, 2024
2 checks passed
@lijinf2 lijinf2 deleted the pad_zero branch April 4, 2024 19:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants