aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/compiler/xla/service/elemental_ir_emitter.h
diff options
context:
space:
mode:
authorGravatar A. Unique TensorFlower <gardener@tensorflow.org>2017-11-13 11:34:15 -0800
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2017-11-13 11:40:57 -0800
commit58f7858601b72aa3c5854571f2152b91d1795e29 (patch)
tree214e1ff498ecc21573dbe444fc5a0142915152af /tensorflow/compiler/xla/service/elemental_ir_emitter.h
parent659d8cbc3aaffc0249afee1ec437639beda8d243 (diff)
[TF:XLA] Adding test coverage for more C64 operations, and ensuring they pass.
Included here: - reduction ops (reduce_sum, reduce_prod) - unaries: tanh, sigmoid (currently GPU only) - binaries: pow (currently GPU only) PiperOrigin-RevId: 175562417
Diffstat (limited to 'tensorflow/compiler/xla/service/elemental_ir_emitter.h')
-rw-r--r--tensorflow/compiler/xla/service/elemental_ir_emitter.h12
1 files changed, 7 insertions, 5 deletions
diff --git a/tensorflow/compiler/xla/service/elemental_ir_emitter.h b/tensorflow/compiler/xla/service/elemental_ir_emitter.h
index 9d32436e38..cccb498f82 100644
--- a/tensorflow/compiler/xla/service/elemental_ir_emitter.h
+++ b/tensorflow/compiler/xla/service/elemental_ir_emitter.h
@@ -95,6 +95,13 @@ class ElementalIrEmitter {
virtual StatusOr<llvm::Value*> EmitReducePrecision(const HloInstruction* hlo,
llvm::Value* x) const;
+ virtual llvm::Value* EmitExtractReal(llvm::Value* value) const;
+ virtual llvm::Value* EmitExtractImag(llvm::Value* value) const;
+
+ // Composes a complex struct. imag may be nullptr for simple cast operations.
+ llvm::Value* EmitComposeComplex(const HloInstruction* op, llvm::Value* real,
+ llvm::Value* imag) const;
+
// A helper method for MakeElementGenerator. Given an elementwise op `hlo` and
// the target array index, computes the source array index of its
// `operand_no`-th operand.
@@ -117,11 +124,6 @@ class ElementalIrEmitter {
// compiled executable outside of the HLO code itself.
const HloModuleConfig& hlo_module_config_;
- protected:
- // Composes a complex struct. imag may be nullptr for simple cast operations.
- llvm::Value* ComposeComplex(const HloInstruction* op, llvm::Value* real,
- llvm::Value* imag) const;
-
private:
// Returns a ElementGenerator for a RNG HloInstruction.
llvm_ir::ElementGenerator MakeRngElementGenerator(