mirror of
https://github.com/zebrajr/tensorflow.git
synced 2025-12-07 12:20:24 +01:00
[XLA:CPU] Put the HLO name in IR values that hold the HLO's value.
PiperOrigin-RevId: 171075449
This commit is contained in:
parent
89aaac4bc3
commit
a02116882d
|
|
@ -2833,6 +2833,15 @@ Status IrEmitter::Preprocess(HloInstruction* hlo) {
|
|||
}
|
||||
|
||||
Status IrEmitter::Postprocess(HloInstruction* hlo) {
|
||||
// Set the name of the emitted llvm::Value to IrName(hlo). Outfeed and send
|
||||
// the only ops that don't emit a value.
|
||||
if (hlo->opcode() != HloOpcode::kOutfeed &&
|
||||
hlo->opcode() != HloOpcode::kSend) {
|
||||
auto it = emitted_value_.find(hlo);
|
||||
CHECK(it != emitted_value_.end());
|
||||
it->second->setName(AsStringRef(IrName(hlo)));
|
||||
}
|
||||
|
||||
if (auto* prof_counter = GetProfileCounterFor(hlo)) {
|
||||
profiling_state_.RecordCycleDelta(&ir_builder_, hlo, prof_counter);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user