Home
last modified time | relevance | path

Searched refs:array_segments (Results 1 – 18 of 18) sorted by relevance

/external/tensorflow/tensorflow/lite/
Dmodel_test.cc443 ASSERT_EQ(t1->sparsity->dim_metadata[0].array_segments, nullptr); in TEST()
448 TfLiteIntArray* array_segments = TfLiteIntArrayCreate(3); in TEST() local
449 array_segments->data[0] = 0; in TEST()
450 array_segments->data[1] = 2; in TEST()
451 array_segments->data[2] = 3; in TEST()
452 ASSERT_TRUE(TfLiteIntArrayEqual(t1->sparsity->dim_metadata[1].array_segments, in TEST()
453 array_segments)); in TEST()
454 TfLiteIntArrayFree(array_segments); in TEST()
466 ASSERT_EQ(t1->sparsity->dim_metadata[2].array_segments, nullptr); in TEST()
471 ASSERT_EQ(t1->sparsity->dim_metadata[3].array_segments, nullptr); in TEST()
Dinterpreter_builder.cc96 if (src->array_segments() == nullptr || src->array_indices() == nullptr) { in ParseSparseIndexVector()
102 status = Copy(src->array_segments_as_Int32Vector(), &tgt->array_segments); in ParseSparseIndexVector()
106 Copy(src->array_segments_as_Uint16Vector(), &tgt->array_segments); in ParseSparseIndexVector()
109 status = Copy(src->array_segments_as_Uint8Vector(), &tgt->array_segments); in ParseSparseIndexVector()
/external/tensorflow/tensorflow/lite/tools/optimize/sparsity/
Dformat_converter.cc235 TfLiteIntArrayToVector(sparsity.dim_metadata[i].array_segments); in FormatConverter()
295 const auto& array_segments = dim_metadata_[metadata_idx]; in Populate() local
297 for (int i = array_segments[prev_idx]; i < array_segments[prev_idx + 1]; in Populate()
/external/tensorflow/tensorflow/lite/c/
Dcommon.c129 TfLiteIntArrayFree(metadata.array_segments); in TfLiteSparsityFree()
130 metadata.array_segments = NULL; in TfLiteSparsityFree()
Dcommon_test.cc135 t.sparsity->dim_metadata[1].array_segments = TfLiteIntArrayCreate(2); in TEST()
Dcommon.h356 TfLiteIntArray* array_segments; member
/external/tensorflow/tensorflow/lite/kernels/internal/optimized/sparse_ops/
Dfully_connected.h49 const int* w1_segments = sparsity.dim_metadata[1].array_segments->data; in FullyConnectedSparseWeight()
96 const int* w1_segments = sparsity.dim_metadata[1].array_segments->data; in FullyConnectedSparseWeight1x4Impl()
/external/tensorflow/tensorflow/lite/kernels/
Dfully_connected.cc63 sparsity->dim_metadata[1].array_segments->size - 1; in CreateLedgerTensor()
70 const auto* array_segments = sparsity->dim_metadata[1].array_segments; in PopulateLedgerData() local
74 for (int i = 0; i < array_segments->size - 1; i++) { in PopulateLedgerData()
75 int row_start = array_segments->data[i]; in PopulateLedgerData()
76 int row_end = array_segments->data[i + 1]; in PopulateLedgerData()
Dtest_util.h238 auto array_segments = in AddConstSparseInput() local
248 SparseIndexVector_Int32Vector, array_segments, in AddConstSparseInput()
310 auto array_segments =
320 SparseIndexVector_Int32Vector, array_segments,
Dlstm.cc104 sparsity->dim_metadata[1].array_segments->size - 1; in make_ledger()
113 const auto* array_segments = sparsity->dim_metadata[1].array_segments; in copy_ledger() local
118 for (int i = 0; i < array_segments->size - 1; i++) { in copy_ledger()
119 int row_start = array_segments->data[i]; in copy_ledger()
120 int row_end = array_segments->data[i + 1]; in copy_ledger()
/external/tensorflow/tensorflow/lite/python/interpreter_wrapper/
Dinterpreter_wrapper.cc125 const auto* array_segments = param.dim_metadata[i].array_segments; in PyDictFromSparsityParam() local
129 PyArrayFromIntVector(array_segments->data, array_segments->size)); in PyDictFromSparsityParam()
/external/tensorflow/tensorflow/compiler/mlir/lite/
Dflatbuffer_export.cc1868 BufferOffset<void> array_segments; in BuildSparsityParameters() local
1876 array_segments = tflite::CreateUint8Vector( in BuildSparsityParameters()
1883 array_segments = tflite::CreateUint16Vector( in BuildSparsityParameters()
1888 array_segments = tflite::CreateInt32Vector( in BuildSparsityParameters()
1927 array_segments, indices_type, array_indices); in BuildSparsityParameters()
/external/tensorflow/tensorflow/lite/schema/
Dschema_v3a.fbs146 // - If format is DimensionType.SPARSE_CSR then we use array_segments and
147 // array_indices to encode that dimension. array_segments represents how
154 array_segments:SparseIndexVector;
Dschema.fbs150 // - If format is DimensionType.SPARSE_CSR then we use array_segments and
151 // array_indices to encode that dimension. array_segments represents how
158 array_segments:SparseIndexVector;
Dschema_generated.h3449 tflite::SparseIndexVectorUnion array_segments;
3476 const void *array_segments() const {
3481 …arseIndexVector_Int32Vector ? static_cast<const tflite::Int32Vector *>(array_segments()) : nullptr;
3484 …seIndexVector_Uint16Vector ? static_cast<const tflite::Uint16Vector *>(array_segments()) : nullptr;
3487 …arseIndexVector_Uint8Vector ? static_cast<const tflite::Uint8Vector *>(array_segments()) : nullptr;
3511 VerifySparseIndexVector(verifier, array_segments(), array_segments_type()) &&
3558 void add_array_segments(flatbuffers::Offset<void> array_segments) {
3559 fbb_.AddOffset(DimensionMetadata::VT_ARRAY_SEGMENTS, array_segments);
3584 flatbuffers::Offset<void> array_segments = 0,
3589 builder_.add_array_segments(array_segments);
[all …]
/external/tensorflow/tensorflow/compiler/mlir/lite/tests/flatbuffer2mlir/
Dtest_schema.fbs143 // - If format is DimensionType.SPARSE_CSR then we use array_segments and
144 // array_indices to encode that dimension. array_segments represents how
151 array_segments:SparseIndexVector;
/external/tensorflow/tensorflow/lite/tools/
Dverifier.cc135 if (dim_metadata->array_segments() == nullptr) { in CheckArraySegments()
Dverifier_test.cc713 tensor->sparsity->dim_metadata[1]->array_segments.AsUint8Vector()->values = { in TEST()