gem5  v20.1.0.0
kernel_code.hh
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2015-2017 Advanced Micro Devices, Inc.
3  * All rights reserved.
4  *
5  * For use for simulation and test purposes only
6  *
7  * Redistribution and use in source and binary forms, with or without
8  * modification, are permitted provided that the following conditions are met:
9  *
10  * 1. Redistributions of source code must retain the above copyright notice,
11  * this list of conditions and the following disclaimer.
12  *
13  * 2. Redistributions in binary form must reproduce the above copyright notice,
14  * this list of conditions and the following disclaimer in the documentation
15  * and/or other materials provided with the distribution.
16  *
17  * 3. Neither the name of the copyright holder nor the names of its
18  * contributors may be used to endorse or promote products derived from this
19  * software without specific prior written permission.
20  *
21  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
22  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
23  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
24  * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
25  * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
26  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
27  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
28  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
29  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
30  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
31  * POSSIBILITY OF SUCH DAMAGE.
32  *
33  * Authors: Anthony Gutierrez
34  */
35 
36 #ifndef __GPU_COMPUTE_KERNEL_CODE_HH__
37 #define __GPU_COMPUTE_KERNEL_CODE_HH__
38 
39 #include <bitset>
40 #include <cstdint>
41 
56 {
59  QueuePtr = 2,
73 };
74 
76 {
81 };
82 
84 {
87  uint16_t amd_machine_kind;
95 
106  // the 32b below here represent the fields of
107  // the COMPUTE_PGM_RSRC1 register
110  uint32_t priority : 2;
111  uint32_t float_mode_round_32 : 2;
113  uint32_t float_mode_denorm_32 : 2;
115  uint32_t priv : 1;
116  uint32_t enable_dx10_clamp : 1;
117  uint32_t debug_mode : 1;
118  uint32_t enable_ieee_mode : 1;
119  uint32_t bulky : 1;
120  uint32_t cdbg_user : 1;
122  // end COMPUTE_PGM_RSRC1 register
123 
124  // the 32b below here represent the fields of
125  // the COMPUTE_PGM_RSRC2 register
127  uint32_t user_sgpr_count : 5;
128  uint32_t enable_trap_handler : 1;
136  uint32_t granulated_lds_size : 9;
145  // end COMPUTE_PGM_RSRC2
146 
147  // the 32b below here represent the fields of
148  // KERNEL_CODE_PROPERTIES
151  uint32_t enable_sgpr_queue_ptr : 1;
161  uint32_t private_element_size : 2;
162  uint32_t is_ptr64 : 1;
163  uint32_t is_dynamic_callstack : 1;
164  uint32_t is_debug_enabled : 1;
165  uint32_t is_xnack_enabled : 1;
167  // end KERNEL_CODE_PROPERTIES
168 
185  uint8_t wavefront_size;
187  uint8_t reserved[12];
189  uint64_t control_directives[16];
190 };
191 
192 #endif // __GPU_COMPUTE_KERNEL_CODE_HH__
WorkgroupIdX
@ WorkgroupIdX
Definition: kernel_code.hh:67
PrivSegWaveByteOffset
@ PrivSegWaveByteOffset
Definition: kernel_code.hh:71
AMDKernelCode::float_mode_round_32
uint32_t float_mode_round_32
Definition: kernel_code.hh:111
AMDKernelCode::reserved_sgpr_first
uint16_t reserved_sgpr_first
Definition: kernel_code.hh:178
AMDKernelCode::reserved_vgpr_count
uint16_t reserved_vgpr_count
Definition: kernel_code.hh:177
AMDKernelCode::private_segment_alignment
uint8_t private_segment_alignment
Definition: kernel_code.hh:184
AMDKernelCode::enable_sgpr_kernarg_segment_ptr
uint32_t enable_sgpr_kernarg_segment_ptr
Definition: kernel_code.hh:152
AMDKernelCode::amd_kernel_code_version_minor
uint32_t amd_kernel_code_version_minor
Definition: kernel_code.hh:86
AMDKernelCode::amd_kernel_code_version_major
uint32_t amd_kernel_code_version_major
Definition: kernel_code.hh:85
AMDKernelCode::kernel_code_properties_reserved1
uint32_t kernel_code_properties_reserved1
Definition: kernel_code.hh:159
AMDKernelCode::priority
uint32_t priority
Definition: kernel_code.hh:110
PrivateSegBuf
@ PrivateSegBuf
Definition: kernel_code.hh:57
AMDKernelCode::max_scratch_backing_memory_byte_size
uint64_t max_scratch_backing_memory_byte_size
Definition: kernel_code.hh:94
AMDKernelCode::enable_sgpr_flat_scratch_init
uint32_t enable_sgpr_flat_scratch_init
Definition: kernel_code.hh:154
AMDKernelCode::enable_exception_ieee_754_fp_division_by_zero
uint32_t enable_exception_ieee_754_fp_division_by_zero
Definition: kernel_code.hh:139
AMDKernelCode::wavefront_size
uint8_t wavefront_size
Definition: kernel_code.hh:185
WorkitemIdZ
@ WorkitemIdZ
Definition: kernel_code.hh:79
NumScalarInitFields
@ NumScalarInitFields
Definition: kernel_code.hh:72
AMDKernelCode::user_sgpr_count
uint32_t user_sgpr_count
Definition: kernel_code.hh:127
AMDKernelCode::gds_segment_byte_size
uint32_t gds_segment_byte_size
Definition: kernel_code.hh:171
AMDKernelCode::is_dynamic_callstack
uint32_t is_dynamic_callstack
Definition: kernel_code.hh:163
AMDKernelCode::priv
uint32_t priv
Definition: kernel_code.hh:115
AMDKernelCode::granulated_lds_size
uint32_t granulated_lds_size
Definition: kernel_code.hh:136
AMDKernelCode::enable_sgpr_dispatch_id
uint32_t enable_sgpr_dispatch_id
Definition: kernel_code.hh:153
AMDKernelCode::enable_exception_ieee_754_fp_overflow
uint32_t enable_exception_ieee_754_fp_overflow
Definition: kernel_code.hh:140
QueuePtr
@ QueuePtr
Definition: kernel_code.hh:59
AMDKernelCode::debug_private_segment_buffer_sgpr
uint16_t debug_private_segment_buffer_sgpr
Definition: kernel_code.hh:181
AMDKernelCode::enable_exception_address_watch
uint32_t enable_exception_address_watch
Definition: kernel_code.hh:134
AMDKernelCode::enable_sgpr_workgroup_id_x
uint32_t enable_sgpr_workgroup_id_x
Definition: kernel_code.hh:129
AMDKernelCode::reserved
uint8_t reserved[12]
Definition: kernel_code.hh:187
KernargSegPtr
@ KernargSegPtr
Definition: kernel_code.hh:60
AMDKernelCode::reserved_vgpr_first
uint16_t reserved_vgpr_first
Definition: kernel_code.hh:176
WorkgroupIdZ
@ WorkgroupIdZ
Definition: kernel_code.hh:69
AMDKernelCode::enable_dx10_clamp
uint32_t enable_dx10_clamp
Definition: kernel_code.hh:116
AMDKernelCode
Definition: kernel_code.hh:83
AMDKernelCode::kernarg_segment_alignment
uint8_t kernarg_segment_alignment
Definition: kernel_code.hh:182
AMDKernelCode::enable_sgpr_queue_ptr
uint32_t enable_sgpr_queue_ptr
Definition: kernel_code.hh:151
AMDKernelCode::enable_exception_ieee_754_fp_invalid_operation
uint32_t enable_exception_ieee_754_fp_invalid_operation
Definition: kernel_code.hh:137
AMDKernelCode::is_xnack_enabled
uint32_t is_xnack_enabled
Definition: kernel_code.hh:165
VectorRegInitFields
VectorRegInitFields
Definition: kernel_code.hh:75
AMDKernelCode::enable_ieee_mode
uint32_t enable_ieee_mode
Definition: kernel_code.hh:118
FlatScratchInit
@ FlatScratchInit
Definition: kernel_code.hh:62
AMDKernelCode::float_mode_denorm_16_64
uint32_t float_mode_denorm_16_64
Definition: kernel_code.hh:114
AMDKernelCode::compute_pgm_rsrc1_reserved
uint32_t compute_pgm_rsrc1_reserved
Definition: kernel_code.hh:121
AMDKernelCode::workitem_vgpr_count
uint16_t workitem_vgpr_count
Definition: kernel_code.hh:175
AMDKernelCode::workgroup_group_segment_byte_size
uint32_t workgroup_group_segment_byte_size
Definition: kernel_code.hh:170
AMDKernelCode::workitem_private_segment_byte_size
uint32_t workitem_private_segment_byte_size
Definition: kernel_code.hh:169
AMDKernelCode::wavefront_sgpr_count
uint16_t wavefront_sgpr_count
Definition: kernel_code.hh:174
AMDKernelCode::enable_sgpr_private_segment_wave_byte_offset
uint32_t enable_sgpr_private_segment_wave_byte_offset
Definition: kernel_code.hh:126
AMDKernelCode::enable_exception_ieee_754_fp_inexact
uint32_t enable_exception_ieee_754_fp_inexact
Definition: kernel_code.hh:142
AMDKernelCode::amd_machine_kind
uint16_t amd_machine_kind
Definition: kernel_code.hh:87
AMDKernelCode::enable_sgpr_grid_workgroup_count_z
uint32_t enable_sgpr_grid_workgroup_count_z
Definition: kernel_code.hh:158
AMDKernelCode::call_convention
int32_t call_convention
Definition: kernel_code.hh:186
AMDKernelCode::kernarg_segment_byte_size
uint64_t kernarg_segment_byte_size
Definition: kernel_code.hh:172
AMDKernelCode::workgroup_fbarrier_count
uint32_t workgroup_fbarrier_count
Definition: kernel_code.hh:173
ScalarRegInitFields
ScalarRegInitFields
these enums represent the indices into the initialRegState bitfields in HsaKernelInfo.
Definition: kernel_code.hh:55
AMDKernelCode::is_ptr64
uint32_t is_ptr64
Definition: kernel_code.hh:162
GridWorkgroupCountX
@ GridWorkgroupCountX
Definition: kernel_code.hh:64
WorkitemIdX
@ WorkitemIdX
Definition: kernel_code.hh:77
NumVectorInitFields
@ NumVectorInitFields
Definition: kernel_code.hh:80
AMDKernelCode::debug_mode
uint32_t debug_mode
Definition: kernel_code.hh:117
AMDKernelCode::enable_vgpr_workitem_id
uint32_t enable_vgpr_workitem_id
Definition: kernel_code.hh:133
AMDKernelCode::kernel_code_prefetch_byte_size
uint64_t kernel_code_prefetch_byte_size
Definition: kernel_code.hh:93
AMDKernelCode::enable_sgpr_grid_workgroup_count_x
uint32_t enable_sgpr_grid_workgroup_count_x
Definition: kernel_code.hh:156
AMDKernelCode::enable_sgpr_workgroup_id_y
uint32_t enable_sgpr_workgroup_id_y
Definition: kernel_code.hh:130
AMDKernelCode::group_segment_alignment
uint8_t group_segment_alignment
Definition: kernel_code.hh:183
AMDKernelCode::enable_sgpr_workgroup_id_z
uint32_t enable_sgpr_workgroup_id_z
Definition: kernel_code.hh:131
AMDKernelCode::reserved_sgpr_count
uint16_t reserved_sgpr_count
Definition: kernel_code.hh:179
AMDKernelCode::debug_wavefront_private_segment_offset_sgpr
uint16_t debug_wavefront_private_segment_offset_sgpr
Definition: kernel_code.hh:180
AMDKernelCode::enable_sgpr_private_segment_buffer
uint32_t enable_sgpr_private_segment_buffer
Definition: kernel_code.hh:149
AMDKernelCode::float_mode_round_16_64
uint32_t float_mode_round_16_64
Definition: kernel_code.hh:112
AMDKernelCode::enable_trap_handler
uint32_t enable_trap_handler
Definition: kernel_code.hh:128
AMDKernelCode::kernel_code_properties_reserved2
uint32_t kernel_code_properties_reserved2
Definition: kernel_code.hh:166
AMDKernelCode::compute_pgm_rsrc2_reserved
uint32_t compute_pgm_rsrc2_reserved
Definition: kernel_code.hh:144
WorkitemIdY
@ WorkitemIdY
Definition: kernel_code.hh:78
AMDKernelCode::enable_exception_memory_violation
uint32_t enable_exception_memory_violation
Definition: kernel_code.hh:135
AMDKernelCode::amd_machine_version_stepping
uint16_t amd_machine_version_stepping
Definition: kernel_code.hh:90
AMDKernelCode::enable_exception_int_divide_by_zero
uint32_t enable_exception_int_divide_by_zero
Definition: kernel_code.hh:143
DispatchId
@ DispatchId
Definition: kernel_code.hh:61
AMDKernelCode::runtime_loader_kernel_symbol
uint64_t runtime_loader_kernel_symbol
Definition: kernel_code.hh:188
AMDKernelCode::granulated_workitem_vgpr_count
uint32_t granulated_workitem_vgpr_count
The fields below are used to set program settings for compute shaders.
Definition: kernel_code.hh:108
WorkgroupIdY
@ WorkgroupIdY
Definition: kernel_code.hh:68
AMDKernelCode::private_element_size
uint32_t private_element_size
Definition: kernel_code.hh:161
AMDKernelCode::amd_machine_version_minor
uint16_t amd_machine_version_minor
Definition: kernel_code.hh:89
AMDKernelCode::is_debug_enabled
uint32_t is_debug_enabled
Definition: kernel_code.hh:164
AMDKernelCode::granulated_wavefront_sgpr_count
uint32_t granulated_wavefront_sgpr_count
Definition: kernel_code.hh:109
AMDKernelCode::kernel_code_entry_byte_offset
int64_t kernel_code_entry_byte_offset
Definition: kernel_code.hh:91
AMDKernelCode::enable_exception_fp_denormal_source
uint32_t enable_exception_fp_denormal_source
Definition: kernel_code.hh:138
PrivateSegSize
@ PrivateSegSize
Definition: kernel_code.hh:63
GridWorkgroupCountY
@ GridWorkgroupCountY
Definition: kernel_code.hh:65
AMDKernelCode::float_mode_denorm_32
uint32_t float_mode_denorm_32
Definition: kernel_code.hh:113
AMDKernelCode::enable_sgpr_grid_workgroup_count_y
uint32_t enable_sgpr_grid_workgroup_count_y
Definition: kernel_code.hh:157
AMDKernelCode::enable_sgpr_dispatch_ptr
uint32_t enable_sgpr_dispatch_ptr
Definition: kernel_code.hh:150
AMDKernelCode::cdbg_user
uint32_t cdbg_user
Definition: kernel_code.hh:120
AMDKernelCode::amd_machine_version_major
uint16_t amd_machine_version_major
Definition: kernel_code.hh:88
AMDKernelCode::enable_sgpr_private_segment_size
uint32_t enable_sgpr_private_segment_size
Definition: kernel_code.hh:155
GridWorkgroupCountZ
@ GridWorkgroupCountZ
Definition: kernel_code.hh:66
AMDKernelCode::enable_exception_ieee_754_fp_underflow
uint32_t enable_exception_ieee_754_fp_underflow
Definition: kernel_code.hh:141
AMDKernelCode::enable_ordered_append_gds
uint32_t enable_ordered_append_gds
Definition: kernel_code.hh:160
AMDKernelCode::kernel_code_prefetch_byte_offset
int64_t kernel_code_prefetch_byte_offset
Definition: kernel_code.hh:92
WorkgroupInfo
@ WorkgroupInfo
Definition: kernel_code.hh:70
DispatchPtr
@ DispatchPtr
Definition: kernel_code.hh:58
AMDKernelCode::bulky
uint32_t bulky
Definition: kernel_code.hh:119
AMDKernelCode::control_directives
uint64_t control_directives[16]
Definition: kernel_code.hh:189
AMDKernelCode::enable_sgpr_workgroup_info
uint32_t enable_sgpr_workgroup_info
Definition: kernel_code.hh:132

Generated on Wed Sep 30 2020 14:02:12 for gem5 by doxygen 1.8.17