diff options
| author | Aart Bik <ajcbik@google.com> | 2021-04-26 17:03:35 -0700 |
|---|---|---|
| committer | Aart Bik <ajcbik@google.com> | 2021-04-26 18:31:54 -0700 |
| commit | 23c9e8bc25795b69e16d39b674c19c79a2bb107b (patch) | |
| tree | 784eddb8ff06173248c89426c2ba03d7c4e79f05 /mlir/lib/IR/TensorEncoding.cpp | |
| parent | bba7338b8f5df15a444aad8b3026aec869767b2b (diff) | |
[mlir][tensors] Introduce attribute interface/attribute for tensor encoding
The new "encoding" field in tensor types so far had no meaning. This revision introduces:
1. an encoding attribute interface in IR: for verification between tensors and encodings in general
2. an attribute in Tensor dialect; #tensor.sparse<dict> + concrete sparse tensors API
Active discussion:
https://llvm.discourse.group/t/rfc-introduce-a-sparse-tensor-type-to-core-mlir/2944/
Reviewed By: silvas, penpornk, bixia
Differential Revision: https://reviews.llvm.org/D101008
Diffstat (limited to 'mlir/lib/IR/TensorEncoding.cpp')
| -rw-r--r-- | mlir/lib/IR/TensorEncoding.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/mlir/lib/IR/TensorEncoding.cpp b/mlir/lib/IR/TensorEncoding.cpp new file mode 100644 index 000000000000..2ab678830604 --- /dev/null +++ b/mlir/lib/IR/TensorEncoding.cpp @@ -0,0 +1,17 @@ +//===- TensorEncoding.cpp - MLIR Tensor Encoding --------------------------===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// + +#include "mlir/IR/TensorEncoding.h" + +using namespace mlir; + +//===----------------------------------------------------------------------===// +// Tensor Encoding Interfaces Methods +//===----------------------------------------------------------------------===// + +#include "mlir/IR/TensorEncInterfaces.cpp.inc" |
