mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-26 12:50:10 +01:00
etnaviv/nn: Don't shortcut ZRL bits calculation
In some (probably malformed) cases, even weights BOs for strided or depthwise convolutions can become bigger when using ZRL compression. To avoid running out of space in the BO, play safe and calculate the actual optimum ZRL bit count. This does slow compilation for quite a bit, though (2x slower for MobileNetV1). Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28879>
This commit is contained in:
parent
d46e68c89a
commit
9bac40b796
1 changed files with 0 additions and 10 deletions
|
|
@ -1253,16 +1253,6 @@ calculate_zrl_bits(struct etna_ml_subgraph *subgraph, const struct etna_operatio
|
|||
unsigned best_compressed_size;
|
||||
unsigned best_zrl_bits;
|
||||
|
||||
/* On HW that doesn't natively support depthwise and strided convolutions,
|
||||
* we have to lower them and pad with lots of zeroes. We can be pretty certain
|
||||
* that max bits of compression will help these jobs.
|
||||
*/
|
||||
if (operation->depthwise ||
|
||||
operation->stride > 1) {
|
||||
|
||||
return max_zrl_bits;
|
||||
}
|
||||
|
||||
/* These are very unlikely to have enough zeroes for compression to be useful. */
|
||||
if (operation->addition ||
|
||||
operation->pointwise) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue