diff options
author | Nicolas Vasilache <ntv@google.com> | 2019-11-12 07:06:18 -0800 |
---|---|---|
committer | A. Unique TensorFlower <gardener@tensorflow.org> | 2019-11-12 07:06:54 -0800 |
commit | f51a15533729cddc9907320b5ab963f7fc037aa0 (patch) | |
tree | f2c907948d881741510dc8574fe12dc468a72021 /mlir/tools | |
parent | 6582489219ab695a025457302a9e6924b1259176 (diff) | |
download | bcm5719-llvm-f51a15533729cddc9907320b5ab963f7fc037aa0.tar.gz bcm5719-llvm-f51a15533729cddc9907320b5ab963f7fc037aa0.zip |
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
Diffstat (limited to 'mlir/tools')
-rw-r--r-- | mlir/tools/mlir-cuda-runner/cuda-runtime-wrappers.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/mlir/tools/mlir-cuda-runner/cuda-runtime-wrappers.cpp b/mlir/tools/mlir-cuda-runner/cuda-runtime-wrappers.cpp index 9e035f81f91..31b6f6f6209 100644 --- a/mlir/tools/mlir-cuda-runner/cuda-runtime-wrappers.cpp +++ b/mlir/tools/mlir-cuda-runner/cuda-runtime-wrappers.cpp @@ -82,6 +82,7 @@ extern "C" int32_t mcuStreamSynchronize(void *stream) { // A struct that corresponds to how MLIR represents memrefs. template <typename T, int N> struct MemRefType { + T *basePtr; T *data; int64_t offset; int64_t sizes[N]; |