Skip to content

Conversation

@wujingyue
Copy link
Collaborator

@wujingyue wujingyue commented Nov 6, 2025

This gives a fair comparison between eager and other modes.

The constraints mentioned in the comment seem to have been fixed by pytorch/pytorch#161407

python thunder/benchmarks/benchmark_inference.py at head runs fine on both Blackwell and Ampere.

This gives a fair comparison between eager and other modes.

The constraints mentioned in the comment seem to have been fixed at
least for Blackwell.
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR enables the use of torch._grouped_mm in eager mode for benchmarking purposes, providing a fair comparison between eager and other modes. Previously, the function was only used during compilation (via torch.compiler.is_compiling() check). The constraints that prevented eager mode usage have been resolved.

Key changes:

  • Replaced torch.compiler.is_compiling() check with availability check based on _grouped_mm variable
  • Added else clause to set _grouped_mm = None for torch versions < 2.8.0
  • Removed outdated comment about constraints requiring offsets to be multiples of 16

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Collaborator

@crcrpar crcrpar 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 to me

Copy link
Collaborator

@mattteochen mattteochen left a comment

Choose a reason for hiding this comment

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

Thanks!

@wujingyue wujingyue enabled auto-merge (squash) November 11, 2025 15:58
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