@@ -2794,7 +2794,6 @@ inline static void ggml_vec_mad_f32_unroll(const int n, const int xs, const int
2794
2794
#endif
2795
2795
}
2796
2796
2797
- #ifdef XBOX_INVESTIGATE // slower than original version
2798
2797
void ggml_vec_scale_f32(const int64_t n, float * y, const float v) {
2799
2798
#ifdef GGML_SIMD
2800
2799
int64_t i = 0;
@@ -2842,40 +2841,6 @@ void ggml_vec_scale_f32(const int64_t n, float * y, const float v) {
2842
2841
#endif
2843
2842
}
2844
2843
2845
- #else // XBOX_INVESTIGATE
2846
-
2847
- inline static void ggml_vec_scale_f32(const int n, float * y, const float v) {
2848
- #if defined(GGML_USE_ACCELERATE)
2849
- vDSP_vsmul(y, 1, &v, y, 1, n);
2850
- #elif defined(GGML_SIMD)
2851
- const int np = (n & ~(GGML_F32_STEP - 1));
2852
-
2853
- GGML_F32_VEC vx = GGML_F32_VEC_SET1(v);
2854
-
2855
- GGML_F32_VEC ay[GGML_F32_ARR];
2856
-
2857
- for (int i = 0; i < np; i += GGML_F32_STEP) {
2858
- for (int j = 0; j < GGML_F32_ARR; j++) {
2859
- ay[j] = GGML_F32_VEC_LOAD(y + i + j*GGML_F32_EPR);
2860
- ay[j] = GGML_F32_VEC_MUL(ay[j], vx);
2861
-
2862
- GGML_F32_VEC_STORE(y + i + j*GGML_F32_EPR, ay[j]);
2863
- }
2864
- }
2865
-
2866
- // leftovers
2867
- for (int i = np; i < n; ++i) {
2868
- y[i] *= v;
2869
- }
2870
- #else
2871
- // scalar
2872
- for (int i = 0; i < n; ++i) {
2873
- y[i] *= v;
2874
- }
2875
- #endif
2876
- }
2877
- #endif // XBOX_INVESTIGATE
2878
-
2879
2844
inline static void ggml_vec_scale_f16(const int n, ggml_fp16_t * y, const float v) {
2880
2845
#if defined(GGML_SIMD)
2881
2846
const int np = (n & ~(GGML_F16_STEP - 1));
@@ -3059,8 +3024,6 @@ inline static void ggml_vec_sum_f16_ggf(const int n, float * s, const ggml_fp16_
3059
3024
*s = sum;
3060
3025
}
3061
3026
3062
- #ifdef XBOX_INVESTIGATE // slower than original version
3063
-
3064
3027
void ggml_vec_max_f32(const int64_t n, float * s, const float * x) {
3065
3028
float max = -INFINITY;
3066
3029
#ifdef GGML_SIMD
@@ -3114,21 +3077,6 @@ void ggml_vec_max_f32(const int64_t n, float * s, const float * x) {
3114
3077
*s = max;
3115
3078
}
3116
3079
3117
- #else // XBOX_INVESTIGATE
3118
-
3119
- inline static void ggml_vec_max_f32(const int n, float * s, const float * x) {
3120
- #ifndef GGML_USE_ACCELERATE
3121
- float max = -INFINITY;
3122
- for (int i = 0; i < n; ++i) {
3123
- max = MAX(max, x[i]);
3124
- }
3125
- *s = max;
3126
- #else
3127
- vDSP_maxv(x, 1, s, n);
3128
- #endif
3129
- }
3130
- #endif // XBOX_INVESTIGATE
3131
-
3132
3080
inline static void ggml_vec_norm_inv_f32(const int n, float * s, const float * x) {
3133
3081
ggml_vec_norm_f32(n, s, x);
3134
3082
*s = 1.f/(*s);
0 commit comments