- There was a typo in swiglu function. With Z element multiplication, this function is swiglu, not a swish
**Self evaluation:**
1. Build test: [X]Passed [ ]Failed [ ]Skipped
2. Run test: [X]Passed [ ]Failed [ ]Skipped
Signed-off-by: skykongkong8 <ss.kong@samsung.com>
#endif
}
-void swish(const unsigned int N, float *X, float *Y, float *Z) {
+void swiglu(const unsigned int N, float *X, float *Y, float *Z) {
#ifdef USE_NEON
- nntrainer::neon::swish(N, X, Y, Z);
+ nntrainer::neon::swiglu(N, X, Y, Z);
#else
unsigned int i = 0;
while (i < N) {
#endif
}
-void swish(const unsigned int N, _FP16 *X, _FP16 *Y, _FP16 *Z) {
+void swiglu(const unsigned int N, _FP16 *X, _FP16 *Y, _FP16 *Z) {
#ifdef USE_NEON
- nntrainer::neon::swish(N, X, Y, Z);
+ nntrainer::neon::swiglu(N, X, Y, Z);
#else
unsigned int i = 0;
while (i < N) {
void calc_trigonometric_vals_dup(unsigned int N_half, float *angle, float *cos_,
float *sin_, unsigned int alpha = 1.0);
/**
- * @brief swish function with neon : X = (Y / (1 + exp( -Y ))) * Z
+ * @brief swiglu function with neon : X = (Y / (1 + exp( -Y ))) * Z
*
* @param N number of elements in X
* @param X float * for Vector X
* @param Y float * for Vector Y
* @param Z float * for Vector Z
*/
-void swish(const unsigned int N, float *X, float *Y, float *Z);
+void swiglu(const unsigned int N, float *X, float *Y, float *Z);
/**
* @brief returns maximum value of the vector X
unsigned int w, _FP16 *in, _FP16 *out,
float *cos_, float *sin_);
/**
- * @brief swish function : X = (Y / (1 + exp( -Y ))) * Z
+ * @brief swiglu function : X = (Y / (1 + exp( -Y ))) * Z
*
* @param N number of elements in X
* @param X _FP16 * for Vector X
* @param Y _FP16 * for Vector Y
* @param Z _FP16 * for Vector Z
*/
-void swish(const unsigned int N, _FP16 *X, _FP16 *Y, _FP16 *Z);
+void swiglu(const unsigned int N, _FP16 *X, _FP16 *Y, _FP16 *Z);
/**
* @brief returns maximum value of the vector X
}
}
-void swish(const unsigned int N, float *X, float *Y, float *Z) {
+void swiglu(const unsigned int N, float *X, float *Y, float *Z) {
unsigned int i = 0;
for (; N - i >= VL_FP32; i += VL_FP32) {
float32x4_t y0_3 = vld1q_f32(&Y[i]);
}
}
-void swish(const unsigned int N, __fp16 *X, __fp16 *Y, __fp16 *Z) {
+void swiglu(const unsigned int N, __fp16 *X, __fp16 *Y, __fp16 *Z) {
unsigned int i = 0;
for (; N - i >= VL_FP16; i += VL_FP16) {
float16x8_t y0_7 = vld1q_f16(&Y[i]);
float *sin_, unsigned int alpha = 1.0);
/**
- * @brief swish function with neon : X = (Y / (1 + exp( -Y ))) * Z
+ * @brief swiglu function with neon : X = (Y / (1 + exp( -Y ))) * Z
*
* @param N number of elements in X
* @param X float * for Vector X
* @param Y float * for Vector Y
* @param Z float * for Vector Z
*/
-void swish(const unsigned int N, float *X, float *Y, float *Z);
+void swiglu(const unsigned int N, float *X, float *Y, float *Z);
/**
* @brief returns maximum value of the vector X
unsigned int w, __fp16 *in, __fp16 *out,
float *cos_, float *sin_);
/**
- * @brief swish function with neon : X = (Y / (1 + exp( -Y ))) * Z
+ * @brief swiglu function with neon : X = (Y / (1 + exp( -Y ))) * Z
*
* @param N number of elements in X
* @param X __fp16 * for Vector X
* @param Y __fp16 * for Vector Y
* @param Z __fp16 * for Vector Z
*/
-void swish(const unsigned int N, __fp16 *X, __fp16 *Y, __fp16 *Z);
+void swiglu(const unsigned int N, __fp16 *X, __fp16 *Y, __fp16 *Z);
/**
* @brief returns maximum value of the vector X