Skip to content

Conversation

@vkuzo
Copy link
Contributor

@vkuzo vkuzo commented Nov 6, 2025

Summary:

Enables per-row float8 quantization of tensors with shape (B, K, N) across the K dimension.

TODO before land:

  1. [done] audit PerRow callsites across the codebase and see if anything else needs changing
  2. [done] verify serialization will not break

Test Plan:

Reviewers:

Subscribers:

Tasks:

Tags:

vkuzo added 3 commits November 5, 2025 12:49
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
@vkuzo
Copy link
Contributor Author

vkuzo commented Nov 6, 2025

Stack from ghstack (oldest at bottom):

@pytorch-bot
Copy link

pytorch-bot bot commented Nov 6, 2025

🔗 Helpful Links

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

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

✅ No Failures

As of commit b0d38ad with merge base 6259e98 (image):
💚 Looks good so far! There are no failures yet. 💚

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

vkuzo added a commit that referenced this pull request Nov 6, 2025
Summary:

Test Plan:

Reviewers:

Subscribers:

Tasks:

Tags:
ghstack-source-id: c40d96b
ghstack-comment-id: 3497584430
Pull-Request: #3303
@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 Nov 6, 2025
[ghstack-poisoned]
vkuzo added a commit that referenced this pull request Nov 6, 2025
Summary:

Test Plan:

Reviewers:

Subscribers:

Tasks:

Tags:
ghstack-source-id: a113126
ghstack-comment-id: 3497584430
Pull-Request: #3303
@vkuzo vkuzo changed the title [wip] float8 rowwise quant along row 1 of tensor rank 2 Enable PerRow(axis) to support axes other than -1 Nov 6, 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 Nov 6, 2025
[ghstack-poisoned]
vkuzo added a commit that referenced this pull request Nov 6, 2025
Summary:

Test Plan:

Reviewers:

Subscribers:

Tasks:

Tags:
ghstack-source-id: 688ac7b
ghstack-comment-id: 3497584430
Pull-Request: #3303
[ghstack-poisoned]
vkuzo added a commit that referenced this pull request Nov 6, 2025
Summary:

Test Plan:

Reviewers:

Subscribers:

Tasks:

Tags:
ghstack-source-id: efb2efb
ghstack-comment-id: 3497584430
Pull-Request: #3303
@vkuzo vkuzo changed the base branch from gh/vkuzo/164/head to main November 6, 2025 21:32
[ghstack-poisoned]
vkuzo added a commit that referenced this pull request Nov 6, 2025
Summary:

Test Plan:

Reviewers:

Subscribers:

Tasks:

Tags:
ghstack-source-id: d3d5c06
ghstack-comment-id: 3497584430
Pull-Request: #3303
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.

looks good

[ghstack-poisoned]
vkuzo added a commit that referenced this pull request Nov 7, 2025
Summary:

Test Plan:

Reviewers:

Subscribers:

Tasks:

Tags:
ghstack-source-id: 1a10e81
ghstack-comment-id: 3497584430
Pull-Request: #3303
[ghstack-poisoned]
vkuzo added a commit that referenced this pull request Nov 7, 2025
Summary:

Test Plan:

Reviewers:

Subscribers:

Tasks:

Tags:
ghstack-source-id: f396611
ghstack-comment-id: 3497584430
Pull-Request: #3303
[ghstack-poisoned]
vkuzo added a commit that referenced this pull request Nov 7, 2025
Summary:

Test Plan:

Reviewers:

Subscribers:

Tasks:

Tags:
ghstack-source-id: f511df3
ghstack-comment-id: 3497584430
Pull-Request: #3303
vkuzo added a commit that referenced this pull request Nov 7, 2025
Summary:

Test Plan:

Reviewers:

Subscribers:

Tasks:

Tags:
ghstack-source-id: f511df3
ghstack-comment-id: 3497584430
Pull-Request: #3303
[ghstack-poisoned]
vkuzo added a commit that referenced this pull request Nov 7, 2025
Summary:

Test Plan:

Reviewers:

Subscribers:

Tasks:

Tags:
ghstack-source-id: 4c8849d
ghstack-comment-id: 3497584430
Pull-Request: #3303
param_data = param.data
param_data = param_data.narrow(output_dim, start_idx, shard_size)
orig_value = param_data.qdata[0][0]
orig_values = param_data.qdata[0]
Copy link
Contributor Author

Choose a reason for hiding this comment

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

the original check failed by chance, the two tensors had the same value at [0][0]. Checking the first row is more resistant to chance.

[ghstack-poisoned]
vkuzo added a commit that referenced this pull request Nov 7, 2025
Summary:

Test Plan:

Reviewers:

Subscribers:

Tasks:

Tags:
ghstack-source-id: c4363b4
ghstack-comment-id: 3497584430
Pull-Request: #3303
[ghstack-poisoned]
vkuzo added a commit that referenced this pull request Nov 7, 2025
Summary:

Test Plan:

Reviewers:

Subscribers:

Tasks:

Tags:
ghstack-source-id: 901c271
ghstack-comment-id: 3497584430
Pull-Request: #3303
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.

4 participants