[XLA] Minor clean-up of fusion_queue.h.
PiperOrigin-RevId: 264143005
This commit is contained in:
parent
bd0a61fe4f
commit
39f47a417d
@ -1501,6 +1501,7 @@ cc_library(
|
||||
hdrs = ["fusion_queue.h"],
|
||||
deps = [
|
||||
":hlo",
|
||||
"@com_google_absl//absl/strings",
|
||||
],
|
||||
)
|
||||
|
||||
|
@ -15,8 +15,10 @@ limitations under the License.
|
||||
#ifndef 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"
|
||||
|
||||
namespace xla {
|
||||
@ -25,15 +27,11 @@ namespace xla {
|
||||
using FusionConfig = std::vector<std::vector<bool>>;
|
||||
|
||||
// Converts fusion config to string format.
|
||||
static string FusionConfigToString(const FusionConfig& config) {
|
||||
string s = "";
|
||||
for (auto& edge_list : config) {
|
||||
for (auto edge : edge_list) {
|
||||
if (edge) {
|
||||
s += "1";
|
||||
} else {
|
||||
s += "0";
|
||||
}
|
||||
static std::string FusionConfigToString(const FusionConfig& config) {
|
||||
std::string s;
|
||||
for (const auto& edge_list : config) {
|
||||
for (bool edge : edge_list) {
|
||||
absl::StrAppend(&s, edge ? "1" : "0");
|
||||
}
|
||||
}
|
||||
return s;
|
||||
|
Loading…
x
Reference in New Issue
Block a user