From 31a7e49613502290afb5392e237f15a32bd77a37 Mon Sep 17 00:00:00 2001 From: Alyssa Rosenzweig Date: Mon, 21 Dec 2020 15:45:23 -0500 Subject: [PATCH] pan/bi: Add bi_can_{fma, add} predicates Stubs due to some edge cases, for the scheduler. Signed-off-by: Alyssa Rosenzweig Reviewed-by: Boris Brezillon Part-of: --- src/panfrost/bifrost/bi_schedule.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/panfrost/bifrost/bi_schedule.c b/src/panfrost/bifrost/bi_schedule.c index 7b1f2f9332b..7e900bb7751 100644 --- a/src/panfrost/bifrost/bi_schedule.c +++ b/src/panfrost/bifrost/bi_schedule.c @@ -150,6 +150,22 @@ bi_singleton(void *memctx, bi_instr *ins, return u; } +/* Scheduler predicates */ + +ASSERTED static bool +bi_can_fma(bi_instr *ins) +{ + /* TODO: some additional fp16 constraints */ + return bi_opcode_props[ins->op].fma; +} + +ASSERTED static bool +bi_can_add(bi_instr *ins) +{ + /* TODO: some additional fp16 constraints */ + return bi_opcode_props[ins->op].add; +} + /* Eventually, we'll need a proper scheduling, grouping instructions * into clauses and ordering/assigning grouped instructions to the * appropriate FMA/ADD slots. Right now we do the dumbest possible