diff options
author | Alyssa Rosenzweig <[email protected]> | 2020-04-14 13:19:13 -0400 |
---|---|---|
committer | Alyssa Rosenzweig <[email protected]> | 2020-04-17 16:25:36 -0400 |
commit | 1c45b58cebebf7f21035b22a98af8829fc002db0 (patch) | |
tree | f3812ab47715ade9d60813a0095ff2a94940ad3b /src/panfrost/bifrost | |
parent | 5546d1958b78ba9d933606960a888b62edbf8d01 (diff) |
pan/bit: Add FMA_REDUCE test
Signed-off-by: Alyssa Rosenzweig <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4615>
Diffstat (limited to 'src/panfrost/bifrost')
-rw-r--r-- | src/panfrost/bifrost/test/bi_test_pack.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/panfrost/bifrost/test/bi_test_pack.c b/src/panfrost/bifrost/test/bi_test_pack.c index 9d4b6fe723a..b68d10a07c9 100644 --- a/src/panfrost/bifrost/test/bi_test_pack.c +++ b/src/panfrost/bifrost/test/bi_test_pack.c @@ -303,6 +303,21 @@ bit_frexp_helper(struct panfrost_device *dev, uint32_t *input, enum bit_debug de } static void +bit_reduce_helper(struct panfrost_device *dev, uint32_t *input, enum bit_debug debug) +{ + bi_instruction ins = bit_ins(BI_REDUCE_FMA, 2, nir_type_float, 32); + + for (enum bi_reduce_op op = 0; op <= BI_REDUCE_ADD_FREXPM; ++op) { + ins.op.reduce = op; + + if (!bit_test_single(dev, &ins, input, true, debug)) { + fprintf(stderr, "FAIL: reduce.%s\n", + bi_reduce_op_name(op)); + } + } +} + +static void bit_convert_helper(struct panfrost_device *dev, unsigned from_size, unsigned to_size, unsigned cx, unsigned cy, bool FMA, enum bifrost_roundmode roundmode, @@ -406,4 +421,5 @@ bit_packing(struct panfrost_device *dev, enum bit_debug debug) } bit_frexp_helper(dev, (uint32_t *) input32, debug); + bit_reduce_helper(dev, (uint32_t *) input32, debug); } |