Movatterモバイル変換


[0]ホーム

URL:


Next:, Previous:, Up:Declaring Attributes of Functions   [Contents][Index]


6.4.1.3 AMD GCN Function Attributes

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_buffer

Setenable_sgpr_private_segment_buffer flag. Always on (required tolocate the stack).

dispatch_ptr

Setenable_sgpr_dispatch_ptr flag. Always on (required to locate thelaunch dimensions).

queue_ptr

Setenable_sgpr_queue_ptr flag. Always on (required to convert addressspaces).

kernarg_segment_ptr

Setenable_sgpr_kernarg_segment_ptr flag. Always on (required tolocate the kernel arguments, "kernargs").

dispatch_id

Setenable_sgpr_dispatch_id flag.

flat_scratch_init

Setenable_sgpr_flat_scratch_init flag.

private_segment_size

Setenable_sgpr_private_segment_size flag.

grid_workgroup_count_X

Setenable_sgpr_grid_workgroup_count_x flag. Always on (required touse OpenACC/OpenMP).

grid_workgroup_count_Y

Setenable_sgpr_grid_workgroup_count_y flag.

grid_workgroup_count_Z

Setenable_sgpr_grid_workgroup_count_z flag.

workgroup_id_X

Setenable_sgpr_workgroup_id_x flag.

workgroup_id_Y

Setenable_sgpr_workgroup_id_y flag.

workgroup_id_Z

Setenable_sgpr_workgroup_id_z flag.

workgroup_info

Setenable_sgpr_workgroup_info flag.

private_segment_wave_offset

Setenable_sgpr_private_segment_wave_byte_offset flag. Always on(required to locate the stack).

work_item_id_X

Setenable_vgpr_workitem_id parameter. Always on (can’t be disabled).

work_item_id_Y

Setenable_vgpr_workitem_id parameter. Always on (required to enablevectorization.)

work_item_id_Z

Setenable_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]


[8]ページ先頭

©2009-2026 Movatter.jp