Add support for alignment attribute in std.alloc.
authorNicolas Vasilache <ntv@google.com>
Tue, 12 Nov 2019 15:06:18 +0000 (07:06 -0800)
committerA. Unique TensorFlower <gardener@tensorflow.org>
Tue, 12 Nov 2019 15:06:54 +0000 (07:06 -0800)
commitf51a15533729cddc9907320b5ab963f7fc037aa0
treef2c907948d881741510dc8574fe12dc468a72021
parent6582489219ab695a025457302a9e6924b1259176
Add support for alignment attribute in std.alloc.

This CL adds an extra pointer to the memref descriptor to allow specifying alignment.

In a previous implementation, we used 2 types: `linalg.buffer` and `view` where the buffer type was the unit of allocation/deallocation/alignment and `view` was the unit of indexing.

After multiple discussions it was decided to use a single type, which conflates both, so the memref descriptor now needs to carry both pointers.

This is consistent with the [RFC-Proposed Changes to MemRef and Tensor MLIR Types](https://groups.google.com/a/tensorflow.org/forum/#!searchin/mlir/std.view%7Csort:date/mlir/-wKHANzDNTg/4K6nUAp8AAAJ).

PiperOrigin-RevId: 279959463
15 files changed:
mlir/g3doc/ConversionToLLVMDialect.md
mlir/include/mlir/Conversion/StandardToLLVM/ConvertStandardToLLVM.h
mlir/include/mlir/Dialect/StandardOps/Ops.td
mlir/lib/Conversion/StandardToLLVM/ConvertStandardToLLVM.cpp
mlir/lib/Conversion/VectorToLLVM/VectorToLLVM.cpp
mlir/lib/Dialect/Linalg/Transforms/LowerToLLVMDialect.cpp
mlir/lib/Dialect/StandardOps/Ops.cpp
mlir/test/Conversion/StandardToLLVM/convert-argattrs.mlir
mlir/test/Conversion/StandardToLLVM/convert-memref-ops.mlir
mlir/test/Conversion/StandardToLLVM/convert-to-llvmir.mlir
mlir/test/Conversion/StandardToLLVM/standard-to-llvm.mlir
mlir/test/Conversion/VectorToLLVM/vector-to-llvm.mlir
mlir/test/Dialect/Linalg/llvm.mlir
mlir/test/mlir-cpu-runner/include/mlir_runner_utils.h
mlir/tools/mlir-cuda-runner/cuda-runtime-wrappers.cpp