27#include "neml2/tensors/Tensor.h"
50 std::unordered_map<at::DispatchKey, Tensor> _cached_tensors;
Definition DiagnosticsInterface.cxx:30
c10::TensorOptions TensorOptions
Definition types.h:63
const Tensor & operator()(const TensorOptions &)
Get the tensor with the given tensor options. If the tensor does not exist in the cache,...
Definition TensorCache.cxx:35
TensorCache(std::function< Tensor(const TensorOptions &)> &&)
Construct a new Tensor Cache object.
Definition TensorCache.cxx:29