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

[fix] fix bug of argmax.py when the dim-th dimension is less than BLOCK_M #476

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ConvolutedDog
Copy link

@ConvolutedDog ConvolutedDog commented Mar 4, 2025

PR Category

Operator

Type of Change

Bug Fix

Description

Fix bug of argmax.py when the dim-th dimension is less than BLOCK_M.

Issue

None

Progress

  • Change is properly reviewed (1 reviewer required, 2 recommended).
  • Change is responded to an issue.
  • Change is fully covered by a UT.

Performance

None

@ConvolutedDog ConvolutedDog changed the title [fix] fix bug of argmax.py when the dim-th dimension equals to 1 [fix] fix bug of argmax.py when the dim-th dimension is less than BLOCK_M Mar 4, 2025
@StrongSpoon
Copy link
Collaborator

截屏2025-03-05 14 10 41
function argmax works well on my device. could you please show me what the bug is?

@ConvolutedDog
Copy link
Author

Can you try to get into this example, I'm not sure if it's a bug with my env:

image

@StrongSpoon
Copy link
Collaborator

It's a bug and I have reproduced it. This is caused by the improper parallelism. When the input tensor is of shape [3, 64, 55, 55], the variable K is 193600, and it exceeds the upper bound of grid size on the second dimension.
In my view, the resolution is to design a better lambda function of grid, thus allowing larger size of K.

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