Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 9 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ Example:

```python
import torch
from mmasim.nv_ptx.sim import MMA # for "mma.sync" instructions
from mmasim.amd.sim import MFMA # for "v_mfma" instructions
from mmasim.nv_ptx import MMA # for "mma.sync" instructions
from mmasim.amd import MFMA # for "v_mfma" instructions

# mma.sync.aligned.m16n8k16.row.col.f32.f16.f16.f32 (PTX)
# or HMMA.16816.F32 (SASS)
Expand Down Expand Up @@ -66,7 +66,7 @@ Example:

```python
import torch
from mmasim.nv_ptx.sim import MMA
from mmasim.nv_ptx import MMA
from mmasim_kernels.nv_ptx.rtx_blackwell import mma_kernels

mma_sim = MMA("RTX Blackwell", "m16n8k16.f32.f16.f16.f32")
Expand All @@ -86,7 +86,12 @@ Additionally, you can run test scripts in [tests/equivalence](tests/equivalence)
## Citation

```
Coming soon
@inproceedings{xie_bit-accurate_2026,
title = {Bit-{Accurate} {Modeling} of {GPU} {Matrix} {Multiply}-{Accumulate} {Units}: {Demystifying} {Numerical} {Discrepancy} and {Accuracy}},
booktitle = {Annual {IEEE}/{ACM} {International} {Symposium} on {Microarchitecture} ({MICRO})},
author = {Xie, Peichen and Xu, Shuotao and Wang, Yang and Yang, Fan and Yang, Mao},
year = {2026},
}
```

## Contributing
Expand Down
2 changes: 2 additions & 0 deletions src/mmasim/mmasim/nv_ptx/sim.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ def __init__(self, arch: str, shape_and_type: str):
e_zero = -20 if self.c_type == torch.float16 else -131
elif self.arch in ["Turing", "Ampere", "Ada Lovelace"]:
e_zero = -21 if self.c_type == torch.float16 else -132
elif self.arch == "Hopper":
e_zero = -21 if self.c_type == torch.float16 else -133
else: # Blackwell, RTX Blackwell
e_zero = -22 if self.c_type == torch.float16 else -133
self.arithmetic_op = fdpa.MMA_T_FDPA(F, rho, L_max, e_zero)
Expand Down
2 changes: 1 addition & 1 deletion src/mmasim/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "mmasim"
version = "2.0.2"
version = "2.0.3"
authors = [{ name="Peichen Xie", email="peichenxie@microsoft.com" }]
requires-python = ">=3.10"
dependencies = ["torch>=2.9", "ninja"]
Expand Down
4 changes: 2 additions & 2 deletions src/mmasim_kernels/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ build-backend = "setuptools.build_meta"

[project]
name = "mmasim-kernels"
version = "2.0.2"
version = "2.0.3"
authors = [{ name="Peichen Xie", email="peichenxie@microsoft.com" }]
requires-python = ">=3.10"
dependencies = ["mmasim>=2.0.2"]
dependencies = ["mmasim>=2.0.3"]

[tool.setuptools.packages.find]
where = ["."]
Expand Down
Loading