Fix performance regression by assuring deterministic map order
PiperOrigin-RevId: 330536569 Change-Id: I594e017a2aa216fc19c2508fbeb5f7f6fc05c4d7
This commit is contained in:
parent
222c12da39
commit
b23d35059b
@ -38,7 +38,6 @@ cc_library(
|
||||
"//tensorflow/lite/delegates/gpu/common:data_type",
|
||||
"//tensorflow/lite/delegates/gpu/common:types",
|
||||
"//tensorflow/lite/delegates/gpu/gl:object",
|
||||
"@com_google_absl//absl/container:flat_hash_map",
|
||||
"@com_google_absl//absl/strings",
|
||||
"@com_google_absl//absl/strings:str_format",
|
||||
"@com_google_absl//absl/types:variant",
|
||||
|
@ -16,10 +16,10 @@ limitations under the License.
|
||||
#ifndef TENSORFLOW_LITE_DELEGATES_GPU_GL_COMPILER_OBJECT_ACCESSOR_H_
|
||||
#define TENSORFLOW_LITE_DELEGATES_GPU_GL_COMPILER_OBJECT_ACCESSOR_H_
|
||||
|
||||
#include <map>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
#include "absl/container/flat_hash_map.h"
|
||||
#include "tensorflow/lite/delegates/gpu/gl/compiler/preprocessor.h"
|
||||
#include "tensorflow/lite/delegates/gpu/gl/compiler/variable_accessor.h"
|
||||
#include "tensorflow/lite/delegates/gpu/gl/object.h"
|
||||
@ -85,7 +85,7 @@ class ObjectAccessor : public InlineRewrite {
|
||||
RewriteStatus RewriteWrite(absl::string_view location,
|
||||
absl::string_view value, std::string* output);
|
||||
|
||||
absl::flat_hash_map<std::string, Object> name_to_object_;
|
||||
std::map<std::string, Object> name_to_object_;
|
||||
|
||||
const bool is_mali_;
|
||||
const bool sampler_textures_;
|
||||
|
Loading…
x
Reference in New Issue
Block a user