Expand description
shape
dialect.
This dialect contains operations for shape inference.
Note: Unless explicitly stated, all functions that return a shape and take shapes as input, return the invalid shape if one of its operands is an invalid shape. This avoids flagging multiple errors for one verification failure. The dialect itself does not specify how errors should be combined (there are multiple different options, from always choosing first operand, concatting etc. on how to combine them).
Structs§
- An
add
operation. Addition of sizes and indices. - A builder for an
add
operation. - An
any
operation. Return any combination of the input shapes. - A builder for an
any
operation. - An
assuming_all
operation. Return a logical AND of all witnesses. - A builder for an
assuming_all
operation. - An
assuming
operation. Execute the region. - A builder for an
assuming
operation. - An
assuming_yield
operation. Yield operation. - A builder for an
assuming_yield
operation. - A
broadcast
operation. Returns the broadcasted output shape of two or more inputs. - A builder for a
broadcast
operation. - A
concat
operation. Concatenates two shapes. - A builder for a
concat
operation. - A
const_shape
operation. Creates a constant shape or extent tensor. - A builder for a
const_shape
operation. - A
const_size
operation. Creates a constant of typeshape.size
. - A builder for a
const_size
operation. - A
const_witness
operation. An operation that returns a statically known witness value. - A builder for a
const_witness
operation. - A
cstr_broadcastable
operation. Determines if 2+ shapes can be successfully broadcasted. - A builder for a
cstr_broadcastable
operation. - A
cstr_eq
operation. Determines if all input shapes are equal. - A builder for a
cstr_eq
operation. - A
cstr_require
operation. Represents a runtime assertion that an i1 istrue
. - A builder for a
cstr_require
operation. - A
debug_print
operation. Prints the input shape or size. - A builder for a
debug_print
operation. - A
dim
operation. Gets the specified extent from the shape of a shaped input. - A builder for a
dim
operation. - A
div
operation. Division of sizes and indices. - A builder for a
div
operation. - A
from_extent_tensor
operation. Creates a shape from a tensor of extents. - A builder for a
from_extent_tensor
operation. - A
from_extents
operation. Creates a shape from extents. - A builder for a
from_extents
operation. - A
func
operation. Shape function. - A builder for a
func
operation. - A
function_library
operation. Represents shape functions and corresponding ops. - A builder for a
function_library
operation. - A
get_extent
operation. Gets the specified extent from a shape or extent tensor. - A builder for a
get_extent
operation. - An
index_to_size
operation. Converts a standard index to a shape size. - A builder for an
index_to_size
operation. - An
is_broadcastable
operation. Determines if 2+ shapes can be successfully broadcasted. - A builder for an
is_broadcastable
operation. - A
max
operation. Elementwise maximum. - A builder for a
max
operation. - A
meet
operation. Returns the least general shape or size of its operands. - A builder for a
meet
operation. - A
min
operation. Elementwise minimum. - A builder for a
min
operation. - A
mul
operation. Multiplication of sizes and indices. - A builder for a
mul
operation. - A
num_elements
operation. Returns the number of elements for a given shape. - A builder for a
num_elements
operation. - A
rank
operation. Gets the rank of a shape. - A builder for a
rank
operation. - A
reduce
operation. Returns an expression reduced over a shape or extent tensor. - A builder for a
reduce
operation. - A
return
operation. Shape function return operation. - A builder for a
return
operation. - A
shape_eq
operation. Returns whether the input shapes or extent tensors are equal. - A builder for a
shape_eq
operation. - A
shape_of
operation. Returns shape of a value or shaped type operand. - A builder for a
shape_of
operation. - A
size_to_index
operation. Casts between index types of the shape and standard dialect. - A builder for a
size_to_index
operation. - A
split_at
operation. Splits a shape at a given index. - A builder for a
split_at
operation. - A
to_extent_tensor
operation. Creates a dimension tensor from a shape. - A builder for a
to_extent_tensor
operation. - A
value_as_shape
operation. Returns value as a shape. - A builder for a
value_as_shape
operation. - A
value_of
operation. Returns value of a !shape.value_shape operand. - A builder for a
value_of
operation. - A
with_shape
operation. Returns ValueShape with given shape. - A builder for a
with_shape
operation. - A
yield
operation. Returns the value to parent op. - A builder for a
yield
operation.
Functions§
- Creates an
add
operation. - Creates an
any
operation. - Creates an
assuming
operation. - Creates an
assuming_all
operation. - Creates an
assuming_yield
operation. - Creates a
broadcast
operation. - Creates a
concat
operation. - Creates a
const_shape
operation. - Creates a
const_size
operation. - Creates a
const_witness
operation. - Creates a
cstr_broadcastable
operation. - Creates a
cstr_eq
operation. - Creates a
cstr_require
operation. - Creates a
debug_print
operation. - Creates a
dim
operation. - Creates a
div
operation. - Creates a
from_extent_tensor
operation. - Creates a
from_extents
operation. - Creates a
func
operation. - Creates a
function_library
operation. - Creates a
get_extent
operation. - Creates an
index_to_size
operation. - Creates an
is_broadcastable
operation. - Creates a
max
operation. - Creates a
meet
operation. - Creates a
min
operation. - Creates a
mul
operation. - Creates a
num_elements
operation. - Creates a
rank
operation. - Creates a
reduce
operation. - Creates a
return
operation. - Creates a
shape_eq
operation. - Creates a
shape_of
operation. - Creates a
size_to_index
operation. - Creates a
split_at
operation. - Creates a
to_extent_tensor
operation. - Creates a
value_as_shape
operation. - Creates a
value_of
operation. - Creates a
with_shape
operation. - Creates a
yield
operation.