Next:ARC Function Attributes, Previous:AArch64 Function Attributes, Up:Declaring Attributes of Functions [Contents][Index]
These function attributes are supported by the AMD GCN back end:
amdgpu_hsa_kernel ¶This attribute indicates that the corresponding function should be compiled asa kernel function, that is an entry point that can be invoked from the hostvia the HSA runtime library. By default functions are only callable only fromother GCN functions.
This attribute is implicitly applied to any function namedmain, usingdefault parameters.
Kernel functions may return an integer value, which will be written to aconventional place within the HSA "kernargs" region.
The attribute parameters configure what values are passed into the kernelfunction by the GPU drivers, via the initial register state. Some values areused by the compiler, and therefore forced on. Enabling other options maybreak assumptions in the compiler and/or run-time libraries.
private_segment_bufferSetenable_sgpr_private_segment_buffer flag. Always on (required tolocate the stack).
dispatch_ptrSetenable_sgpr_dispatch_ptr flag. Always on (required to locate thelaunch dimensions).
queue_ptrSetenable_sgpr_queue_ptr flag. Always on (required to convert addressspaces).
kernarg_segment_ptrSetenable_sgpr_kernarg_segment_ptr flag. Always on (required tolocate the kernel arguments, "kernargs").
dispatch_idSetenable_sgpr_dispatch_id flag.
flat_scratch_initSetenable_sgpr_flat_scratch_init flag.
private_segment_sizeSetenable_sgpr_private_segment_size flag.
grid_workgroup_count_XSetenable_sgpr_grid_workgroup_count_x flag. Always on (required touse OpenACC/OpenMP).
grid_workgroup_count_YSetenable_sgpr_grid_workgroup_count_y flag.
grid_workgroup_count_ZSetenable_sgpr_grid_workgroup_count_z flag.
workgroup_id_XSetenable_sgpr_workgroup_id_x flag.
workgroup_id_YSetenable_sgpr_workgroup_id_y flag.
workgroup_id_ZSetenable_sgpr_workgroup_id_z flag.
workgroup_infoSetenable_sgpr_workgroup_info flag.
private_segment_wave_offsetSetenable_sgpr_private_segment_wave_byte_offset flag. Always on(required to locate the stack).
work_item_id_XSetenable_vgpr_workitem_id parameter. Always on (can’t be disabled).
work_item_id_YSetenable_vgpr_workitem_id parameter. Always on (required to enablevectorization.)
work_item_id_ZSetenable_vgpr_workitem_id parameter. Always on (required to useOpenACC/OpenMP).
Next:ARC Function Attributes, Previous:AArch64 Function Attributes, Up:Declaring Attributes of Functions [Contents][Index]