An example was shown on slack which highlights that there are some type instabilities in the foreigncall rule for gemm. To replicate, look at the IR for the pullback generated when runningTapir.build_rrule(BLAS.gemm!, 'N', 'N', false, randn(5, 5), randn(5, 5), false, randn(5, 5)).
This is a very slightly awkward example to write a test for, because it involves creating a lot of pointers. This likely speaks to a more general lack of good JET-based inference checks on hand-written rules for BLAS and LAPACK.
An example was shown on slack which highlights that there are some type instabilities in the foreigncall rule for gemm. To replicate, look at the IR for the pullback generated when running
Tapir.build_rrule(BLAS.gemm!, 'N', 'N', false, randn(5, 5), randn(5, 5), false, randn(5, 5))
.This is a very slightly awkward example to write a test for, because it involves creating a lot of pointers. This likely speaks to a more general lack of good JET-based inference checks on hand-written rules for BLAS and LAPACK.