Skip to content

Building on Intel Raptor Lake fails #3968

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

Closed
linouxis9 opened this issue Mar 27, 2023 · 8 comments · Fixed by #3970
Closed

Building on Intel Raptor Lake fails #3968

linouxis9 opened this issue Mar 27, 2023 · 8 comments · Fixed by #3970

Comments

@linouxis9
Copy link
Contributor

linouxis9 commented Mar 27, 2023

I would say it's an issue detecting the CPU features as forcing the TARGET=HAWELL make it work? Thanks!

Ubuntu 22.04, on Intel i5-13500, with gcc-11:

make -j
...
In file included from /usr/lib/gcc/x86_64-linux-gnu/11/include/immintrin.h:99,
                 from /root/OpenBLAS/kernel/x86_64/../generic/../simd/intrin.h:51,
                 from /root/OpenBLAS/kernel/x86_64/../generic/dot.c:30,
                 from /root/OpenBLAS/build/kernel/CMakeFiles/sdot_k.c:7:
/usr/lib/gcc/x86_64-linux-gnu/11/include/fmaintrin.h:63:1: error: inlining failed in call to ‘always_inline’ ‘_mm256_fmadd_ps’: target specific option mismatch
   63 | _mm256_fmadd_ps (__m256 __A, __m256 __B, __m256 __C)
      | ^~~~~~~~~~~~~~~
In file included from /root/OpenBLAS/kernel/x86_64/../generic/../simd/intrin.h:63,
                 from /root/OpenBLAS/kernel/x86_64/../generic/dot.c:30,
                 from /root/OpenBLAS/build/kernel/CMakeFiles/sdot_k.c:7:
/root/OpenBLAS/kernel/x86_64/../generic/../simd/intrin_avx.h:22:26: note: called from here
   22 |     #define v_muladd_f32 _mm256_fmadd_ps
/root/OpenBLAS/kernel/x86_64/../generic/dot.c:79:21: note: in expansion of macro ‘v_muladd_f32’
   79 |             vsum0 = v_muladd_f32(
      |                     ^~~~~~~~~~~~
make[2]: *** [kernel/CMakeFiles/kernel.dir/build.make:341: kernel/CMakeFiles/kernel.dir/CMakeFiles/sdot_k.c.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:584: kernel/CMakeFiles/kernel.dir/all] Error 2
make: *** [Makefile:146: all] Error 2

getarch 1:

#define INTEL_UNKNOWN
#define L1_CODE_SIZE 32768
#define L1_CODE_ASSOCIATIVE 8
#define L1_CODE_LINESIZE 64
#define L1_DATA_SIZE 49152
#define L1_DATA_ASSOCIATIVE 12
#define L1_DATA_LINESIZE 64
#define L2_SIZE 1310720
#define L2_ASSOCIATIVE 7
#define L2_LINESIZE 64
#define DTB_DEFAULT_ENTRIES 32
#define HAVE_CMOV
#define HAVE_MMX
#define HAVE_SSE
#define HAVE_SSE2
#define HAVE_SSE3
#define HAVE_SSSE3
#define HAVE_SSE4_1
#define HAVE_SSE4_2
#define HAVE_AVX
#define HAVE_AVX2
#define HAVE_FMA3
#define HAVE_CFLUSH
#define NUM_SHAREDCACHE 2
#define NUM_CORES 64
#define CORE_PRESCOTT
@martin-frbg
Copy link
Collaborator

Looks like it is missing a -mavx2 among the compiler options although HAVE_AVX2 was set automatically - and indeed INTEL_UNKNOWN,CORE_PRESCOTT suggests the CPUID was not recognized (beyond realizing that it is some Haswell-ish Intel cpu). Do you get this with a recent version (freshly released 0.3.22 or at least 0.3.21) ?

@linouxis9
Copy link
Contributor Author

I got this error with the develop branch cloned 2 hours ago. I would guess that the newly added check for Raptor Lake is missing a few cpu ids?

@martin-frbg
Copy link
Collaborator

Looks like it. Currently it knows about family 6, model 7, extended model 11 only. What's the /proc/cpuid output of yours ?

1 similar comment
@martin-frbg
Copy link
Collaborator

Looks like it. Currently it knows about family 6, model 7, extended model 11 only. What's the /proc/cpuid output of yours ?

@linouxis9
Copy link
Contributor Author

Looks like it. Currently it knows about family 6, model 7, extended model 11 only. What's the /proc/cpuid output of yours ?

Indeed, mine is model 15. If that's fine with you, I could compile the list of Raptor Lake's cpuids and open a PR to add them?

CPU 0:
   vendor_id = "GenuineIntel"
   version information (1/eax):
      processor type  = primary processor (0)
      family          = 0x6 (6)
      model           = 0xf (15)
      stepping id     = 0x2 (2)
      extended family = 0x0 (0)
      extended model  = 0xb (11)
      (family synth)  = 0x6 (6)
      (model synth)   = 0xbf (191)
      (simple synth)  = Intel (unknown model)

@martin-frbg
Copy link
Collaborator

That would be great (I wonder if there are more of them, or if this is "only" another case of desktop vs. mobile version)

@linouxis9
Copy link
Contributor Author

That would be great (I wonder if there are more of them, or if this is "only" another case of desktop vs. mobile version)

I would guess it's because it's not the same die? i5 13500 is also a desktop chip, like the i7 13700k in this PR (#3800)
I found the full list here: https://edc.intel.com/content/www/us/en/design/products/platforms/details/raptor-lake-s/13th-generation-core-processors-datasheet-volume-1-of-2/003/cpuid/
I'll do the PR this afternoon, thanks for your help tracking down the problem!!

@brada4
Copy link
Contributor

brada4 commented Mar 27, 2023

Should be TARGET=HASWELL

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

Successfully merging a pull request may close this issue.

3 participants