Skip to content

AMDGPU API Reference

Indexing

AMDGPU.Device.workitemIdx Function
julia
workitemIdx()::ROCDim3

Returns the work item index within the work group. See also: threadIdx

source
AMDGPU.Device.workgroupIdx Function
julia
workgroupIdx()::ROCDim3

Returns the work group index. See also: blockIdx

source
AMDGPU.Device.workgroupDim Function
julia
workgroupDim()::ROCDim3

Returns the size of each workgroup in workitems. See also: blockDim

source
AMDGPU.Device.gridItemDim Function
julia
gridItemDim()::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.

source
AMDGPU.Device.gridGroupDim Function
julia
gridGroupDim()::ROCDim3

Returns the size of the grid in workgroups. This is equivalent to CUDA's gridDim.

source

Use these functions for compatibility with CUDA.jl.

AMDGPU.Device.threadIdx Function
julia
threadIdx()::ROCDim3

Returns the thread index within the block. See also: workitemIdx

source
AMDGPU.Device.blockIdx Function
julia
blockIdx()::ROCDim3

Returns the block index within the grid. See also: workgroupIdx

source
AMDGPU.Device.blockDim Function
julia
blockDim()::ROCDim3

Returns the dimensions of the block. See also: workgroupDim

source

Synchronization

AMDGPU.Device.sync_workgroup Function
julia
sync_workgroup()

Waits until all wavefronts in a workgroup have reached this call.

source
AMDGPU.Device.sync_workgroup_count Function
julia
sync_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.

source
AMDGPU.Device.sync_workgroup_and Function
julia
sync_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.

source
AMDGPU.Device.sync_workgroup_or Function
julia
sync_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.

source