27#include "neml2/tensors/Tensor.h"
50 bool operator==(
const CacheKey & other)
const;
57 std::vector<CacheKey> _cached_keys;
60 std::vector<Tensor> _cached_tensors;
Definition DiagnosticsInterface.cxx:30
c10::Device Device
Definition types.h:63
constexpr auto kFloat64
Definition types.h:50
c10::TensorOptions TensorOptions
Definition types.h:60
c10::ScalarType Dtype
Definition types.h:61
Definition TensorCache.h:32
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:36
TensorCache(std::function< Tensor(const TensorOptions &)> &&)
Construct a new Tensor Cache object.
Definition TensorCache.cxx:30