[flopscope] Bug report: empty contractions receive negative FLOP charges (budget increases)

While testing edge cases in flopscope v0.8.0rc5, I found that zero-sized contractions (e.g. matmul with an empty inner dimension) are charged negative FLOPs, which increases the remaining budget inside a BudgetContext. Since this could affect budget accounting fairness, I filed a report with a reproduction and a proposed fix:

Issue: Zero-sized contractions can produce negative FLOP charges and increase the remaining budget · Issue #145 · AIcrowd/flopscope · GitHub
PR (fix + regression tests): fix(cost): charge zero for empty contractions and reductions by jtelcc · Pull Request #146 · AIcrowd/flopscope · GitHub

Details and reproduction script are in the issue.