tensor.duplicate
← tensor dialect
Create another local owner of a tensor and its dependent dimensions or encoding. The duplicate carries the same elements through a distinct SSA ownership identity.
Operation contract
| Property |
Value |
| Semantic phase |
executable |
| Traits |
UniqueIdentity, StorageRelation |
| Interfaces |
ValueDuplication |
Signature
| Kind |
Name |
Type |
Cardinality |
Description |
| Operand |
sources |
any |
variadic |
— |
| Result |
duplicates |
any |
variadic |
— |
Verification constraints
ClosedValueTuple(sources)
ClosedValueTuple(duplicates)
VariadicValuesMatch(duplicates, sources)
Examples
%copy_m, %copy = tensor.duplicate %m, %source : index, tensor<[%copy_m]xf32>