mirror of https://gitlab.freedesktop.org/mesa/mesa
etnaviv/nn: Make parallel jobs disabled by default
It doesn't work for all models, with the same happening to the
proprietary driver. There may be some hardware limitation on at least
the HW that is currently supported in Mesa.
So match what the proprietary driver is doing and disable by default.
Fixes: d6473ce28e
("etnaviv: Use NN cores to accelerate convolutions")
Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28918>
This commit is contained in:
parent
b406759479
commit
1277f58d8a
|
@ -62,7 +62,7 @@ enum etna_dbg {
|
|||
ETNA_DBG_LINEAR_PE = BITFIELD_BIT(25), /* Enable linear PE */
|
||||
ETNA_DBG_NO_MSAA = BITFIELD_BIT(26), /* Disable MSAA */
|
||||
ETNA_DBG_SHARED_TS = BITFIELD_BIT(27), /* Enable TS sharing */
|
||||
ETNA_DBG_NPU_NO_PARALLEL = BITFIELD_BIT(28), /* Disable parallelism inside NPU batches */
|
||||
ETNA_DBG_NPU_PARALLEL = BITFIELD_BIT(28), /* Enable parallelism inside NPU batches (unsafe) */
|
||||
ETNA_DBG_NPU_NO_BATCHING = BITFIELD_BIT(29), /* Disable batching NPU jobs */
|
||||
};
|
||||
|
||||
|
|
|
@ -342,7 +342,7 @@ close_batch(struct pipe_context *pctx)
|
|||
struct etna_cmd_stream *stream = ctx->stream;
|
||||
|
||||
unsigned cache = VIVS_GL_FLUSH_CACHE_DEPTH | VIVS_GL_FLUSH_CACHE_COLOR | VIVS_GL_FLUSH_CACHE_UNK10;
|
||||
if (DBG_ENABLED(ETNA_DBG_NPU_NO_PARALLEL))
|
||||
if (!DBG_ENABLED(ETNA_DBG_NPU_PARALLEL))
|
||||
cache |= VIVS_GL_FLUSH_CACHE_UNK11 | VIVS_GL_FLUSH_CACHE_SHADER_L1;
|
||||
|
||||
etna_set_state(stream, VIVS_GL_FLUSH_CACHE, cache);
|
||||
|
|
|
@ -1377,7 +1377,7 @@ etna_ml_emit_operation_nn(struct etna_ml_subgraph *subgraph,
|
|||
unsigned offset = idx + 1;
|
||||
unsigned nn_config = VIVS_GL_NN_CONFIG_NN_CORE_COUNT(0x0); /* This disables power control of NN cores and enables all of them */
|
||||
|
||||
if (DBG_ENABLED(ETNA_DBG_NPU_NO_PARALLEL)) {
|
||||
if (!DBG_ENABLED(ETNA_DBG_NPU_PARALLEL)) {
|
||||
nn_config |= VIVS_GL_NN_CONFIG_SMALL_BATCH;
|
||||
offset = 0;
|
||||
}
|
||||
|
|
|
@ -759,7 +759,7 @@ etna_ml_emit_operation_tp(struct etna_ml_subgraph *subgraph,
|
|||
unsigned tp_core_count = ctx->screen->specs.tp_core_count;
|
||||
struct etna_cmd_stream *stream = ctx->stream;
|
||||
bool more_than_one_tp_job = operation->configs[1] != NULL;
|
||||
bool parallel = !DBG_ENABLED(ETNA_DBG_NPU_NO_PARALLEL);
|
||||
bool parallel = DBG_ENABLED(ETNA_DBG_NPU_PARALLEL);
|
||||
|
||||
for (unsigned j = 0; j < tp_core_count && operation->configs[j]; j++) {
|
||||
unsigned offset = parallel ? idx + 1 : 0;
|
||||
|
|
|
@ -77,7 +77,7 @@ static const struct debug_named_value etna_debug_options[] = {
|
|||
{"no_msaa", ETNA_DBG_NO_MSAA, "Disable MSAA support"},
|
||||
{"shared_ts", ETNA_DBG_SHARED_TS, "Enable TS sharing"},
|
||||
{"perf", ETNA_DBG_PERF, "Enable performance warnings"},
|
||||
{"npu_no_parallel",ETNA_DBG_NPU_NO_PARALLEL, "Disable parallelism inside NPU batches"},
|
||||
{"npu_parallel", ETNA_DBG_NPU_PARALLEL, "Enable parallelism inside NPU batches (unsafe)"},
|
||||
{"npu_no_batching",ETNA_DBG_NPU_NO_BATCHING, "Disable batching NPU jobs"},
|
||||
DEBUG_NAMED_VALUE_END
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue