Class NumPyEinsumGenerator

Inheritance Relationships

Base Type

Class Documentation

class NumPyEinsumGenerator : public sequant::PythonEinsumGeneratorBase<NumPyEinsumGeneratorContext>

Generator for NumPy einsum.

Public Functions

NumPyEinsumGenerator() = default
~NumPyEinsumGenerator() = default
inline virtual std::string get_format_name() const override
Returns:

The name of the format this generator will produce (i.e. the name of the programming language and/or framework)

inline void begin_export(const Context &ctx) override
inline void create(const Tensor &tensor, bool zero_init, const Context &ctx) override
inline void load(const Tensor &tensor, bool set_to_zero, const Context &ctx) override
inline void set_to_zero(const Tensor &tensor, const Context &ctx) override
inline void persist(const Tensor &tensor, const Context &ctx) override
inline void load(const Variable &variable, bool set_to_zero, const Context &ctx) override
inline void persist(const Variable &variable, const Context &ctx) override

Protected Functions

inline virtual std::string module_prefix() const override

Backend-specific methods to be overridden by derived classes.

Get the module prefix (np., torch., etc.)

inline virtual std::string file_extension() const override

Get the file extension for persistence (.npy, .pt, etc.)

inline virtual const std::string &available_index_chars() const override

Get the available characters for einsum indices.

inline virtual bool use_optimize_parameter() const override

Backend-specific flag for optimize parameter in einsum.