Skip to content

fix fatals when 'max_seqlen_q' is 'numpy.int32' #796

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

Merged
merged 1 commit into from
Jul 17, 2025

Conversation

sgjzfzzf
Copy link
Collaborator

@sgjzfzzf sgjzfzzf commented Jul 17, 2025

PR Category

Operator

Type of Change

Bug Fix

Description

max_seqlen_q could be np.int32, but it only checks whether it's torch.Tensor now.

Issue

PR #781, #789

Progress

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

Performance

@sgjzfzzf sgjzfzzf requested a review from 0x45f July 17, 2025 07:30
@sgjzfzzf sgjzfzzf changed the title fix fatals when 'max_seqlen_q' is 'numpy.ndarray' fix fatals when 'max_seqlen_q' is 'numpy.int32' Jul 17, 2025
@iclementine
Copy link
Collaborator

triton jit function 目前对于参数的处理方式非常 ad-hoc. numpy scalar 和 python scalar 是不同的东西,需要额外的逻辑才能处理。

@sgjzfzzf sgjzfzzf merged commit 4b86823 into FlagOpen:master Jul 17, 2025
12 of 14 checks passed
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.

3 participants