MCPcopy Create free account
hub / github.com/FastFlowLM/FastFlowLM / Gemm

Class Gemm

src/include/modules/gemm.hpp:13–51  ·  view source on GitHub ↗

\brief gemm class \note This is a class for the gemm layer

Source from the content-addressed store, hash-verified

11/// \brief gemm class
12/// \note This is a class for the gemm layer
13class Gemm{
14public:
15
16 typedef enum: int {
17 NO_Activation = 0,
18 GeLU = 1,
19 SiLU = 2
20 } Activation_Type_t;
21 Gemm(){}
22
23 /// \brief Constructor
24 /// \param config the configuration
25 /// \param xclbin_name the xclbin name
26 /// \param npu the npu manager
27 Gemm(LM_Config& config);
28 ~Gemm();
29
30 /// \brief Generate the sequence
31 /// \param seq the npu sequence
32 /// \param M the M dimension
33 /// \param K the K dimension
34 /// \param N the N dimension
35 /// \param weight_offset the weight offset
36 /// \param ADD_BIAS whether to add bias
37 /// \param OUTPUT_MODE the output activation mode
38 /// \param bias_offset the bias offset
39 void generate_seq(npu_sequence* seq, const uint32_t M, const uint32_t K, const uint32_t N, const uint32_t weight_offset, bool ADD_BIAS, Activation_Type_t OUTPUT_MODE, const uint32_t bias_offset);
40 void generate_seq(npu_sequence* seq, const uint32_t M, const uint32_t K, const uint32_t N, const uint32_t weight_offset, bool ADD_BIAS, Activation_Type_t OUTPUT_MODE, const uint32_t bias_offset,
41 const uint32_t output_offset
42 );
43 uint32_t get_m() const;
44 uint32_t get_k() const;
45 uint32_t get_n() const;
46
47private:
48 struct Impl;
49 Impl* _impl;
50
51};
52

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected