mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-07 00:38:48 +02:00
broadcom/compiler: Add v8dot and setnnmode scheduler dependencies.
As nnmode register is read by v8dot instruction we need to add dependencies between setnnmode instructions and v8dot via the nnmode register, so they are scheduled correcty using last_nn_mode virtual register.. Add a last_nn_mode virtual register to the scheduler state and create: - Write dependencies for all SETNNMODE variants - Read dependencies for V8DOT. This follows the same pattern as the existing MULTOP/UMUL24 rtop tracking. Assisted-by: Claude Opus 4.6 Reviewed-by: Iago Toral Quiroga <itoral@igalia.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41255>
This commit is contained in:
parent
33a700be91
commit
24ecc9cbcc
1 changed files with 17 additions and 0 deletions
|
|
@ -86,6 +86,7 @@ struct schedule_state {
|
|||
struct schedule_node *last_rtop;
|
||||
struct schedule_node *last_unifa;
|
||||
struct schedule_node *last_setmsf;
|
||||
struct schedule_node *last_nn_mode;
|
||||
enum direction dir;
|
||||
/* Estimated cycle when the current instruction would start. */
|
||||
uint32_t time;
|
||||
|
|
@ -418,6 +419,16 @@ calculate_deps(struct schedule_state *state, struct schedule_node *n)
|
|||
add_read_dep(state, state->last_setmsf, n);
|
||||
break;
|
||||
|
||||
case V3D_QPU_A_SETNNMODE_UU:
|
||||
case V3D_QPU_A_SETNNMODE_SU:
|
||||
case V3D_QPU_A_SETNNMODE_US:
|
||||
case V3D_QPU_A_SETNNMODE_SS:
|
||||
/* SETNNMODE sets the sign nnmode register. It must be set
|
||||
* before any v8dot that depends on the mode setting. It
|
||||
* applies from the current instruction.
|
||||
*/
|
||||
add_write_dep(state, &state->last_nn_mode, n);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
|
@ -436,6 +447,12 @@ calculate_deps(struct schedule_state *state, struct schedule_node *n)
|
|||
*/
|
||||
add_read_dep(state, state->last_rtop, n);
|
||||
break;
|
||||
case V3D_QPU_M_V8DOT:
|
||||
/* V8DOT reads the NN mode to determine sign interpretation
|
||||
* of the 8-bit dot product inputs.
|
||||
*/
|
||||
add_read_dep(state, state->last_nn_mode, n);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue