aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlyssa Rosenzweig <[email protected]>2020-04-17 15:52:18 -0400
committerAlyssa Rosenzweig <[email protected]>2020-04-17 16:25:36 -0400
commitc05860789a858778d1cfcb5e8dec1168b1114cb0 (patch)
treeda27018b0b40d23f888bfc14ed8364b5a2a9a78b
parent4d0f94103618a7f351774a2fb3208c8aefe1f315 (diff)
pan/bi: Lower special ops to 32-bit
We don't have 16-bit tables. We could probably do a bit better to avoid so many conversions but hey. Signed-off-by: Alyssa Rosenzweig <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4615>
-rw-r--r--src/panfrost/bifrost/bifrost_nir_algebraic.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/panfrost/bifrost/bifrost_nir_algebraic.py b/src/panfrost/bifrost/bifrost_nir_algebraic.py
index ca89ce29f37..5e2c65c68ac 100644
--- a/src/panfrost/bifrost/bifrost_nir_algebraic.py
+++ b/src/panfrost/bifrost/bifrost_nir_algebraic.py
@@ -80,6 +80,12 @@ for op in ('u2u', 'i2i', 'f2f', 'i2f', 'u2f', 'f2i', 'f2u'):
srcsz *= 2
dstsz *= 2
+# Bifrost doesn't have fp16 for a lot of special ops
+SPECIAL = ['fexp2', 'flog2', 'fsin', 'fcos']
+
+for op in SPECIAL:
+ converts += [((op + '@16', a), ('f2f16', (op, ('f2f32', a))))]
+
def main():
parser = argparse.ArgumentParser()
parser.add_argument('-p', '--import-path', required=True)