Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Getting error on make -j4 gpt-2 #45

Open
praveenkumar91 opened this issue Mar 22, 2023 · 1 comment
Open

Getting error on make -j4 gpt-2 #45

praveenkumar91 opened this issue Mar 22, 2023 · 1 comment

Comments

@praveenkumar91
Copy link

praveenkumar91 commented Mar 22, 2023

Consolidate compiler generated dependencies of target ggml
[ 33%] Built target ggml_utils
[ 50%] Building C object src/CMakeFiles/ggml.dir/ggml.c.o
In file included from /usr/lib/gcc/x86_64-redhat-linux/8/include/immintrin.h:99,
from /home/kumapra/MACHINE/ggml/src/ggml.c:153:
/home/kumapra/MACHINE/ggml/src/ggml.c: In function ‘ggml_vec_dot_f16’:
/usr/lib/gcc/x86_64-redhat-linux/8/include/f16cintrin.h:52:1: error: inlining failed in call to always_inline ‘_mm256_cvtph_ps’: target specific option mismatch
_mm256_cvtph_ps (__m128i __A)
^~~~~~~~~~~~~~~
/home/kumapra/MACHINE/ggml/src/ggml.c:543:33: note: called from here
#define GGML_F32Cx8_LOAD(x) _mm256_cvtph_ps(_mm_loadu_si128((__m128i )(x)))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/kumapra/MACHINE/ggml/src/ggml.c:553:37: note: in expansion of macro ‘GGML_F32Cx8_LOAD’
#define GGML_F16_VEC_LOAD(p, i) GGML_F32Cx8_LOAD(p)
^~~~~~~~~~~~~~~~
/home/kumapra/MACHINE/ggml/src/ggml.c:906:21: note: in expansion of macro ‘GGML_F16_VEC_LOAD’
ay[j] = GGML_F16_VEC_LOAD(y + i + j
GGML_F16_EPR, j);
^~~~~~~~~~~~~~~~~
In file included from /usr/lib/gcc/x86_64-redhat-linux/8/include/immintrin.h:99,
from /home/kumapra/MACHINE/ggml/src/ggml.c:153:
/usr/lib/gcc/x86_64-redhat-linux/8/include/f16cintrin.h:52:1: error: inlining failed in call to always_inline ‘_mm256_cvtph_ps’: target specific option mismatch
_mm256_cvtph_ps (__m128i __A)
^~~~~~~~~~~~~~~
/home/kumapra/MACHINE/ggml/src/ggml.c:543:33: note: called from here
#define GGML_F32Cx8_LOAD(x) _mm256_cvtph_ps(_mm_loadu_si128((__m128i )(x)))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/kumapra/MACHINE/ggml/src/ggml.c:553:37: note: in expansion of macro ‘GGML_F32Cx8_LOAD’
#define GGML_F16_VEC_LOAD(p, i) GGML_F32Cx8_LOAD(p)
^~~~~~~~~~~~~~~~
/home/kumapra/MACHINE/ggml/src/ggml.c:905:21: note: in expansion of macro ‘GGML_F16_VEC_LOAD’
ax[j] = GGML_F16_VEC_LOAD(x + i + j
GGML_F16_EPR, j);
^~~~~~~~~~~~~~~~~
In file included from /usr/lib/gcc/x86_64-redhat-linux/8/include/immintrin.h:99,
from /home/kumapra/MACHINE/ggml/src/ggml.c:153:
/usr/lib/gcc/x86_64-redhat-linux/8/include/f16cintrin.h:52:1: error: inlining failed in call to always_inline ‘_mm256_cvtph_ps’: target specific option mismatch
_mm256_cvtph_ps (__m128i __A)
^~~~~~~~~~~~~~~
/home/kumapra/MACHINE/ggml/src/ggml.c:543:33: note: called from here
#define GGML_F32Cx8_LOAD(x) _mm256_cvtph_ps(_mm_loadu_si128((__m128i )(x)))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/kumapra/MACHINE/ggml/src/ggml.c:553:37: note: in expansion of macro ‘GGML_F32Cx8_LOAD’
#define GGML_F16_VEC_LOAD(p, i) GGML_F32Cx8_LOAD(p)
^~~~~~~~~~~~~~~~
/home/kumapra/MACHINE/ggml/src/ggml.c:905:21: note: in expansion of macro ‘GGML_F16_VEC_LOAD’
ax[j] = GGML_F16_VEC_LOAD(x + i + j
GGML_F16_EPR, j);
^~~~~~~~~~~~~~~~~
In file included from /usr/lib/gcc/x86_64-redhat-linux/8/include/immintrin.h:99,
from /home/kumapra/MACHINE/ggml/src/ggml.c:153:
/usr/lib/gcc/x86_64-redhat-linux/8/include/f16cintrin.h:52:1: error: inlining failed in call to always_inline ‘_mm256_cvtph_ps’: target specific option mismatch
_mm256_cvtph_ps (__m128i __A)
^~~~~~~~~~~~~~~
/home/kumapra/MACHINE/ggml/src/ggml.c:543:33: note: called from here
#define GGML_F32Cx8_LOAD(x) _mm256_cvtph_ps(_mm_loadu_si128((__m128i )(x)))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/kumapra/MACHINE/ggml/src/ggml.c:553:37: note: in expansion of macro ‘GGML_F32Cx8_LOAD’
#define GGML_F16_VEC_LOAD(p, i) GGML_F32Cx8_LOAD(p)
^~~~~~~~~~~~~~~~
/home/kumapra/MACHINE/ggml/src/ggml.c:906:21: note: in expansion of macro ‘GGML_F16_VEC_LOAD’
ay[j] = GGML_F16_VEC_LOAD(y + i + j
GGML_F16_EPR, j);
^~~~~~~~~~~~~~~~~
In file included from /usr/lib/gcc/x86_64-redhat-linux/8/include/immintrin.h:99,
from /home/kumapra/MACHINE/ggml/src/ggml.c:153:
/usr/lib/gcc/x86_64-redhat-linux/8/include/f16cintrin.h:52:1: error: inlining failed in call to always_inline ‘_mm256_cvtph_ps’: target specific option mismatch
_mm256_cvtph_ps (__m128i __A)
^~~~~~~~~~~~~~~
/home/kumapra/MACHINE/ggml/src/ggml.c:543:33: note: called from here
#define GGML_F32Cx8_LOAD(x) _mm256_cvtph_ps(_mm_loadu_si128((__m128i )(x)))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/kumapra/MACHINE/ggml/src/ggml.c:553:37: note: in expansion of macro ‘GGML_F32Cx8_LOAD’
#define GGML_F16_VEC_LOAD(p, i) GGML_F32Cx8_LOAD(p)
^~~~~~~~~~~~~~~~
/home/kumapra/MACHINE/ggml/src/ggml.c:905:21: note: in expansion of macro ‘GGML_F16_VEC_LOAD’
ax[j] = GGML_F16_VEC_LOAD(x + i + j
GGML_F16_EPR, j);
^~~~~~~~~~~~~~~~~
In file included from /usr/lib/gcc/x86_64-redhat-linux/8/include/immintrin.h:99,
from /home/kumapra/MACHINE/ggml/src/ggml.c:153:
/usr/lib/gcc/x86_64-redhat-linux/8/include/f16cintrin.h:52:1: error: inlining failed in call to always_inline ‘_mm256_cvtph_ps’: target specific option mismatch
_mm256_cvtph_ps (__m128i __A)
^~~~~~~~~~~~~~~
/home/kumapra/MACHINE/ggml/src/ggml.c:543:33: note: called from here
#define GGML_F32Cx8_LOAD(x) _mm256_cvtph_ps(_mm_loadu_si128((__m128i )(x)))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/kumapra/MACHINE/ggml/src/ggml.c:553:37: note: in expansion of macro ‘GGML_F32Cx8_LOAD’
#define GGML_F16_VEC_LOAD(p, i) GGML_F32Cx8_LOAD(p)
^~~~~~~~~~~~~~~~
/home/kumapra/MACHINE/ggml/src/ggml.c:906:21: note: in expansion of macro ‘GGML_F16_VEC_LOAD’
ay[j] = GGML_F16_VEC_LOAD(y + i + j
GGML_F16_EPR, j);
^~~~~~~~~~~~~~~~~
make[3]: *** [src/CMakeFiles/ggml.dir/build.make:76: src/CMakeFiles/ggml.dir/ggml.c.o] Error 1
make[2]: *** [CMakeFiles/Makefile2:205: src/CMakeFiles/ggml.dir/all] Error 2
make[1]: *** [CMakeFiles/Makefile2:499: examples/gpt-2/CMakeFiles/gpt-2.dir/rule] Error 2
make: *** [Makefile:322: gpt-2] Error 2

@Computeiful
Copy link

I was able to overcome this issue by undefine-ing the AVX2 macro in ggml.c, specifically above the definition for the vec_dot functions, for example something like:

// Undefine the __AVX2__ macro so the function uses __AVX__ instead.
#undef __AVX2__

static void ggml_vec_dot_q4_0_q8_0(const int n, float * restrict s, const void * restrict vx, const void * restrict vy);
static void ggml_vec_dot_q4_1_q8_1(const int n, float * restrict s, const void * restrict vx, const void * restrict vy);
static void ggml_vec_dot_q5_0_q8_0(const int n, float * restrict s, const void * restrict vx, const void * restrict vy);
static void ggml_vec_dot_q5_1_q8_1(const int n, float * restrict s, const void * restrict vx, const void * restrict vy);
static void ggml_vec_dot_q8_0_q8_0(const int n, float * restrict s, const void * restrict vx, const void * restrict vy);

CCLDArjun pushed a commit to CCLDArjun/ggml that referenced this issue Dec 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants