CEED / CEED/libCEED

Multivector/batching/Kronecker support

Open
#673 0 comments 0 reactions 0 assignees View on GitHub
enhancement performance
Dominant language
C
Stars
265
Forks
78
Avg merge
2d 8h
Merged PRs (30d)
11

Description

We should support batched application of CeedOperator to vectors. One approach is to make a new constructor
```c
int CeedOperatorCreateKroneckerProduct(CeedOperator J, CeedInt m, const CeedScalar *T, CeedOperator *JxT);
```
where `T` is an `m` × `m` dense matrix (could be identity) and we'll apply this new operator `J ⊗ T` to normal vectors. Common cases in machine learning would be batch sizes that are powers of 2, like 16, 32, etc. The operator `T` exists to avoid extra passes over the data in stochastic Galerkin and related methods. To support fused methods for implicit Runge-Kutta, we'd instead have operators of the form `J ⊗ T + I ⊗ S` where `I` is the identity in the spatial domain. This is supported in PETSc's "KAIJ" matrix format where `J` is an assembled sparse matrix.

The other approach is to make a multivector type or an attribute of `CeedVector` that endows it with multiple columns. If we assume row-aligned (good for vectorization), then it's the same as `J ⊗ I` applied to a single vector. This case is more restricted, but easier to explain to people who only want the simplest batching.

Cc: @stefanozampini

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.