定义

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
struct ActivationParam {
    enum GeLUMode : int{
        TANH_MODE = 0,
        NONE_MODE,
    };
    ActivationType activationType=ACTIVATION_UNDEFINED;
    float scale = 1.0f; // for Swish
    int32_t dim = -1;   // for Swiglu
    GeLUMode geluMode = TANH_MODE;
    uint8_t rsv[8] = {0};
};