Skip to content

normalize.py: Use count_nonzero in place of the reduction kernels - #265

Open
mfep wants to merge 1 commit into
mainfrom
reduction-in-normalize-radway-97
Open

normalize.py: Use count_nonzero in place of the reduction kernels#265
mfep wants to merge 1 commit into
mainfrom
reduction-in-normalize-radway-97

Conversation

@mfep

@mfep mfep commented Sep 2, 2026

Copy link
Copy Markdown
Collaborator

@mfep
mfep requested a review from dkazanc September 2, 2026 14:49
)

clipped_total_up = int(count_greater_kernel(out, float32(upper_bound)))
clipped_total_up = cp.count_nonzero(out >= upper_bound)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I remember with CuPy 12.3 I started with this in-built function but it was performing poorly. I guess it has been improved. Will test.

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