Mirroring upstream github FlatBuffers to third_party/flatbuffers

This contains ~160 PRs/commits from roughly March 2019 to Dec 2019.

PiperOrigin-RevId: 299892873
Change-Id: I0eb364d0386e3ccdbceec94a4f3018c75ac1a2e2
This commit is contained in:
A. Unique TensorFlower 2020-03-09 11:39:13 -07:00 committed by TensorFlower Gardener
parent 7d1e7499ea
commit 356c9a830c

View File

@ -1673,21 +1673,17 @@ class TensorFlowUnsupported : public BaseOperator {
for (size_t i = 0; i < keys.size(); ++i) {
const auto key = keys[i].AsKey();
const auto& value = m[key];
// TODO(wvo): hack to make this code compile with 2 different API
// versions.
// Please remove once OS/internal versions are in sync.
// See hardcoded values in the switch below.
switch (value.GetType()) {
case 5: // flexbuffers::FBT_STRING:
case flexbuffers::FBT_STRING:
(*attr)[key].set_s(value.AsString().c_str());
break;
case 1: // flexbuffers::FBT_INT:
case flexbuffers::FBT_INT:
(*attr)[key].set_i(value.AsInt64());
break;
case 3: // flexbuffers::FBT_FLOAT:
case flexbuffers::FBT_FLOAT:
(*attr)[key].set_f(value.AsFloat());
break;
case 26: // flexbuffers::FBT_BOOL:
case flexbuffers::FBT_BOOL:
(*attr)[key].set_b(value.AsBool());
if (string(key) == "_output_quantized") {
op->quantized = value.AsBool();
@ -1696,7 +1692,7 @@ class TensorFlowUnsupported : public BaseOperator {
op->support_output_type_float_in_quantized_op = value.AsBool();
}
break;
case 11: { // flexbuffers::FBT_VECTOR_INT: {
case flexbuffers::FBT_VECTOR_INT: {
auto* list = (*attr)[key].mutable_list();
const auto& vector = value.AsTypedVector();
for (size_t i = 0; i < vector.size(); i++) {
@ -1704,7 +1700,7 @@ class TensorFlowUnsupported : public BaseOperator {
}
break;
}
case 13: { // flexbuffers::FBT_VECTOR_FLOAT: {
case flexbuffers::FBT_VECTOR_FLOAT: {
auto* list = (*attr)[key].mutable_list();
const auto& vector = value.AsTypedVector();
for (size_t i = 0; i < vector.size(); i++) {
@ -1712,7 +1708,7 @@ class TensorFlowUnsupported : public BaseOperator {
}
break;
}
case 15: { // flexbuffers::FBT_VECTOR_STRING: {
case 15 /* TO_DO(wvo): flexbuffers::FBT_VECTOR_STRING_DEPRECATED*/: {
auto* list = (*attr)[key].mutable_list();
const auto& vector = value.AsTypedVector();
for (size_t i = 0; i < vector.size(); i++) {