Changed InputColocationExemptionRegistry::ops_ to gtl::FlatSet<string>
instead of set<string>. PiperOrigin-RevId: 268973789
This commit is contained in:
parent
f15c3b0d02
commit
4e329e4dd8
tensorflow/core/common_runtime
@ -27,8 +27,6 @@ InputColocationExemptionRegistry* InputColocationExemptionRegistry::Global() {
|
|||||||
return registry;
|
return registry;
|
||||||
}
|
}
|
||||||
|
|
||||||
const std::set<string>& InputColocationExemptionRegistry::Get() { return ops_; }
|
|
||||||
|
|
||||||
void InputColocationExemptionRegistry::Register(const string& op) {
|
void InputColocationExemptionRegistry::Register(const string& op) {
|
||||||
auto it = ops_.find(op);
|
auto it = ops_.find(op);
|
||||||
if (it != ops_.end()) {
|
if (it != ops_.end()) {
|
||||||
|
@ -15,9 +15,9 @@ limitations under the License.
|
|||||||
#ifndef TENSORFLOW_CORE_COMMON_RUNTIME_INPUT_COLOCATION_EXEMPTION_REGISTRY_H_
|
#ifndef TENSORFLOW_CORE_COMMON_RUNTIME_INPUT_COLOCATION_EXEMPTION_REGISTRY_H_
|
||||||
#define TENSORFLOW_CORE_COMMON_RUNTIME_INPUT_COLOCATION_EXEMPTION_REGISTRY_H_
|
#define TENSORFLOW_CORE_COMMON_RUNTIME_INPUT_COLOCATION_EXEMPTION_REGISTRY_H_
|
||||||
|
|
||||||
#include <set>
|
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
|
#include "tensorflow/core/lib/gtl/flatset.h"
|
||||||
#include "tensorflow/core/platform/types.h"
|
#include "tensorflow/core/platform/types.h"
|
||||||
|
|
||||||
namespace tensorflow {
|
namespace tensorflow {
|
||||||
@ -40,13 +40,13 @@ class InputColocationExemptionRegistry {
|
|||||||
static InputColocationExemptionRegistry* Global();
|
static InputColocationExemptionRegistry* Global();
|
||||||
|
|
||||||
// Returns the set of ops exempt from the input colocation constraints.
|
// Returns the set of ops exempt from the input colocation constraints.
|
||||||
const std::set<string>& Get();
|
const gtl::FlatSet<string>& Get() { return ops_; }
|
||||||
|
|
||||||
// Registers an op to be excluded from the input colocation constraints.
|
// Registers an op to be excluded from the input colocation constraints.
|
||||||
void Register(const string& op);
|
void Register(const string& op);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
std::set<string> ops_;
|
gtl::FlatSet<string> ops_;
|
||||||
};
|
};
|
||||||
|
|
||||||
namespace input_colocation_exemption_registration {
|
namespace input_colocation_exemption_registration {
|
||||||
|
Loading…
Reference in New Issue
Block a user