[XLA] Minor clean-up of fusion_queue.h.

PiperOrigin-RevId: 264143005
This commit is contained in:
Alexander Belyaev 2019-08-19 06:27:45 -07:00 committed by TensorFlower Gardener
parent bd0a61fe4f
commit 39f47a417d
2 changed files with 9 additions and 10 deletions

View File

@ -1501,6 +1501,7 @@ cc_library(
hdrs = ["fusion_queue.h"], hdrs = ["fusion_queue.h"],
deps = [ deps = [
":hlo", ":hlo",
"@com_google_absl//absl/strings",
], ],
) )

View File

@ -15,8 +15,10 @@ limitations under the License.
#ifndef TENSORFLOW_COMPILER_XLA_SERVICE_FUSION_QUEUE_H_ #ifndef TENSORFLOW_COMPILER_XLA_SERVICE_FUSION_QUEUE_H_
#define TENSORFLOW_COMPILER_XLA_SERVICE_FUSION_QUEUE_H_ #define TENSORFLOW_COMPILER_XLA_SERVICE_FUSION_QUEUE_H_
#include <utility> #include <string>
#include <vector>
#include "absl/strings/str_cat.h"
#include "tensorflow/compiler/xla/service/hlo_instruction.h" #include "tensorflow/compiler/xla/service/hlo_instruction.h"
namespace xla { namespace xla {
@ -25,15 +27,11 @@ namespace xla {
using FusionConfig = std::vector<std::vector<bool>>; using FusionConfig = std::vector<std::vector<bool>>;
// Converts fusion config to string format. // Converts fusion config to string format.
static string FusionConfigToString(const FusionConfig& config) { static std::string FusionConfigToString(const FusionConfig& config) {
string s = ""; std::string s;
for (auto& edge_list : config) { for (const auto& edge_list : config) {
for (auto edge : edge_list) { for (bool edge : edge_list) {
if (edge) { absl::StrAppend(&s, edge ? "1" : "0");
s += "1";
} else {
s += "0";
}
} }
} }
return s; return s;