kernel.async.copy.mask
← kernel dialect
Predicated form of kernel.async.copy. When predicate is true, the op initiates the same transfer as kernel.async.copy. When predicate is false, the op performs no memory access and produces an already complete token so grouping and waiting remain structurally uniform.
Operation contract
| Property |
Value |
| Semantic phase |
— |
| Target contracts |
kernel.async |
| Memory effects |
read source, write dest |
Signature
| Kind |
Name |
Type |
Cardinality |
Description |
| Operand |
source |
view |
required |
Typed source view whose base is copied from. |
| Operand |
dest |
view |
required |
Typed destination view whose base is copied to. |
| Operand |
predicate |
i1 |
required |
Scalar predicate controlling this invocation's copy. |
| Result |
token |
any |
required |
Opaque async-copy token for the predicated copy. |
| Attribute |
cache_scope |
enum CacheScope |
required |
Required cache/coherency scope for the transfer. |
| Attribute |
cache_temporal |
enum CacheTemporal |
required |
Required temporal cache hint for the transfer. |
| Attribute |
direction |
enum KernelAsyncDirection |
required |
Required memory-space direction for the transfer. |
Examples
%copy = kernel.async.copy.mask %src to %dst, %in_bounds {cache_scope = cu, cache_temporal = non_temporal, direction = global_to_workgroup} : view<16xi8> to view<16xi8>, i1 -> kernel.async.token