diff options
author | 2017-07-28 10:52:57 -0700 | |
---|---|---|
committer | 2017-07-28 10:56:18 -0700 | |
commit | efc63f6248a4a85c885e4a4facabd7242ee3a94c (patch) | |
tree | d93be7518aef1a3c9df0e1bd6ff32b9cfe6724d5 /tensorflow/compiler/xla/service/llvm_ir/ir_array.h | |
parent | a553aff1319a68b1ee8e8084c3915ea1fde8b888 (diff) |
Lower concatenate operations to memcpy.
This usually ends up being faster than elemental IR implementation.
PiperOrigin-RevId: 163489782
Diffstat (limited to 'tensorflow/compiler/xla/service/llvm_ir/ir_array.h')
-rw-r--r-- | tensorflow/compiler/xla/service/llvm_ir/ir_array.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tensorflow/compiler/xla/service/llvm_ir/ir_array.h b/tensorflow/compiler/xla/service/llvm_ir/ir_array.h index a38cf0e5d9..a6a3ea1adc 100644 --- a/tensorflow/compiler/xla/service/llvm_ir/ir_array.h +++ b/tensorflow/compiler/xla/service/llvm_ir/ir_array.h @@ -218,17 +218,22 @@ class IrArray { llvm::IRBuilder<>* ir_builder) const; void AddAliasScopeMetadata(llvm::MDNode* alias_scope) { + CHECK_NE(alias_scope, nullptr); AddMetadata(llvm::LLVMContext::MD_alias_scope, alias_scope); } void AddNoaliasMetadata(llvm::MDNode* noalias) { + CHECK_NE(noalias, nullptr); AddMetadata(llvm::LLVMContext::MD_noalias, noalias); } void AddInvariantLoad(llvm::MDNode* invariant_load) { + CHECK_NE(invariant_load, nullptr); AddMetadata(llvm::LLVMContext::MD_invariant_load, invariant_load); } + const std::map<int, llvm::MDNode*>& metadata() const { return metadata_; } + // Bumps the "which_dimension" value within the provided index by the provided // addend. static Index BumpIndex(const Index& index, int64 which_dimension, |