(node: Node)
| 229 | |
| 230 | # getting QuantAnnot though the first input |
| 231 | def _get_quantization_annotation(node: Node): |
| 232 | if node.op == "placeholder": |
| 233 | return False |
| 234 | elif "quantization_annotation" in node.meta: |
| 235 | return node |
| 236 | elif node.args == (): |
| 237 | return False |
| 238 | elif isinstance(node.args[0], Node): |
| 239 | return _get_quantization_annotation(node.args[0]) |
| 240 | elif isinstance(node.args[0], list): |
| 241 | # for cat, concatenate and stack |
| 242 | if isinstance(node.args[0][0], Node): |
| 243 | return _get_quantization_annotation(node.args[0][0]) |
| 244 | else: |
| 245 | return False |
| 246 | else: |
| 247 | return False |
| 248 | |
| 249 | |
| 250 | # CASE 2-2: two input case with Shared Quant |
no outgoing calls
no test coverage detected