MCPcopy Create free account
hub / github.com/pytorch/executorch / op_contains_bool_tensor

Function op_contains_bool_tensor

backends/vulkan/utils.py:468–480  ·  view source on GitHub ↗

Returns true if the operator used to compute the given node contains a bool tensor

(node: torch.fx.Node)

Source from the content-addressed store, hash-verified

466
467
468def op_contains_bool_tensor(node: torch.fx.Node) -> bool:
469 """
470 Returns true if the operator used to compute the given node contains a bool tensor
471 """
472 if is_tensor_node(node) and tensor_node_is_bool(node):
473 return True
474
475 for arg_node in node.args:
476 # pyre-ignore[6]
477 if is_tensor_node(arg_node) and tensor_node_is_bool(arg_node):
478 return True
479
480 return False
481
482
483def op_contains_high_dim_tensor(node: torch.fx.Node) -> bool:

Callers

nothing calls this directly

Calls 2

is_tensor_nodeFunction · 0.85
tensor_node_is_boolFunction · 0.85

Tested by

no test coverage detected