Home
last modified time | relevance | path

Searched refs:tensor_list (Results 1 – 25 of 57) sorted by relevance

123

/external/tensorflow/tensorflow/compiler/mlir/tfr/tests/
Dops.mlir18 func private @tensor_list_type_noconstraint() -> !tfr.tensor_list
23 func private @tensor_list_type_array_like() -> !tfr.tensor_list<[N, T]>
28 func private @tensor_list_type_tuple_like() -> !tfr.tensor_list<input_T>
43 func @call_op(%arg0: !tfr.tensor<T>, %arg1: !tfr.tensor_list<TL>, %arg2: i32) -> !tfr.tensor<K> {
44 …%0 = tfr.call @Foo(%arg0, %arg1, %arg2) : (!tfr.tensor<T>, !tfr.tensor_list<TL>, i32) -> !tfr.tens…
233 func @get_element(%arg0: !tfr.tensor_list<T>) -> !tfr.tensor {
235 %0 = tfr.get_element %arg0[%cst] : (!tfr.tensor_list<T>, index) -> !tfr.tensor
242 func @build_list(%arg0: !tfr.tensor<A>, %arg1: !tfr.tensor<B>) -> !tfr.tensor_list {
243 %0 = "tfr.build_list"(%arg0, %arg1) : (!tfr.tensor<A>, !tfr.tensor<B>) -> !tfr.tensor_list
244 return %0 : !tfr.tensor_list
[all …]
Ddecompose.mlir22 %arg1: !tfr.tensor_list,
24 -> !tfr.tensor_list {
26 %1 = tfr.get_element %arg1[%arg2] : (!tfr.tensor_list, index) -> !tfr.tensor
28 %3 = "tfr.build_list"(%0, %2) : (!tfr.tensor, !tfr.tensor) -> !tfr.tensor_list
29 tfr.return %3 : !tfr.tensor_list
32 // CHECK-NEXT: %[[ge:.*]] = tfr.get_element %arg1[%arg2] : (!tfr.tensor_list, index) -> !tfr.tensor
34 … %[[bl:.*]] = "tfr.build_list"(%[[id1]], %[[id2]]) : (!tfr.tensor, !tfr.tensor) -> !tfr.tensor_list
35 // CHECK-NEXT: tfr.return %[[bl]] : !tfr.tensor_list
Draise_to_tf.mlir4 tfr.func @tf__risc_concat_(!tfr.tensor_list<N, T>) -> !tfr.tensor<T> attributes {T, N}
5 tfr.func @tf__risc_split_(!tfr.tensor<T>, i32 {tfr.name="N"}) -> !tfr.tensor_list<N, T> attributes …
42 %3 = "tfr.build_list"(%0, %1, %2) : (!tfr.tensor, !tfr.tensor, !tfr.tensor) -> !tfr.tensor_list
43 %concat = tfr.call @tf__risc_concat(%3) : (!tfr.tensor_list) -> !tfr.tensor
56 %split = tfr.call @tf__risc_split(%0, %n) : (!tfr.tensor, i32) -> !tfr.tensor_list
58 %s0 = tfr.get_element %split[%i0] : (!tfr.tensor_list, index) -> !tfr.tensor
Dend2end.mlir157 tfr.func @tf__my_pack(%values: !tfr.tensor_list,
163 %v1 = tfr.get_element %values[%index] : (!tfr.tensor_list, index) -> !tfr.tensor
171 %v = tfr.get_element %values[%i] : (!tfr.tensor_list, index) -> !tfr.tensor
181 tfr.func @tf__my_add_n(%values: !tfr.tensor_list,
186 %v1 = tfr.get_element %values[%index] : (!tfr.tensor_list, index) -> !tfr.tensor
193 %v = tfr.get_element %values[%i] : (!tfr.tensor_list, index) -> !tfr.tensor
204 %other_arguments: !tfr.tensor_list,
219 …: (!tfr.tensor, !tfr.tensor, !tfr.tensor, !tfr.tensor, !tfr.tensor_list, !tfr.attr, !tfr.attr, !tf…
233 …ch_dataset_v0_(!tfr.tensor<T>, !tfr.tensor, !tfr.tensor, !tfr.tensor, !tfr.tensor_list<Targuments>,
Dcontrol_flow.mlir3 tfr.func @tf__my_pack(%values: !tfr.tensor_list,
9 %v1 = tfr.get_element %values[%index] : (!tfr.tensor_list, index) -> !tfr.tensor
17 %v = tfr.get_element %values[%i] : (!tfr.tensor_list, index) -> !tfr.tensor
/external/tensorflow/tensorflow/python/training/
Dinput.py328 def slice_input_producer(tensor_list, num_epochs=None, shuffle=True, seed=None, argument
363 with ops.name_scope(name, "input_producer", tensor_list):
364 tensor_list = ops.convert_n_to_tensor_or_indexed_slices(tensor_list)
365 if not tensor_list:
368 range_size = array_ops.shape(tensor_list[0])[0]
375 output = [array_ops.gather(t, index) for t in tensor_list]
383 return [tensor for tensor_list in tensor_list_list for tensor in tensor_list]
466 def _as_original_type(original_tensors, tensor_list): argument
471 tensor_list = [tensor_list]
472 return {k: tensor_list[i]
[all …]
/external/tensorflow/tensorflow/lite/kernels/internal/
Dportable_tensor.h37 const TfLiteIntArray& tensor_list) { in VectorOfTensors() argument
38 int num_tensors = tensor_list.size; in VectorOfTensors()
45 TfLiteTensor* t = &context.tensors[tensor_list.data[i]]; in VectorOfTensors()
81 const TfLiteIntArray& tensor_list) in VectorOfQuantizedTensors() argument
82 : VectorOfTensors<uint8_t>(context, tensor_list) { in VectorOfQuantizedTensors()
83 for (int i = 0; i < tensor_list.size; ++i) { in VectorOfQuantizedTensors()
84 TfLiteTensor* t = &context.tensors[tensor_list.data[i]]; in VectorOfQuantizedTensors()
/external/tensorflow/tensorflow/core/kernels/
Dlist_kernels.h48 const TensorList& tensor_list, int index,
69 const TensorList* tensor_list = nullptr; in Compute() local
70 OP_REQUIRES_OK(c, GetInputList(c, 0, &tensor_list)); in Compute()
72 c, element_dtype_ == tensor_list->element_dtype, in Compute()
75 " but list elements ", DataTypeString(tensor_list->element_dtype))); in Compute()
77 OP_REQUIRES(c, tensor_list->tensors().size() == num_elements_, in Compute()
81 tensor_list->tensors().size(), " elements.")); in Compute()
84 OP_REQUIRES_OK(c, GetElementShapeFromInput(c, *tensor_list, 1, in Compute()
89 !tensor_list->tensors().empty(), in Compute()
96 if (!tensor_list->element_shape.IsFullyDefined()) { in Compute()
[all …]
/external/tensorflow/tensorflow/python/autograph/lang/
Dspecial_functions_test.py43 l = special_functions.tensor_list([],
50 l = special_functions.tensor_list((),
58 l = special_functions.tensor_list(
66 special_functions.tensor_list(np.array([1, 2, 3]))
71 special_functions.tensor_list([])
76 l = special_functions.tensor_list(elements)
84 l = special_functions.tensor_list(elements, use_tensor_array=True)
/external/tensorflow/tensorflow/python/data/experimental/ops/
Dcompression_ops.py35 tensor_list = structure.to_tensor_list(element_spec, element)
36 return ged_ops.compress_element(tensor_list)
53 tensor_list = ged_ops.uncompress_element(
55 return structure.from_tensor_list(output_spec, tensor_list)
/external/tensorflow/tensorflow/python/framework/
Dpython_api_parameter_converter.cc266 PyObject* tensor_list = params[index]; in ConvertInputsWithTypeAttr() local
267 DCHECK(PyList_CheckExact(tensor_list)); in ConvertInputsWithTypeAttr()
268 Py_ssize_t num_tensors = PyList_GET_SIZE(tensor_list); in ConvertInputsWithTypeAttr()
269 PyObject** tensors = PyList_ITEMS(tensor_list); in ConvertInputsWithTypeAttr()
288 PyObject* tensor_list = params[index]; in ConvertInputsWithTypeAttr() local
289 DCHECK(PyList_CheckExact(tensor_list)); in ConvertInputsWithTypeAttr()
290 Py_ssize_t num_tensors = PyList_GET_SIZE(tensor_list); in ConvertInputsWithTypeAttr()
291 PyObject** items = PyList_ITEMS(tensor_list); in ConvertInputsWithTypeAttr()
362 PyObject* tensor_list = params[index]; in ConvertInputsWithTypeListAttr() local
363 DCHECK(PyList_CheckExact(tensor_list)); in ConvertInputsWithTypeListAttr()
[all …]
Dtype_spec.py242 def _from_tensor_list(self, tensor_list): argument
256 self.__check_tensor_list(tensor_list)
257 return self._from_compatible_tensor_list(tensor_list)
259 def _from_compatible_tensor_list(self, tensor_list): argument
271 self._component_specs, tensor_list, expand_composites=True))
338 def __check_tensor_list(self, tensor_list): argument
340 specs = [type_spec_from_value(t) for t in tensor_list]
346 "with %s" % (i, tensor_list[i], s2))
528 tensor_list = self._to_tensor_list(value)
529 if any(t.shape.ndims == 0 for t in tensor_list):
[all …]
Dsparse_tensor.py341 def _from_components(self, tensor_list): argument
342 if (all(isinstance(t, np.ndarray) for t in tensor_list) and
344 return SparseTensorValue(*tensor_list)
346 return SparseTensor(*tensor_list)
374 def _from_compatible_tensor_list(self, tensor_list): argument
375 tensor_list = gen_sparse_ops.deserialize_sparse(tensor_list[0], self._dtype)
376 indices, values, dense_shape = tensor_list
Dindexed_slices.py260 def _from_components(self, tensor_list): argument
261 if (all(isinstance(t, np.ndarray) for t in tensor_list) and
263 if len(tensor_list) == 2:
264 return IndexedSlicesValue(tensor_list[0], tensor_list[1], None)
266 return IndexedSlicesValue(*tensor_list)
268 return IndexedSlices(*tensor_list)
Dtensor_spec.py195 def _from_compatible_tensor_list(self, tensor_list): argument
202 assert len(tensor_list) == 1
203 tensor_list[0].set_shape(self._shape)
204 return tensor_list[0]
/external/tensorflow/tensorflow/python/data/util/
Dstructure.py189 def _from_tensor_list_helper(decode_fn, element_spec, tensor_list): argument
211 if sum(flat_spec_lengths) != len(tensor_list):
213 (sum(flat_spec_lengths), len(tensor_list)))
218 value = tensor_list[i:i + num_flat_values]
224 def from_compatible_tensor_list(element_spec, tensor_list): argument
244 element_spec, tensor_list)
247 def from_tensor_list(element_spec, tensor_list): argument
268 tensor_list)
/external/tensorflow/tensorflow/compiler/mlir/tfr/ir/
Dtfr_ops.td102 TFR_AttrType.predicate]>, "tfr.tensor_list or tfr.attr type">;
121 %2 = tfr.call @my_add(%0, %1) : (tfr.tensor, f32) -> tfr.tensor_list
125 tfr.tensor_list, tfr.attr and mlir float and integer types. The results of
126 the `call` operation can only be with tfr.tensor and tfr.tensor_list types.
309 tfr.tensor_list.
319 TFR_TensorListType:$tensor_list,
327 $tensor_list `[` $index `]` attr-dict `:`
328 `(` type($tensor_list) `,` type($index) `)` `->` type($out)
341 (tfr.tensor, tfr.tensor, tfr.tensor) -> tfr.tensor_list
356 tfr.tensor_list.
[all …]
Dtfr_ops.cc202 if (auto tensor_list = arg_type.dyn_cast<TFRTensorListType>()) { in Verify() local
207 auto used = tensor_list.getAttrKeys(); in Verify()
279 if (auto tensor_list = result_type.dyn_cast<TFRTensorListType>()) { in Verify() local
284 auto used = tensor_list.getAttrKeys(); in Verify()
461 ge_op.tensor_list().getDefiningOp()); in matchAndRewrite()
483 gl_op.tensor_list().getDefiningOp()); in matchAndRewrite()
/external/tensorflow/tensorflow/compiler/mlir/tfr/resources/
Ddecomposition_lib.mlir10 tfr.func @tf__my_add_n(%values: !tfr.tensor_list,
15 %v1 = tfr.get_element %values[%index] : (!tfr.tensor_list, index) -> !tfr.tensor
22 %v = tfr.get_element %values[%i] : (!tfr.tensor_list, index) -> !tfr.tensor
31 tfr.func @tf__my_add_n_(!tfr.tensor_list<N,T>, i64 {tfr.name="N"}) -> !tfr.tensor attributes {N,T}
/external/tensorflow/tensorflow/python/autograph/converters/
Dlists_test.py59 l = special_functions.tensor_list([1])
73 l = special_functions.tensor_list([1, 2, 3])
/external/tensorflow/tensorflow/python/distribute/
Dinput_lib_type_spec_test.py110 tensor_list = spec._to_components(iterator)
111 re_iterator = spec._from_components(tensor_list)
311 tensor_list = spec._to_components(iterator)
312 re_iterator = spec._from_components(tensor_list)
440 tensor_list = spec._to_components(iterator)
441 re_iterator = spec._from_components(tensor_list)
/external/tensorflow/tensorflow/python/autograph/utils/
D__init__.py24 from tensorflow.python.autograph.utils.tensor_list import dynamic_list_append
/external/tensorflow/tensorflow/python/ops/
Dmap_fn.py579 tensor_list = elems_value_batchable[i:i + len(spec._flat_tensor_specs)]
580 elems_value_flat.append(spec._from_compatible_tensor_list(tensor_list))
581 i += len(tensor_list)
Dwhile_v2.py245 tensor_list = list_ops.empty_tensor_list(
249 loop_vars.append(tensor_list)
253 cond_graph.capture(tensor_list)
258 tensor_list, intermediate_tensor)
1158 tensor_list = list_ops.empty_tensor_list(
1163 self.extra_inputs.append(tensor_list)
1168 accumulator = list_ops.tensor_list_push_back(tensor_list, tensor)
1176 self._forward_cond_graph.capture(tensor_list)
/external/tensorflow/tensorflow/compiler/tf2xla/
Dgraph_compiler.cc101 const xla::XlaOp& tensor_list = expressions[i]->handle(); in PrepareArguments() local
102 arg.shape = tensor_list.builder()->GetShape(tensor_list).ValueOrDie(); in PrepareArguments()

123