# Does pytorch use tensor cores by default?

**URL:** <https://discuss.pytorch.org/t/does-pytorch-use-tensor-cores-by-default/167676>\
**Category:** Uncategorized\
**Created:** [December 6, 2022, 10:50am UTC](https://discuss.pytorch.org/t/does-pytorch-use-tensor-cores-by-default/167676 "2022-12-06T10:50:50Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![eqy](https://discuss.pytorch.org/user_avatar/discuss.pytorch.org/eqy/32/46233_2.png) [@eqy](https://discuss.pytorch.org/u/eqy)\
**Post date:** [December 6, 2022, 6:39pm UTC](https://discuss.pytorch.org/t/does-pytorch-use-tensor-cores-by-default/167676/2 "2022-12-06T18:39:32Z")

</div>

It would depend on the GPU, operations and data types being used. For Volta: fp16 should use tensor cores by default for common ops like matmul and conv. For Ampere and newer, fp16, bf16 should use tensor cores for common ops and fp32 for convs (via TF32). You can also enable tensor cores for fp32 matmuls on Ampere and newer via: [torch.set\_float32\_matmul\_precision — PyTorch 1.13 documentation](https://pytorch.org/docs/stable/generated/torch.set_float32_matmul_precision.html#torch.set_float32_matmul_precision) but it is not a default.

---

_[View the full topic](https://discuss.pytorch.org/t/does-pytorch-use-tensor-cores-by-default/167676)._
