diff options
author | Benjamin Kramer <kramerb@google.com> | 2018-10-02 10:15:11 -0700 |
---|---|---|
committer | TensorFlower Gardener <gardener@tensorflow.org> | 2018-10-02 10:19:31 -0700 |
commit | dd66b78b38b457c7d37527472c4e92a7a07f4b09 (patch) | |
tree | 7bc3fbbd547ae88c9ef06a71b7c15e20be41e756 /tensorflow/compiler/xla/service/gpu | |
parent | ce41d2f95e1e5883f1808030c94fd9aaa57d9f10 (diff) |
[XLA] Fix some outdated comments referring to FlatMap
Also convert unordered_map to flat/node_hash_map where the comments allow.
PiperOrigin-RevId: 215410566
Diffstat (limited to 'tensorflow/compiler/xla/service/gpu')
-rw-r--r-- | tensorflow/compiler/xla/service/gpu/BUILD | 1 | ||||
-rw-r--r-- | tensorflow/compiler/xla/service/gpu/nvptx_compiler.h | 9 |
2 files changed, 6 insertions, 4 deletions
diff --git a/tensorflow/compiler/xla/service/gpu/BUILD b/tensorflow/compiler/xla/service/gpu/BUILD index a838464cae..522e9f5948 100644 --- a/tensorflow/compiler/xla/service/gpu/BUILD +++ b/tensorflow/compiler/xla/service/gpu/BUILD @@ -718,6 +718,7 @@ cc_library( "//tensorflow/core:lib_internal", "//tensorflow/core:regexp_internal", "//tensorflow/core:stream_executor_no_cuda", + "@com_google_absl//absl/container:node_hash_map", "@com_google_absl//absl/memory", "@com_google_absl//absl/strings", "@com_google_absl//absl/types:optional", diff --git a/tensorflow/compiler/xla/service/gpu/nvptx_compiler.h b/tensorflow/compiler/xla/service/gpu/nvptx_compiler.h index 8e97774750..c4a0b727cd 100644 --- a/tensorflow/compiler/xla/service/gpu/nvptx_compiler.h +++ b/tensorflow/compiler/xla/service/gpu/nvptx_compiler.h @@ -20,6 +20,7 @@ limitations under the License. #include <string> #include <vector> +#include "absl/container/node_hash_map.h" #include "absl/types/optional.h" #include "absl/types/span.h" #include "tensorflow/compiler/xla/service/executable.h" @@ -140,10 +141,10 @@ class NVPTXCompiler : public LLVMCompiler { tensorflow::condition_variable compilation_done_cv_; }; - // Don't even think about switching this to FlatMap; iterator stability is - // critical here. - std::unordered_map<CompilationCacheKey, CompilationCacheValue, - CompilationCacheHash, CompilationCacheEq> + // Don't even think about switching this to flat_hash_map; iterator stability + // is critical here. + absl::node_hash_map<CompilationCacheKey, CompilationCacheValue, + CompilationCacheHash, CompilationCacheEq> compilation_cache_ GUARDED_BY(mutex_); TF_DISALLOW_COPY_AND_ASSIGN(NVPTXCompiler); |