diff --git a/tensorflow/compiler/xla/service/gpu/llvm_gpu_backend/gpu_backend_lib.cc b/tensorflow/compiler/xla/service/gpu/llvm_gpu_backend/gpu_backend_lib.cc index d6f1e57eb8d..338db13c52d 100644 --- a/tensorflow/compiler/xla/service/gpu/llvm_gpu_backend/gpu_backend_lib.cc +++ b/tensorflow/compiler/xla/service/gpu/llvm_gpu_backend/gpu_backend_lib.cc @@ -838,11 +838,11 @@ StatusOr> CompileToHsaco( // Delete the first two lines, since they usually vary even when the rest of // the code is the same (but verify that they are what we expect). if (str.size() >= 13 && str.substr(0, 13) == "; ModuleID = ") { - auto pos = str.find("\n"); + auto pos = str.find('\n'); if (pos != std::string::npos) str = str.substr(pos + 1); } if (str.size() >= 18 && str.substr(0, 18) == "source_filename = ") { - auto pos = str.find("\n"); + auto pos = str.find('\n'); if (pos != std::string::npos) str = str.substr(pos + 1); } str += hlo_module_config.compilation_cache_key(); diff --git a/tensorflow/compiler/xla/service/hlo_instruction.cc b/tensorflow/compiler/xla/service/hlo_instruction.cc index 4cd508a8bf4..49c0608e6ca 100644 --- a/tensorflow/compiler/xla/service/hlo_instruction.cc +++ b/tensorflow/compiler/xla/service/hlo_instruction.cc @@ -2538,7 +2538,7 @@ string PrintName(const string& name, bool print_ids) { if (print_ids) { return name; } else { - auto dot_position = name.find_first_of("."); + auto dot_position = name.find_first_of('.'); return name.substr(0, dot_position); } } diff --git a/tensorflow/compiler/xla/tests/dot_operation_test.cc b/tensorflow/compiler/xla/tests/dot_operation_test.cc index 72f27082fda..690b657449d 100644 --- a/tensorflow/compiler/xla/tests/dot_operation_test.cc +++ b/tensorflow/compiler/xla/tests/dot_operation_test.cc @@ -1210,7 +1210,7 @@ XLA_TEST_P(EinsumTest, SimpleEinsumTest) { .ValueOrDie(), &builder); auto config = std::get<2>(GetParam()); - if (config.find(",") == config.npos) { + if (config.find(',') == config.npos) { Einsum(x, config); } else { Einsum(x, y, config);