Home
last modified time | relevance | path

Searched refs:constant_tensor (Results 1 – 15 of 15) sorted by relevance

/external/tensorflow/tensorflow/lite/delegates/gpu/common/tasks/
Delementwise.cc251 const tflite::gpu::Tensor<Linear, DataType::FLOAT32>& constant_tensor, in CreateElementwiseTwoInput() argument
254 gpu_info, definition.src_tensors[0].GetDataType(), constant_tensor); in CreateElementwiseTwoInput()
258 const std::string s_coord = constant_tensor.shape.v == 1 ? "0" : "S_COORD"; in CreateElementwiseTwoInput()
262 if (constant_tensor.shape.v == 1) { in CreateElementwiseTwoInput()
277 const tflite::gpu::Tensor<HWC, DataType::FLOAT32>& constant_tensor, in CreateElementwiseTwoInput() argument
279 const BHWC shape = BHWC(1, constant_tensor.shape.h, constant_tensor.shape.w, in CreateElementwiseTwoInput()
280 constant_tensor.shape.c); in CreateElementwiseTwoInput()
283 const_tensor_desc.UploadData(constant_tensor); in CreateElementwiseTwoInput()
/external/executorch/backends/apple/mps/operators/
Dnode_visitor.py152 constant_tensor: torch.tensor,
161 constant_tensor = constant_tensor.contiguous()
162 hash = self.hash_tensor(constant_tensor)
166 id = self.get_serialized_id(constant_tensor, mps_graph, hash)
168 mps_data_type = edge_dtype_to_mps_dtype(constant_tensor.dtype)
170 constant_tensor, mps_graph, mps_data_type, id
172 dims = list(constant_tensor.shape)
/external/tensorflow/tensorflow/compiler/jit/
Dintroduce_floating_point_jitter_pass.cc86 Tensor constant_tensor; in IntroduceJitterToTensor() local
88 constant_tensor = Tensor(static_cast<float>(jitter_amount)); in IntroduceJitterToTensor()
90 constant_tensor = Tensor(Eigen::half(jitter_amount)); in IntroduceJitterToTensor()
96 ops::Const(s.WithOpName("jitter_amount"), constant_tensor); in IntroduceJitterToTensor()
/external/tensorflow/tensorflow/tools/benchmark/
Dbenchmark_model_test.cc39 Tensor constant_tensor(DT_FLOAT, constant_shape); in CreateTestGraph() local
40 test::FillFn<float>(&constant_tensor, [](int) -> float { return 3.0; }); in CreateTestGraph()
45 auto m = ops::MatMul(root, placeholder, constant_tensor); in CreateTestGraph()
/external/pytorch/test/fx/
Dtest_source_matcher_utils.py76 def __init__(self, constant_tensor: torch.Tensor) -> None:
78 self.constant_tensor = constant_tensor
94 c = a + self.constant_tensor
290 def __init__(self, constant_tensor: torch.Tensor) -> None:
292 self.constant_tensor = constant_tensor
308 c = a + self.constant_tensor
/external/tensorflow/tensorflow/compiler/mlir/tfr/tests/
Ddecompose.mlir191 // CHECK-NEXT: %[[none_min:.*]] = "tfr.constant_tensor"(%[[N_128]])
192 // CHECK-NEXT: %[[none_max:.*]] = "tfr.constant_tensor"(%[[N127]])
193 // CHECK-NEXT: %[[relu_min:.*]] = "tfr.constant_tensor"(%[[N42]])
194 // CHECK-NEXT: %[[relu_max:.*]] = "tfr.constant_tensor"(%[[N127]])
195 // CHECK-NEXT: %[[relu6_min:.*]] = "tfr.constant_tensor"(%[[N42]])
196 // CHECK-NEXT: %[[relu6_max:.*]] = "tfr.constant_tensor"(%[[N102]])
197 // CHECK-NEXT: %[[reluN1_1_min:.*]] = "tfr.constant_tensor"(%[[N32]])
198 // CHECK-NEXT: %[[reluN1_1_max:.*]] = "tfr.constant_tensor"(%[[N52]])
221 %input_scale_tensor = "tfr.constant_tensor"(%input_scale) : (f32) -> !tfr.tensor
222 %filter_scale_tensor = "tfr.constant_tensor"(%filter_scale) : (f32) -> !tfr.tensor
[all …]
Dops.mlir139 %0 = "tfr.constant_tensor"(%arg0) : (i32) -> tensor<i32>
147 %0 = "tfr.constant_tensor"(%arg0) : (vector<1x2xi32>) -> tensor<1x2xi32>
156 %1 = "tfr.constant_tensor"(%0) : (!tfr.attr) -> !tfr.tensor
165 %1 = "tfr.constant_tensor"(%0) : (i32) -> !tfr.tensor
173 %0 = "tfr.constant_tensor"(%arg0) : (i32) -> tensor<f32>
181 %0 = "tfr.constant_tensor"(%arg0) : (vector<1xi32>) -> tensor<?xi32>
189 %0 = "tfr.constant_tensor"(%arg0) : (vector<1xi32>) -> tensor<1xf32>
197 %0 = "tfr.constant_tensor"(%arg0) : (vector<1xi32>) -> tensor<1x1xi32>
205 %0 = "tfr.constant_tensor"(%arg0) : (i32) -> tensor<1x1xi32>
Dend2end.mlir142 %2 = "tfr.constant_tensor"(%alpha) : (f32) -> tensor<f32>
151 %axis_cst = "tfr.constant_tensor"(%axis) : (i32) -> tensor<i32>
212 %batch = "tfr.constant_tensor"(%batch_size) : (i64) -> tensor<i64>
214 %calls = "tfr.constant_tensor"(%num_parallel_calls) : (i64) -> tensor<i64>
216 %drop = "tfr.constant_tensor"(%drop_remainder) : (i1) -> tensor<i1>
Dcanonicalize.mlir41 %1 = "tfr.constant_tensor"(%0) : (!tfr.attr) -> !tfr.tensor
54 %1 = "tfr.constant_tensor"(%0) : (i32) -> !tfr.tensor
/external/tensorflow/tensorflow/tools/graph_transforms/
Dquantize_nodes_test.cc398 Tensor constant_tensor(DT_FLOAT, TensorShape({1, 2, 6, 1})); in TestQuantizeRelu() local
399 test::FillValues<float>(&constant_tensor, in TestQuantizeRelu()
402 Input::Initializer(constant_tensor)); in TestQuantizeRelu()
416 Tensor constant_tensor(DT_FLOAT, TensorShape({1, 2, 6, 1})); in TestQuantizeRelu6() local
417 test::FillValues<float>(&constant_tensor, in TestQuantizeRelu6()
420 Input::Initializer(constant_tensor)); in TestQuantizeRelu6()
434 Tensor constant_tensor(DT_FLOAT, TensorShape({1, 2, 6, 1})); in TestQuantizeMaxPool() local
435 test::FillValues<float>(&constant_tensor, in TestQuantizeMaxPool()
438 Input::Initializer(constant_tensor)); in TestQuantizeMaxPool()
453 Tensor constant_tensor(DT_FLOAT, TensorShape({1, 2, 6, 1})); in TestQuantizeAvgPool() local
[all …]
/external/pytorch/torch/onnx/_internal/exporter/
D_building.py269 constant_tensor = ir.tensor(value=arg, dtype=dtype) # type: ignore[arg-type]
270 constant_value = opset.Constant(value=constant_tensor)
404 constant_tensor = ir.tensor(value=val, dtype=dtype) # type: ignore[arg-type]
405 constant_value = opset.Constant(value=constant_tensor)
/external/executorch/exir/program/
D_program.py244 constant_tensor = getattr(ep.graph_module, node.target)
245 if not isinstance(constant_tensor, torch.Tensor):
257 constant_tensor, static_shapes=True
260 const_placeholder_node.meta["val"] = constant_tensor
261 const_placeholder_node.meta["val"].constant = constant_tensor
275 ep.state_dict[constant_tensor_fqn] = constant_tensor
/external/tensorflow/tensorflow/compiler/mlir/tfr/ir/
Dtfr_ops.td289 def TFR_ConstantTensorOp : TFR_Op<"constant_tensor", [NoSideEffect]> {
291 The `constant_tensor` operation converts the operand with non-built-in
298 %1 = tfr.constant_tensor(%0) : f32 -> tensor<f32>
299 %3 = tfr.constant_tensor(%2) : vector<1xf32> -> tensor<1xf32>
/external/tensorflow/tensorflow/lite/delegates/gpu/common/
Dmodel_builder.cc143 int constant_tensor = 1; in ParseInputsWithConstTensor() local
147 constant_tensor = 0; in ParseInputsWithConstTensor()
153 RETURN_IF_ERROR(reader->ReadTensor(constant_tensor, &tensor)); in ParseInputsWithConstTensor()
158 RETURN_IF_ERROR(reader->ReadTensor(constant_tensor, &tensor)); in ParseInputsWithConstTensor()
162 RETURN_IF_ERROR(reader->ReadTensor(constant_tensor, &tensor_hw)); in ParseInputsWithConstTensor()
170 RETURN_IF_ERROR(reader->ReadTensor(constant_tensor, &tensor)); in ParseInputsWithConstTensor()
/external/tensorflow/tensorflow/python/saved_model/
Dload_test.py1624 constant_tensor = constant_op.constant(10)
1627 f, 7, 1, 2, learning_rate=3, some_tensor=constant_tensor))