Lines Matching defs:tensor
144 /// shaped value is copied. Otherwise, a tensor with undefined contents is
149 Value tensor;
151 tensor = shapedValue;
153 tensor = b.create<ToTensorOp>(loc, shapedValue);
161 RankedTensorType tensorType = llvm::cast<RankedTensorType>(tensor.getType());
183 populateDynamicDimSizes(b, loc, tensor, dynamicSizes);
188 copy ? tensor : Value());
193 FailureOr<BaseMemRefType> copyBufferType = getBufferType(tensor, options);
235 // this optimization if the OpResult is an unranked tensor (because those
274 // tensor.dim ops may have been created to be used as alloc_tensor op
276 if (isa<tensor::DimOp>(use->getOwner()))
389 /// in place. Return all tensor OpOperand* if the op is not bufferizable.
400 /// in place. Return all tensor Values if the op is not bufferizable.
417 // Unknown op that returns a tensor. The inplace analysis does not support it.
429 // Unknown op that returns a tensor. The inplace analysis does not support it.
441 // Unknown op that returns a tensor. The inplace analysis does not support it.
590 // Do not copy if the tensor has undefined contents.
594 // Do not copy if the buffer of the tensor is entirely overwritten (with
595 // values that do not depend on the old tensor).
599 // Do not copy if the tensor is never read.
638 static void ensureToMemrefOpIsValid(Value tensor, Type memrefType) {
640 auto rankedTensorType = llvm::dyn_cast<RankedTensorType>(tensor.getType());
651 assert(tensorType && "unexpected non-tensor type");
670 /// Return the buffer type for a given Value (tensor) after bufferization.
677 /// Return the buffer type for a given Value (tensor) after bufferization.
682 "unexpected non-tensor type");
720 // The OpResult is a tensor. Such values are replaced with memrefs during
724 "tensor op result should be replaced with a memref value");
725 // The existing uses of the OpResult still expect a tensor. Insert a
820 /// the given tensor type is unranked, return an unranked MemRef type.
865 // %0 = "some_writing_op" : tensor<?xf32>
866 // %r = scf.if ... -> tensor<?xf32> {
867 // scf.yield %0 : tensor<?xf32>
869 // %1 = "another_writing_op"(%0) : tensor<?xf32>
870 // scf.yield %1 : tensor<?xf32>
928 assert(llvm::isa<TensorType>(value.getType()) && "expected tensor type");