You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Question: Does this project support bf16 or fp16 data types? #223
Hi, thanks for open-sourcing this project. It is very helpful for exploring DNN workloads on the NPU stack.
I am currently trying to evaluate reduced-precision workloads, especially torch.bfloat16 and torch.float16, for matmul-heavy models.
I would like to ask whether this project currently supports bf16 or fp16 data types end-to-end.
More specifically:
Does the current PyTorchSim / TOGSim stack support torch.bfloat16 or torch.float16 tensors?
If reduced precision is supported, is the intended behavior:
bf16/fp16 storage with bf16/fp16 compute, or
bf16/fp16 storage with fp32 accumulation?
Are there any specific configs, compiler flags, or codegen options required to enable bf16/fp16 matmul?
If bf16/fp16 is not currently supported, could you suggest where the support should be added first?
For context, the fp32 matmul path works on my side using the existing tests/test_matmul.py. When I changed the inputs to bf16 in a small matmul test, I encountered lowering/backend issues during compilation, so I wanted to confirm the intended support status before digging further.
Thanks again for the project. Any guidance would be appreciated.
Hi @hanm2019! Thanks for reaching out and for your interest in the project.
We are actually in the middle of updating the repository to support these data types! The PR is currently undergoing final review (#221), and we expect to release it to the master branch within this week.
In the upcoming version, you can simply set your PyTorch tensors to torch.float16, which will be stored as FP16 in DRAM and vector registers while the Systolic Array performs FP32 accumulation for numerical stability.
Activity
YWHyuk commentedon Apr 15, 2026
Hi @hanm2019! Thanks for reaching out and for your interest in the project.
We are actually in the middle of updating the repository to support these data types! The PR is currently undergoing final review (#221), and we expect to release it to the master branch within this week.
In the upcoming version, you can simply set your PyTorch tensors to torch.float16, which will be stored as FP16 in DRAM and vector registers while the Systolic Array performs FP32 accumulation for numerical stability.
hanm2019 commentedon Apr 15, 2026
Cool!