These function attributes are supported by the AMD GCN back end:
amdgpu_hsa_kernelThis attribute indicates that the corresponding function should be compiled as a kernel function, that is an entry point that can be invoked from the host via the HSA runtime library. By default functions are only callable only from other GCN functions.
This attribute is implicitly applied to any function named main, using default parameters.
Kernel functions may return an integer value, which will be written to a conventional place within the HSA "kernargs" region.
The attribute parameters configure what values are passed into the kernel function by the GPU drivers, via the initial register state. Some values are used by the compiler, and therefore forced on. Enabling other options may break assumptions in the compiler and/or run-time libraries.
private_segment_bufferSet enable_sgpr_private_segment_buffer flag. Always on (required to locate the stack).
dispatch_ptrSet enable_sgpr_dispatch_ptr flag. Always on (required to locate the launch dimensions).
queue_ptrSet enable_sgpr_queue_ptr flag. Always on (required to convert address spaces).
kernarg_segment_ptrSet enable_sgpr_kernarg_segment_ptr flag. Always on (required to locate the kernel arguments, "kernargs").
dispatch_idSet enable_sgpr_dispatch_id flag.
flat_scratch_initSet enable_sgpr_flat_scratch_init flag.
private_segment_sizeSet enable_sgpr_private_segment_size flag.
grid_workgroup_count_XSet enable_sgpr_grid_workgroup_count_x flag. Always on (required to use OpenACC/OpenMP).
grid_workgroup_count_YSet enable_sgpr_grid_workgroup_count_y flag.
grid_workgroup_count_ZSet enable_sgpr_grid_workgroup_count_z flag.
workgroup_id_XSet enable_sgpr_workgroup_id_x flag.
workgroup_id_YSet enable_sgpr_workgroup_id_y flag.
workgroup_id_ZSet enable_sgpr_workgroup_id_z flag.
workgroup_infoSet enable_sgpr_workgroup_info flag.
private_segment_wave_offsetSet enable_sgpr_private_segment_wave_byte_offset flag. Always on (required to locate the stack).
work_item_id_XSet enable_vgpr_workitem_id parameter. Always on (can’t be disabled).
work_item_id_YSet enable_vgpr_workitem_id parameter. Always on (required to enable vectorization.)
work_item_id_ZSet enable_vgpr_workitem_id parameter. Always on (required to use OpenACC/OpenMP).
Next: ARC Function Attributes, Previous: AArch64 Function Attributes, Up: Function Attributes [Contents][Index]
© Free Software Foundation
Licensed under the GNU Free Documentation License, Version 1.3.
https://gcc.gnu.org/onlinedocs/gcc-9.2.0/gcc/AMD-GCN-Function-Attributes.html