Lines Matching defs:tensor

1 //===- SparseTensorDialect.cpp - Sparse tensor dialect implementation -----===//
82 // If the actual tensor shape is provided, we can then refine the leading
911 // Check integrity with tensor type specifics. In particular, we
912 // need only check that the dimension-rank of the tensor agrees with
916 return emitError() << "expected non-scalar sparse tensor";
919 << "dimension-rank mismatch between encoding and tensor shape: "
925 << "tensor element type: " << attrType
933 << "tensor element type: " << attrType
1202 /// We normalized sparse tensor encoding attribute by always using
1205 /// irrelevant fields that do not alter the sparse tensor memory layout.
1243 static LogicalResult lvlIsInBounds(Level lvl, Value tensor) {
1244 return success(lvl < getSparseTensorType(tensor).getLvlRank());
1266 return op->emitError("requested slice data on non-slice tensor");
1302 return op->emitError("the sparse-tensor must have static shape");
1304 return op->emitError("the sparse-tensor must have an encoding attribute");
1382 return emitError("cannot convert to a sparse tensor slice");
1406 // dense tensor since dense tensor support random access.
1497 "Level index exceeds the rank of the input sparse tensor");
1524 // Follows the same convention used by tensor.dim operation. Out of bound
1669 return emitError("expected sparse tensor with a COO region");
1869 return emitError(llvm::formatv("Input tensor ${0} has dynamic shape", i));
1873 llvm::formatv("Input tensor ${0} has a different rank (rank={1}) "
1874 "from the output tensor (rank={2}).",
1892 "The concatenation dimension of the output tensor should be the "
1932 OpBuilder &builder, OperationState &result, Value tensor,
1936 build(builder, result, initArgs.getTypes(), tensor, initArgs, order);
1940 const auto stt = getSparseTensorType(tensor);
1950 SmallVector<Location> blockArgLocs(blockArgTypes.size(), tensor.getLoc());
1968 return emitError("Level traverse order does not match tensor's level rank");
1995 llvm::formatv("Unmatched element type between input tensor and "
2398 return emitOpError("mismatch in tensor encoding and iterator encoding.");