Skip to content

Commit 4189e46

Browse files
committed
Update on "Skip annotate boolean input"
Differential Revision: [D55946526](https://our.internmc.facebook.com/intern/diff/D55946526/) [ghstack-poisoned]
2 parents 37e529b + 34bc129 commit 4189e46

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

backends/qualcomm/quantizer/utils.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,11 @@ def _is_input_float_tensor(node: Node):
4646
"""Check if the input is not a float tensor, so that we can skip quantization for the node
4747
since observers only works with float Tensors
4848
"""
49-
if not isinstance(node, Node) or "val" not in node.meta or not isinstance(node.meta["val"], FakeTensor):
49+
if (
50+
not isinstance(node, Node)
51+
or "val" not in node.meta
52+
or not isinstance(node.meta["val"], FakeTensor)
53+
):
5054
return False
5155
return node.meta["val"].dtype == torch.float32
5256

0 commit comments

Comments
 (0)