(type: IntegerType | FloatType | torch.dtype)
| 92 | |
| 93 | |
| 94 | def bitwidth(type: IntegerType | FloatType | torch.dtype): |
| 95 | if isinstance(type, torch.dtype): |
| 96 | return type.itemsize * 8 |
| 97 | return type.bitwidth |
| 98 | |
| 99 | |
| 100 | @dataclass |
no outgoing calls
no test coverage detected