Struct melior::dialect::ods::sparse_tensor::LoadOperation
source · pub struct LoadOperation<'c> { /* private fields */ }
Expand description
A load
operation. Rematerializes tensor from underlying sparse storage format.
Rematerializes a tensor from the underlying sparse storage format of the
given tensor. This is similar to the bufferization.to_tensor
operation
in the sense that it provides a bridge between a bufferized world view
and a tensor world view. Unlike the bufferization.to_tensor
operation,
however, this sparse operation is used only temporarily to maintain a
correctly typed intermediate representation during progressive
bufferization.
The hasInserts
attribute denote whether insertions to the underlying
sparse storage format may have occurred, in which case the underlying
sparse storage format needs to be finalized. Otherwise, the operation
simply folds away.
Note that this operation is “impure” in the sense that even though the result is modeled through an SSA value, the operation relies on a proper context of materializing and inserting the tensor value.
Examples:
%result = sparse_tensor.load %tensor : tensor<8xf64, #SV>
%1 = sparse_tensor.load %0 hasInserts : tensor<16x32xf32, #CSR>
Implementations§
source§impl<'c> LoadOperation<'c>
impl<'c> LoadOperation<'c>
sourcepub fn as_operation(&self) -> &Operation<'c>
pub fn as_operation(&self) -> &Operation<'c>
Returns a generic operation.
sourcepub fn builder(
context: &'c Context,
location: Location<'c>
) -> LoadOperationBuilder<'c, Unset>
pub fn builder( context: &'c Context, location: Location<'c> ) -> LoadOperationBuilder<'c, Unset>
Creates a builder.