#include <mlir/Target/SDFG/SDFGTranslator.h>
◆ TensorInfo() [1/2]
| mlir::sdfg::TensorInfo::TensorInfo |
( |
| ) |
|
◆ TensorInfo() [2/2]
| mlir::sdfg::TensorInfo::TensorInfo |
( |
std::vector< int64_t > | shape, |
|
|
std::vector< int64_t > | strides, |
|
|
int64_t | offset = 0 ) |
◆ compute_strides()
| std::vector< int64_t > mlir::sdfg::TensorInfo::compute_strides |
( |
const std::vector< int64_t > & | shape | ) |
|
|
static |
Compute C-order contiguous strides from shape.
◆ flip()
| TensorInfo mlir::sdfg::TensorInfo::flip |
( |
ArrayRef< int64_t > | axes | ) |
const |
Create flipped view: negate stride and adjust offset for each flipped axis.
◆ from_tensor_type()
| TensorInfo mlir::sdfg::TensorInfo::from_tensor_type |
( |
TensorType | type | ) |
|
|
static |
Create TensorInfo from a tensor type (assumes C-order contiguous).
◆ get_sdfg_tensor()
◆ get_tensor_layout()
Create SDFG tensor layout.
◆ has_basic_strides() [1/2]
| bool mlir::sdfg::TensorInfo::has_basic_strides |
( |
| ) |
const |
Returns true iff the tensor has basic C-order contiguous strides.
◆ has_basic_strides() [2/2]
| bool mlir::sdfg::TensorInfo::has_basic_strides |
( |
ArrayRef< int64_t > | shape, |
|
|
ArrayRef< int64_t > | strides ) |
|
static |
Returns true iff the tensor has basic C-order contiguous strides.
◆ has_transposed_strides_last_two_dims()
| bool mlir::sdfg::TensorInfo::has_transposed_strides_last_two_dims |
( |
| ) |
const |
Returns true iff the tensor is transposed in the last two dimensions.
◆ is_reshape_valid()
| bool mlir::sdfg::TensorInfo::is_reshape_valid |
( |
ArrayRef< int64_t > | new_shape | ) |
const |
Returns true iff a reshape is valid (contiguous layout, same element count).
◆ offset()
| int64_t mlir::sdfg::TensorInfo::offset |
( |
| ) |
const |
◆ reshape()
| TensorInfo mlir::sdfg::TensorInfo::reshape |
( |
ArrayRef< int64_t > | new_shape | ) |
const |
Create reshaped view (only valid for contiguous tensors).
◆ shape()
| const std::vector< int64_t > & mlir::sdfg::TensorInfo::shape |
( |
| ) |
const |
◆ shape_str()
| std::string mlir::sdfg::TensorInfo::shape_str |
( |
| ) |
const |
return shape as string for metadata
◆ strides()
| const std::vector< int64_t > & mlir::sdfg::TensorInfo::strides |
( |
| ) |
const |
◆ toStr()
| std::string mlir::sdfg::TensorInfo::toStr |
( |
| ) |
const |
Return string representation of tensor info (for debug purposes).
◆ transpose()
| TensorInfo mlir::sdfg::TensorInfo::transpose |
( |
ArrayRef< int64_t > | permutation | ) |
const |
Create transposed view: output_strides[i] = input_strides[perm[i]].
The documentation for this class was generated from the following file: