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 max/min other value when int dtype and add int dtype tests #494

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

0x45f
Copy link
Collaborator

@0x45f 0x45f commented Mar 17, 2025

PR Category

Operator

Type of Change

Bug Fix

Description

The following code can reproduce the bug:

import torch
import flag_gems
import numpy as np

torch.set_default_device("cuda")

x = torch.tensor([1056, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024,
        1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024,
        1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024,
        1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024,
        1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024, 1024,
        1024, 1024, 1024, 1024, 1024], dtype=torch.int64)
# print(x.max())
with flag_gems.use_gems():
    print(x.max())

Issue

Progress

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

Performance

@0x45f 0x45f changed the title Fix max other value Fix max/min other value when int dtype and add int dtype tests Mar 18, 2025
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