diff options
Diffstat (limited to 'tensorflow/compiler/xla/service/hlo_domain_map.h')
-rw-r--r-- | tensorflow/compiler/xla/service/hlo_domain_map.h | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/tensorflow/compiler/xla/service/hlo_domain_map.h b/tensorflow/compiler/xla/service/hlo_domain_map.h index c8d581b746..bce7d1aa7c 100644 --- a/tensorflow/compiler/xla/service/hlo_domain_map.h +++ b/tensorflow/compiler/xla/service/hlo_domain_map.h @@ -58,21 +58,21 @@ class HloDomainMap { } // Checks whether two instructions are within the same domain. - bool InSameDomain(HloInstruction* instruction1, - HloInstruction* instruction2) const; + bool InSameDomain(const HloInstruction* instruction1, + const HloInstruction* instruction2) const; // Checks whether instruction is a kDomain instruction of the kind we are // currently processing. - bool IsDomainInstruction(HloInstruction* instruction) const; + bool IsDomainInstruction(const HloInstruction* instruction) const; // Retrieves the domain identifier of the instruction, or -1 in case // instruction is not found within any domain. - int64 GetDomainId(HloInstruction* instruction) const; + int64 GetDomainId(const HloInstruction* instruction) const; // Returns the unique id of the domain metadata for the domain the given // instruction belongs to. The given instruction must not be a kDomain // instruction since each domain instruction is associated with 2 domains. - int64 GetDomainMetadataId(HloInstruction* instruction) const; + int64 GetDomainMetadataId(const HloInstruction* instruction) const; private: // Map used for representing instruction ordering, i.e. @@ -119,8 +119,8 @@ class HloDomainMap { string domain_kind_; std::vector<std::unique_ptr<DomainMetadata::Domain>> instruction_domains_; - absl::flat_hash_map<HloInstruction*, int64> instruction_to_domain_; - absl::flat_hash_map<HloInstruction*, int64> domain_metadata_id_; + absl::flat_hash_map<const HloInstruction*, int64> instruction_to_domain_; + absl::flat_hash_map<const HloInstruction*, int64> domain_metadata_id_; }; } // namespace xla |