gem5  v21.0.0.0
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
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 
34 #ifndef __GPU_COMPUTE_KERNEL_CODE_HH__
35 #define __GPU_COMPUTE_KERNEL_CODE_HH__
36 
37 #include <bitset>
38 #include <cstdint>
39 
54 {
57  QueuePtr = 2,
71 };
72 
74 {
79 };
80 
82 {
85  uint16_t amd_machine_kind;
93 
104  // the 32b below here represent the fields of
105  // the COMPUTE_PGM_RSRC1 register
108  uint32_t priority : 2;
109  uint32_t float_mode_round_32 : 2;
111  uint32_t float_mode_denorm_32 : 2;
113  uint32_t priv : 1;
114  uint32_t enable_dx10_clamp : 1;
115  uint32_t debug_mode : 1;
116  uint32_t enable_ieee_mode : 1;
117  uint32_t bulky : 1;
118  uint32_t cdbg_user : 1;
120  // end COMPUTE_PGM_RSRC1 register
121 
122  // the 32b below here represent the fields of
123  // the COMPUTE_PGM_RSRC2 register
125  uint32_t user_sgpr_count : 5;
126  uint32_t enable_trap_handler : 1;
134  uint32_t granulated_lds_size : 9;
143  // end COMPUTE_PGM_RSRC2
144 
145  // the 32b below here represent the fields of
146  // KERNEL_CODE_PROPERTIES
149  uint32_t enable_sgpr_queue_ptr : 1;
159  uint32_t private_element_size : 2;
160  uint32_t is_ptr64 : 1;
161  uint32_t is_dynamic_callstack : 1;
162  uint32_t is_debug_enabled : 1;
163  uint32_t is_xnack_enabled : 1;
165  // end KERNEL_CODE_PROPERTIES
166 
183  uint8_t wavefront_size;
185  uint8_t reserved[12];
187  uint64_t control_directives[16];
188 };
189 
190 #endif // __GPU_COMPUTE_KERNEL_CODE_HH__
WorkgroupIdX
@ WorkgroupIdX
Definition: kernel_code.hh:65
PrivSegWaveByteOffset
@ PrivSegWaveByteOffset
Definition: kernel_code.hh:69
AMDKernelCode::float_mode_round_32
uint32_t float_mode_round_32
Definition: kernel_code.hh:109
AMDKernelCode::reserved_sgpr_first
uint16_t reserved_sgpr_first
Definition: kernel_code.hh:176
AMDKernelCode::reserved_vgpr_count
uint16_t reserved_vgpr_count
Definition: kernel_code.hh:175
AMDKernelCode::private_segment_alignment
uint8_t private_segment_alignment
Definition: kernel_code.hh:182
AMDKernelCode::enable_sgpr_kernarg_segment_ptr
uint32_t enable_sgpr_kernarg_segment_ptr
Definition: kernel_code.hh:150
AMDKernelCode::amd_kernel_code_version_minor
uint32_t amd_kernel_code_version_minor
Definition: kernel_code.hh:84
AMDKernelCode::amd_kernel_code_version_major
uint32_t amd_kernel_code_version_major
Definition: kernel_code.hh:83
AMDKernelCode::kernel_code_properties_reserved1
uint32_t kernel_code_properties_reserved1
Definition: kernel_code.hh:157
AMDKernelCode::priority
uint32_t priority
Definition: kernel_code.hh:108
PrivateSegBuf
@ PrivateSegBuf
Definition: kernel_code.hh:55
AMDKernelCode::max_scratch_backing_memory_byte_size
uint64_t max_scratch_backing_memory_byte_size
Definition: kernel_code.hh:92
AMDKernelCode::enable_sgpr_flat_scratch_init
uint32_t enable_sgpr_flat_scratch_init
Definition: kernel_code.hh:152
AMDKernelCode::enable_exception_ieee_754_fp_division_by_zero
uint32_t enable_exception_ieee_754_fp_division_by_zero
Definition: kernel_code.hh:137
AMDKernelCode::wavefront_size
uint8_t wavefront_size
Definition: kernel_code.hh:183
WorkitemIdZ
@ WorkitemIdZ
Definition: kernel_code.hh:77
NumScalarInitFields
@ NumScalarInitFields
Definition: kernel_code.hh:70
AMDKernelCode::user_sgpr_count
uint32_t user_sgpr_count
Definition: kernel_code.hh:125
AMDKernelCode::gds_segment_byte_size
uint32_t gds_segment_byte_size
Definition: kernel_code.hh:169
AMDKernelCode::is_dynamic_callstack
uint32_t is_dynamic_callstack
Definition: kernel_code.hh:161
AMDKernelCode::priv
uint32_t priv
Definition: kernel_code.hh:113
AMDKernelCode::granulated_lds_size
uint32_t granulated_lds_size
Definition: kernel_code.hh:134
AMDKernelCode::enable_sgpr_dispatch_id
uint32_t enable_sgpr_dispatch_id
Definition: kernel_code.hh:151
AMDKernelCode::enable_exception_ieee_754_fp_overflow
uint32_t enable_exception_ieee_754_fp_overflow
Definition: kernel_code.hh:138
QueuePtr
@ QueuePtr
Definition: kernel_code.hh:57
AMDKernelCode::debug_private_segment_buffer_sgpr
uint16_t debug_private_segment_buffer_sgpr
Definition: kernel_code.hh:179
AMDKernelCode::enable_exception_address_watch
uint32_t enable_exception_address_watch
Definition: kernel_code.hh:132
AMDKernelCode::enable_sgpr_workgroup_id_x
uint32_t enable_sgpr_workgroup_id_x
Definition: kernel_code.hh:127
AMDKernelCode::reserved
uint8_t reserved[12]
Definition: kernel_code.hh:185
KernargSegPtr
@ KernargSegPtr
Definition: kernel_code.hh:58
AMDKernelCode::reserved_vgpr_first
uint16_t reserved_vgpr_first
Definition: kernel_code.hh:174
WorkgroupIdZ
@ WorkgroupIdZ
Definition: kernel_code.hh:67
AMDKernelCode::enable_dx10_clamp
uint32_t enable_dx10_clamp
Definition: kernel_code.hh:114
AMDKernelCode
Definition: kernel_code.hh:81
AMDKernelCode::kernarg_segment_alignment
uint8_t kernarg_segment_alignment
Definition: kernel_code.hh:180
AMDKernelCode::enable_sgpr_queue_ptr
uint32_t enable_sgpr_queue_ptr
Definition: kernel_code.hh:149
AMDKernelCode::enable_exception_ieee_754_fp_invalid_operation
uint32_t enable_exception_ieee_754_fp_invalid_operation
Definition: kernel_code.hh:135
AMDKernelCode::is_xnack_enabled
uint32_t is_xnack_enabled
Definition: kernel_code.hh:163
VectorRegInitFields
VectorRegInitFields
Definition: kernel_code.hh:73
AMDKernelCode::enable_ieee_mode
uint32_t enable_ieee_mode
Definition: kernel_code.hh:116
FlatScratchInit
@ FlatScratchInit
Definition: kernel_code.hh:60
AMDKernelCode::float_mode_denorm_16_64
uint32_t float_mode_denorm_16_64
Definition: kernel_code.hh:112
AMDKernelCode::compute_pgm_rsrc1_reserved
uint32_t compute_pgm_rsrc1_reserved
Definition: kernel_code.hh:119
AMDKernelCode::workitem_vgpr_count
uint16_t workitem_vgpr_count
Definition: kernel_code.hh:173
AMDKernelCode::workgroup_group_segment_byte_size
uint32_t workgroup_group_segment_byte_size
Definition: kernel_code.hh:168
AMDKernelCode::workitem_private_segment_byte_size
uint32_t workitem_private_segment_byte_size
Definition: kernel_code.hh:167
AMDKernelCode::wavefront_sgpr_count
uint16_t wavefront_sgpr_count
Definition: kernel_code.hh:172
AMDKernelCode::enable_sgpr_private_segment_wave_byte_offset
uint32_t enable_sgpr_private_segment_wave_byte_offset
Definition: kernel_code.hh:124
AMDKernelCode::enable_exception_ieee_754_fp_inexact
uint32_t enable_exception_ieee_754_fp_inexact
Definition: kernel_code.hh:140
AMDKernelCode::amd_machine_kind
uint16_t amd_machine_kind
Definition: kernel_code.hh:85
AMDKernelCode::enable_sgpr_grid_workgroup_count_z
uint32_t enable_sgpr_grid_workgroup_count_z
Definition: kernel_code.hh:156
AMDKernelCode::call_convention
int32_t call_convention
Definition: kernel_code.hh:184
AMDKernelCode::kernarg_segment_byte_size
uint64_t kernarg_segment_byte_size
Definition: kernel_code.hh:170
AMDKernelCode::workgroup_fbarrier_count
uint32_t workgroup_fbarrier_count
Definition: kernel_code.hh:171
ScalarRegInitFields
ScalarRegInitFields
these enums represent the indices into the initialRegState bitfields in HsaKernelInfo.
Definition: kernel_code.hh:53
AMDKernelCode::is_ptr64
uint32_t is_ptr64
Definition: kernel_code.hh:160
GridWorkgroupCountX
@ GridWorkgroupCountX
Definition: kernel_code.hh:62
WorkitemIdX
@ WorkitemIdX
Definition: kernel_code.hh:75
NumVectorInitFields
@ NumVectorInitFields
Definition: kernel_code.hh:78
AMDKernelCode::debug_mode
uint32_t debug_mode
Definition: kernel_code.hh:115
AMDKernelCode::enable_vgpr_workitem_id
uint32_t enable_vgpr_workitem_id
Definition: kernel_code.hh:131
AMDKernelCode::kernel_code_prefetch_byte_size
uint64_t kernel_code_prefetch_byte_size
Definition: kernel_code.hh:91
AMDKernelCode::enable_sgpr_grid_workgroup_count_x
uint32_t enable_sgpr_grid_workgroup_count_x
Definition: kernel_code.hh:154
AMDKernelCode::enable_sgpr_workgroup_id_y
uint32_t enable_sgpr_workgroup_id_y
Definition: kernel_code.hh:128
AMDKernelCode::group_segment_alignment
uint8_t group_segment_alignment
Definition: kernel_code.hh:181
AMDKernelCode::enable_sgpr_workgroup_id_z
uint32_t enable_sgpr_workgroup_id_z
Definition: kernel_code.hh:129
AMDKernelCode::reserved_sgpr_count
uint16_t reserved_sgpr_count
Definition: kernel_code.hh:177
AMDKernelCode::debug_wavefront_private_segment_offset_sgpr
uint16_t debug_wavefront_private_segment_offset_sgpr
Definition: kernel_code.hh:178
AMDKernelCode::enable_sgpr_private_segment_buffer
uint32_t enable_sgpr_private_segment_buffer
Definition: kernel_code.hh:147
AMDKernelCode::float_mode_round_16_64
uint32_t float_mode_round_16_64
Definition: kernel_code.hh:110
AMDKernelCode::enable_trap_handler
uint32_t enable_trap_handler
Definition: kernel_code.hh:126
AMDKernelCode::kernel_code_properties_reserved2
uint32_t kernel_code_properties_reserved2
Definition: kernel_code.hh:164
AMDKernelCode::compute_pgm_rsrc2_reserved
uint32_t compute_pgm_rsrc2_reserved
Definition: kernel_code.hh:142
WorkitemIdY
@ WorkitemIdY
Definition: kernel_code.hh:76
AMDKernelCode::enable_exception_memory_violation
uint32_t enable_exception_memory_violation
Definition: kernel_code.hh:133
AMDKernelCode::amd_machine_version_stepping
uint16_t amd_machine_version_stepping
Definition: kernel_code.hh:88
AMDKernelCode::enable_exception_int_divide_by_zero
uint32_t enable_exception_int_divide_by_zero
Definition: kernel_code.hh:141
DispatchId
@ DispatchId
Definition: kernel_code.hh:59
AMDKernelCode::runtime_loader_kernel_symbol
uint64_t runtime_loader_kernel_symbol
Definition: kernel_code.hh:186
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:106
WorkgroupIdY
@ WorkgroupIdY
Definition: kernel_code.hh:66
AMDKernelCode::private_element_size
uint32_t private_element_size
Definition: kernel_code.hh:159
AMDKernelCode::amd_machine_version_minor
uint16_t amd_machine_version_minor
Definition: kernel_code.hh:87
AMDKernelCode::is_debug_enabled
uint32_t is_debug_enabled
Definition: kernel_code.hh:162
AMDKernelCode::granulated_wavefront_sgpr_count
uint32_t granulated_wavefront_sgpr_count
Definition: kernel_code.hh:107
AMDKernelCode::kernel_code_entry_byte_offset
int64_t kernel_code_entry_byte_offset
Definition: kernel_code.hh:89
AMDKernelCode::enable_exception_fp_denormal_source
uint32_t enable_exception_fp_denormal_source
Definition: kernel_code.hh:136
PrivateSegSize
@ PrivateSegSize
Definition: kernel_code.hh:61
GridWorkgroupCountY
@ GridWorkgroupCountY
Definition: kernel_code.hh:63
AMDKernelCode::float_mode_denorm_32
uint32_t float_mode_denorm_32
Definition: kernel_code.hh:111
AMDKernelCode::enable_sgpr_grid_workgroup_count_y
uint32_t enable_sgpr_grid_workgroup_count_y
Definition: kernel_code.hh:155
AMDKernelCode::enable_sgpr_dispatch_ptr
uint32_t enable_sgpr_dispatch_ptr
Definition: kernel_code.hh:148
AMDKernelCode::cdbg_user
uint32_t cdbg_user
Definition: kernel_code.hh:118
AMDKernelCode::amd_machine_version_major
uint16_t amd_machine_version_major
Definition: kernel_code.hh:86
AMDKernelCode::enable_sgpr_private_segment_size
uint32_t enable_sgpr_private_segment_size
Definition: kernel_code.hh:153
GridWorkgroupCountZ
@ GridWorkgroupCountZ
Definition: kernel_code.hh:64
AMDKernelCode::enable_exception_ieee_754_fp_underflow
uint32_t enable_exception_ieee_754_fp_underflow
Definition: kernel_code.hh:139
AMDKernelCode::enable_ordered_append_gds
uint32_t enable_ordered_append_gds
Definition: kernel_code.hh:158
AMDKernelCode::kernel_code_prefetch_byte_offset
int64_t kernel_code_prefetch_byte_offset
Definition: kernel_code.hh:90
WorkgroupInfo
@ WorkgroupInfo
Definition: kernel_code.hh:68
DispatchPtr
@ DispatchPtr
Definition: kernel_code.hh:56
AMDKernelCode::bulky
uint32_t bulky
Definition: kernel_code.hh:117
AMDKernelCode::control_directives
uint64_t control_directives[16]
Definition: kernel_code.hh:187
AMDKernelCode::enable_sgpr_workgroup_info
uint32_t enable_sgpr_workgroup_info
Definition: kernel_code.hh:130

Generated on Tue Mar 23 2021 19:41:27 for gem5 by doxygen 1.8.17