libCEED
libCEED copied to clipboard
fluids: Add PyTorch external DD SGS evaluation
Add PyTorch as a external DD SGS evaluation. This is a "follow up" to #1361 where we use PyTorch to run the data-driven model instead of a native implementation.
ToDos:
- [x] Add in
PetscLogEvents(particularly for inference and the data transfer steps) - [x] Add documentation
- [x] Cleanup the Makefile additions (remove the automatic
USE_LIBTORCHtesting) - [x] Add weak symbols so that this can be compiled without pytorch
- [x] Add command line switch to enable pytorch vs internal sequential
- [x] Move createPyTorchModel into the testing directory (it's only useful for documenting the creation of the testing model (instead of it just being a binary blob).
- [x] Rename "sequential_internal" to "sequential_ceed"
This is good for review now. Tests pass on Noether for CPU and CUDA. I'm having some difficulties getting PyTorch+ROCM to build with Spack, but that's not a huge priority since we don't have hardware to run that on right now.