From d8a2abe3481358fa6cc874bc4bd4b5c23a49e39c Mon Sep 17 00:00:00 2001 From: Connor Abbott Date: Wed, 10 Mar 2021 18:10:51 +0100 Subject: [PATCH] freedreno/computerator: Add script for finding reg file size This helps with finding the various parameters introduced in the last commit. Part-of: --- .../computerator/examples/test-regfile.sh | 53 +++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 src/freedreno/computerator/examples/test-regfile.sh diff --git a/src/freedreno/computerator/examples/test-regfile.sh b/src/freedreno/computerator/examples/test-regfile.sh new file mode 100644 index 00000000000..7da4eb7fe19 --- /dev/null +++ b/src/freedreno/computerator/examples/test-regfile.sh @@ -0,0 +1,53 @@ +#!/bin/bash + +# This tests for the size of the register file. We do this by launching a +# lot of workgroups with only one invocation, which causes the GPU to be +# saturated with in-flight waves. Each thread records its wave id using "getwid" +# (only available in a6xx+!) and stores it in the buffer. We then vary the +# register footprint by introducing uses of higher and higher registers. This +# lets us determine: +# 1. The total number of waves available (always 16 for known models) +# 2. The wave granularity (how many waves are always launched together, always 2 +# for known models). +# 3. The total size of the register file that is divvied up between the waves. + +set -e + +gen_shader() { + n=$1; + cat <