Skip to content

Conversation

vkuzo
Copy link
Contributor

@vkuzo vkuzo commented Aug 5, 2025

Summary:

This is important for supporting mxfp4 training and inference, having a
benchmark is good to first see where we are.

Test Plan:

(pytorch) [vasiliy@devgpu007.eag6 ~/local/ao (main)]$ python benchmarks/mx_formats/cast_bench.py --mode dim0_mxfp4_floor
M 16384 K 16384 BLOCK_SIZE 32
GPU: NVIDIA H100
torch version: 2.9.0a0+git0142d5f
triton version: 3.3.0
mode: dim0_mxfp4_floor
/data/users/vasiliy/pytorch/torch/backends/cuda/__init__.py:131: UserWarning: Please use the new API settings to control TF32 behavior, such as torch.backends.cudnn.conv.fp32_precision = 'tf32' or torch.backends.cuda.matmul.fp32_precision = 'ieee'. Old settings, e.g, torch.backends.cuda.matmul.allow_tf32 = True, torch.backends.cudnn.allow_tf32 = True, allowTF32CuDNN() and allowTF32CuBLAS() will be deprecated after Pytorch 2.9. Please see https://pytorch.org/docs/main/notes/cuda.html#tensorfloat-32-tf32-on-ampere-and-later-devices (Triggered internally at /data/users/vasiliy/pytorch/aten/src/ATen/Context.cpp:80.)
  return torch._C._get_cublas_allow_tf32()
time_us 848.9919900894165
mem_bw_gbps 800.3341090749714

Reviewers:

Subscribers:

Tasks:

Tags:

[ghstack-poisoned]
@vkuzo
Copy link
Contributor Author

vkuzo commented Aug 5, 2025

Stack from ghstack (oldest at bottom):

Copy link

pytorch-bot bot commented Aug 5, 2025

🔗 Helpful Links

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

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

❗ 1 Active SEVs

There are 1 currently active SEVs. If your PR is affected, please view them below:

❌ 1 New Failure

As of commit a2d0bc9 with merge base 18edd01 (image):

NEW FAILURE - The following job has failed:

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

vkuzo added a commit that referenced this pull request Aug 5, 2025
Summary:

This is important for supporting mxfp4 training and inference, having a
benchmark is good to first see where we are.

Test Plan:

```bash
(pytorch) [vasiliy@devgpu007.eag6 ~/local/ao (main)]$ python benchmarks/mx_formats/cast_bench.py --mode dim0_mxfp4_floor
M 16384 K 16384 BLOCK_SIZE 32
GPU: NVIDIA H100
torch version: 2.9.0a0+git0142d5f
triton version: 3.3.0
mode: dim0_mxfp4_floor
/data/users/vasiliy/pytorch/torch/backends/cuda/__init__.py:131: UserWarning: Please use the new API settings to control TF32 behavior, such as torch.backends.cudnn.conv.fp32_precision = 'tf32' or torch.backends.cuda.matmul.fp32_precision = 'ieee'. Old settings, e.g, torch.backends.cuda.matmul.allow_tf32 = True, torch.backends.cudnn.allow_tf32 = True, allowTF32CuDNN() and allowTF32CuBLAS() will be deprecated after Pytorch 2.9. Please see https://pytorch.org/docs/main/notes/cuda.html#tensorfloat-32-tf32-on-ampere-and-later-devices (Triggered internally at /data/users/vasiliy/pytorch/aten/src/ATen/Context.cpp:80.)
  return torch._C._get_cublas_allow_tf32()
time_us 848.9919900894165
mem_bw_gbps 800.3341090749714
```

Reviewers:

Subscribers:

Tasks:

Tags:

ghstack-source-id: 99ca4ba
ghstack-comment-id: 3156206608
Pull Request resolved: #2693
@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 Aug 5, 2025
@vkuzo vkuzo added the topic: not user facing Use this tag if you don't want this PR to show up in release notes label Aug 5, 2025
@vkuzo vkuzo merged commit 5d99ce4 into main Aug 6, 2025
53 of 56 checks passed
liangel-02 pushed a commit that referenced this pull request Aug 25, 2025
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: not user facing Use this tag if you don't want this PR to show up in release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants