Skip to content

Conversation

@vkuzo
Copy link
Contributor

@vkuzo vkuzo commented Oct 24, 2025

Summary:

Enables MX inference to support

  1. torch.inference_mode, by adding override for linear
  2. rank 3+ tensors, by reshaping a to 2d and back inside the linear
    override

Test Plan:

pytest test/prototype/mx_formats/test_inference_workflow.py -s -x -k test_inference_workflow_mx

Reviewers:

Subscribers:

Tasks:

Tags:

[ghstack-poisoned]
@vkuzo
Copy link
Contributor Author

vkuzo commented Oct 24, 2025

vkuzo added a commit that referenced this pull request Oct 24, 2025
Summary:

Enables MX inference to support
1. `torch.inference_mode`, by adding override for linear
2. rank 3+ tensors, by reshaping `a` to 2d and back inside the linear
   override

Test Plan:

```
pytest test/prototype/mx_formats/test_inference_workflow.py -s -x -k test_inference_workflow_mx
```

Reviewers:

Subscribers:

Tasks:

Tags:
ghstack-source-id: ddeab6d
ghstack-comment-id: 3440958838
Pull-Request: #3238
@pytorch-bot
Copy link

pytorch-bot bot commented Oct 24, 2025

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/ao/3238

Note: Links to docs will display an error until the docs builds have been completed.

✅ No Failures

As of commit f502a9e with merge base 53b5efd (image):
💚 Looks good so far! There are no failures yet. 💚

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@meta-cla meta-cla bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Oct 24, 2025
@vkuzo vkuzo added the topic: improvement Use this tag if this PR is an improvement (doesn't fit into any of the other categories) label Oct 24, 2025
Copy link
Contributor

@jerryzh168 jerryzh168 left a comment

Choose a reason for hiding this comment

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

LG, thanks for the fix!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. topic: improvement Use this tag if this PR is an improvement (doesn't fit into any of the other categories)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants