\brief gemm class \note This is a class for the gemm layer
| 11 | /// \brief gemm class |
| 12 | /// \note This is a class for the gemm layer |
| 13 | class Gemm{ |
| 14 | public: |
| 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 | |
| 47 | private: |
| 48 | struct Impl; |
| 49 | Impl* _impl; |
| 50 | |
| 51 | }; |
| 52 |
nothing calls this directly
no outgoing calls
no test coverage detected