AMDGPU API Reference
Indexing
AMDGPU.Device.workitemIdx
— FunctionworkitemIdx()::ROCDim3
Returns the work item index within the work group. See also: threadIdx
AMDGPU.Device.workgroupIdx
— FunctionworkgroupIdx()::ROCDim3
Returns the work group index. See also: blockIdx
AMDGPU.Device.workgroupDim
— FunctionworkgroupDim()::ROCDim3
Returns the size of each workgroup in workitems. See also: blockDim
AMDGPU.Device.gridItemDim
— FunctiongridItemDim()::ROCDim3
Returns 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
— FunctiongridGroupDim()::ROCDim3
Returns 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
— FunctionthreadIdx()::ROCDim3
Returns the thread index within the block. See also: workitemIdx
AMDGPU.Device.blockIdx
— FunctionblockIdx()::ROCDim3
Returns the block index within the grid. See also: workgroupIdx
AMDGPU.Device.blockDim
— FunctionblockDim()::ROCDim3
Returns the dimensions of the block. See also: workgroupDim
Synchronization
AMDGPU.Device.sync_workgroup
— Functionsync_workgroup()
Waits until all wavefronts in a workgroup have reached this call.
AMDGPU.Device.sync_workgroup_count
— Functionsync_workgroup_count(predicate::Cint)::Cint
Identical 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
— Functionsync_workgroup_and(predicate::Cint)::Cint
Identical 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
— Functionsync_workgroup_or(predicate::Cint)::Cint
Identical 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.