firedrakeproject / firedrake

Firedrake is an automated system for the portable solution of partial differential equations using the finite element method (FEM)
https://firedrakeproject.org
Other
517 stars 160 forks source link

Add gem Sparse tensor type #3824

Open ReubenHill opened 3 years ago

ReubenHill commented 3 years ago

A sparse version of a gem.Literal would be very useful, e.g. for FInAT dual evaluation where the dual bases are, in general, sparse tensors.

ReubenHill commented 3 years ago

An alternative would be to use libxsmm:

To quote Paul Kelly:

You give libxsmm the dense matrix (with zeroes), and it JITs a matrix multiply implementation for you for that specific matrix, which you can reuse. It does full unrolling so this only works for matrices not much bigger than 100x100

wence- commented 3 years ago

I think both of these probably potentially have a place. AIUI, for libxsmm to work, the dense matrix needs to exist first, which if it is very large is bad news. libxsmm doesn't really work above 100x100