Intrinsics
API Reference
Indexing
AMDGPU.Device.workitemIdx Function
workitemIdx()::ROCDim3Returns the work item index within the work group. See also: threadIdx
AMDGPU.Device.workgroupIdx Function
workgroupIdx()::ROCDim3Returns the work group index. See also: blockIdx
AMDGPU.Device.workgroupDim Function
workgroupDim()::ROCDim3Returns the size of each workgroup in workitems. See also: blockDim
AMDGPU.Device.gridItemDim Function
gridItemDim()::ROCDim3Returns the size of the grid in workitems. This behaviour is different from CUDA where gridDim gives the size of the grid in blocks.
AMDGPU.Device.gridGroupDim Function
gridGroupDim()::ROCDim3Returns the size of the grid in workgroups. This is equivalent to CUDA's gridDim.
Use these functions for compatibility with CUDA.jl.
AMDGPU.Device.threadIdx Function
threadIdx()::ROCDim3Returns the thread index within the block. See also: workitemIdx
AMDGPU.Device.blockIdx Function
blockIdx()::ROCDim3Returns the block index within the grid. See also: workgroupIdx
AMDGPU.Device.blockDim Function
blockDim()::ROCDim3Returns the dimensions of the block. See also: workgroupDim
Synchronization
AMDGPU.Device.sync_workgroup Function
sync_workgroup()Waits until all wavefronts in a workgroup have reached this call and that their memory accesses are visible to other threads in the workgroup.
sourceAMDGPU.Device.sync_workgroup_count Function
sync_workgroup_count(predicate::Cint)::CintIdentical to sync_workgroup, with the additional feature that it evaluates the predicate for all workitems in the workgroup and returns the number of workitems for which predicate evaluates to non-zero.
AMDGPU.Device.sync_workgroup_and Function
sync_workgroup_and(predicate::Cint)::CintIdentical to sync_workgroup, with the additional feature that it evaluates the predicate for all workitems in the workgroup and returns non-zero if and only if predicate evaluates to non-zero for all of them.
AMDGPU.Device.sync_workgroup_or Function
sync_workgroup_or(predicate::Cint)::CintIdentical to sync_workgroup, with the additional feature that it evaluates the predicate for all workitems in the workgroup and returns non-zero if and only if predicate evaluates to non-zero for any of them.