We currently have a bug in decoding workitem ID from the kernel
descriptor with multiple dimensions. The enable_vgpr_workitem_id bits
are currently seperated into x and y components, when they should be
treated as a single 2 bit value, where y is enabled when it is > 0,
and z is enabled when it is > 1. The current setup allows a kernel
launch with vgprs reserved for the z dimension and not the y dimension,
which is incorrect.
Change-Id: Iee64b207feb95bcf064898d5db33b8f201e25323
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/29965
Maintainer: Anthony Gutierrez <anthony.gutierrez@amd.com>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Matt Sinclair <mattdsinclair@gmail.com>
* workitem Id in the X dimension is always initialized.
*/
initialVgprState.set(WorkitemIdX, true);
- initialVgprState.set(WorkitemIdY, akc->enable_vgpr_workitem_id_y);
- initialVgprState.set(WorkitemIdZ, akc->enable_vgpr_workitem_id_z);
+ initialVgprState.set(WorkitemIdY, akc->enable_vgpr_workitem_id > 0);
+ initialVgprState.set(WorkitemIdZ, akc->enable_vgpr_workitem_id > 1);
}
// name of the kernel associated with the AQL entry
uint32_t enable_sgpr_workgroup_id_y : 1;
uint32_t enable_sgpr_workgroup_id_z : 1;
uint32_t enable_sgpr_workgroup_info : 1;
- uint32_t enable_vgpr_workitem_id_y : 1;
- uint32_t enable_vgpr_workitem_id_z : 1;
+ uint32_t enable_vgpr_workitem_id : 2;
uint32_t enable_exception_address_watch : 1;
uint32_t enable_exception_memory_violation : 1;
uint32_t granulated_lds_size : 9;