Check if the node's tensor is a float tensor, so that we can skip quantization for the node since observers only works with float Tensors
(node: Node)
| 80 | |
| 81 | |
| 82 | def _is_float_tensor(node: Node): |
| 83 | """Check if the node's tensor is a float tensor, |
| 84 | so that we can skip quantization for the node |
| 85 | since observers only works with float Tensors |
| 86 | """ |
| 87 | if not _is_fake_tensor(node): |
| 88 | return False |
| 89 | return node.meta["val"].dtype in [torch.float32, torch.float16] |
| 90 | |
| 91 | |
| 92 | def _mark_nodes_as_annotated(nodes: List[Node]): |
no test coverage detected