Home
last modified time | relevance | path

Searched refs:tensor_node (Results 1 – 3 of 3) sorted by relevance

/aosp_15_r20/external/pytorch/aten/src/ATen/native/nested/
H A DNestedTensorUtils.h340 TensorNode tensor_node, in wrap_tensor_node() argument
346 !tensor_node.is_leaf(), "Expected TensorNode to wrap a list of Tensors."); in wrap_tensor_node()
350 if (tensor_node.degree() == 0) { in wrap_tensor_node()
359 auto first_dtype = tensor_node.children(0).dtype(); in wrap_tensor_node()
360 std::vector<long> start_offsets(tensor_node.degree()); in wrap_tensor_node()
363 for (const auto i : c10::irange(tensor_node.degree())) { in wrap_tensor_node()
364 all_tensors_cpu = all_tensors_cpu && tensor_node.children(i).is_cpu(); in wrap_tensor_node()
366 all_tensors_contiguous && tensor_node.children(i).is_contiguous(); in wrap_tensor_node()
368 (first_dtype == tensor_node.children(i).dtype()); in wrap_tensor_node()
375 start_offsets[i - 1] + tensor_node.children(i - 1).numel(); in wrap_tensor_node()
[all …]
/aosp_15_r20/external/executorch/backends/xnnpack/operators/
H A Dquant_params.py248 cls, tensor_node: torch.fx.Node, ep: Optional[ExportedProgram] = None
250 if not is_dequant(tensor_node):
254 src = tensor_node
272 cls, tensor_node: torch.fx.Node, ep: ExportedProgram
275 if is_dequant(tensor_node) and TagImplicitQDqPass.is_tagged_as_implicit_q_dq(
276 tensor_node
278 dq_input = cast(torch.fx.Node, tensor_node.args[0])
283 return cls.from_q_dq_node(tensor_node)
288 def from_outputs(cls, tensor_node: torch.fx.Node) -> Optional[QuantParams]:
290 if len(tensor_node.users) == 1:
[all …]
/aosp_15_r20/external/pytorch/torch/csrc/jit/passes/quantization/
H A Dinsert_quant_dequant.cpp175 Node* tensor_node = graph->create( in insertScalarToTensor() local
178 Value* tensor_output = tensor_node->output(); in insertScalarToTensor()
180 graph->insertNode(tensor_node); in insertScalarToTensor()
182 scalar_value->replaceAllUsesAfterNodeWith(tensor_node, tensor_output); in insertScalarToTensor()
183 return tensor_node; in insertScalarToTensor()