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

POWER VSX PowerPC64LE Linux support #313

Closed
edelsohn opened this issue Jul 17, 2020 · 16 comments
Closed

POWER VSX PowerPC64LE Linux support #313

edelsohn opened this issue Jul 17, 2020 · 16 comments

Comments

@edelsohn
Copy link
Collaborator

Port Sleef to IBM POWER VSX architecture supporting PowerPC64LE Linux compiled with both GCC and Clang. Achieve equivalent speedup to x86-64 and AArch64 appropriate for the VSX 128 bit vector width.

With Github clone from today on CentOS8 built with GCC AT 12.0, I see the following failures:
The following tests FAILED:
36 - roundtriptest2dsp_4_4 (Failed)
37 - roundtriptest2dsp_8_8 (Failed)
38 - roundtriptest2dsp_10_10 (Failed)
39 - roundtriptest2dsp_5_15 (Failed)

@seiko2plus
Copy link
Collaborator

IBM POWER VSX architecture supporting PowerPC64LE Linux compiled with both GCC and Clang

it's already ported and It was tested on wide versions of GCC and CLANG during working on gh-288

Achieve equivalent speedup to x86-64 and AArch64 appropriate for the VSX 128 bit vector width.

That will require a full review of all existing kernels. I think it's better to merge #291(still need improvements similar to what happened on gh-288) and then review both VSX/zVX in the same time.

With Github clone from today on CentOS8 built with GCC AT 12.0, I see the following failures:

please could you set export CTEST_OUTPUT_ON_FAILURE=TRUE before calling ctest to expose the error messages?

@edelsohn
Copy link
Collaborator Author

  Start 36: roundtriptest2dsp_4_4

36/39 Test #36: roundtriptest2dsp_4_4 ............***Failed 64.36 sec
Path(random) :3(ST) 1(ST)
ISA : VSX 128 bit float
transpose NoMT(measured): 18470
transpose MT(measured): 64334599
Path(random) :2(ST) 2(ST)
ISA : VSX 128 bit float
transpose NoMT(loaded): 18470
transpose MT(loaded): 64334599
complex : NG (1.86187)

  Start 37: roundtriptest2dsp_8_8

37/39 Test #37: roundtriptest2dsp_8_8 ............***Failed 0.55 sec
Path(random) :4(ST) 2(ST) 1(ST) 1(ST)
ISA : VSX 128 bit float
transpose NoMT(measured): 17325
transpose MT(measured): 497714
Path(random) :2(ST) 2(ST) 3(ST) 1(ST)
ISA : VSX 128 bit float
transpose NoMT(loaded): 17325
transpose MT(loaded): 497714
complex : NG (1.90787)

  Start 38: roundtriptest2dsp_10_10

38/39 Test #38: roundtriptest2dsp_10_10 ..........***Failed 0.25 sec
Path(random) :1(ST) 2(ST) 4(ST) 2(ST) 1(ST)
ISA : VSX 128 bit float
transpose NoMT(measured): 17258
transpose MT(measured): 43066
Path(random) :3(ST) 1(ST) 4(ST) 2(ST)
ISA : VSX 128 bit float
transpose NoMT(loaded): 17258
transpose MT(loaded): 43066
complex : NG (1.90892)

  Start 39: roundtriptest2dsp_5_15

39/39 Test #39: roundtriptest2dsp_5_15 ...........***Failed 0.34 sec
Path(random) :1(ST) 2(ST) 4(ST) 4(ST) 2(ST) 2(ST)
ISA : VSX 128 bit float
Path(random) :3(ST) 1(ST) 1(ST)
ISA : VSX 128 bit float
transpose NoMT(measured): 17134
transpose MT(measured): 51847
Path(random) :2(ST) 2(ST) 3(ST) 1(ST) 4(ST) 1(ST) 1(ST) 1(ST)
ISA : VSX 128 bit float
Path(random) :3(ST) 2(ST)
ISA : VSX 128 bit float
transpose NoMT(loaded): 17134
transpose MT(loaded): 51847
complex : NG (1.90511)

@seiko2plus
Copy link
Collaborator

@edelsohn, Could please you provides gcc version?
I tested the master branch against at12.0 and all the tests passed

/opt/at12.0/bin/gcc --version
gcc (GCC) 8.3.1 20190304 (Advance-Toolchain-at12.0) [revision 269374]
Copyright (C) 2018 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

ldd ./bin/roundtriptest2dsp
linux-vdso64.so.1 (0x00007fffa8ed0000)
libsleefdft.so.3 => /opencv/sleef/build_gcc8/lib/libsleefdft.so.3 (0x00007fffa8ce0000)
libsleef.so.3 => /opencv/sleef/build_gcc8/lib/libsleef.so.3 (0x00007fffa8bc0000)
libm.so.6 => /opt/at12.0/lib64/power9/libm.so.6 (0x00007fffa8a80000)
libgomp.so.1 => /opt/at12.0/lib64/power9/libgomp.so.1 (0x00007fffa8a20000)
libpthread.so.0 => /opt/at12.0/lib64/power9/libpthread.so.0 (0x00007fffa89d0000)
libc.so.6 => /opt/at12.0/lib64/power9/libc.so.6 (0x00007fffa87a0000)
/opt/at12.0/lib64/ld64.so.2 (0x00007fffa8ef0000)
libdl.so.2 => /opt/at12.0/lib64/libdl.so.2 (0x00007fffa8770000)

@edelsohn
Copy link
Collaborator Author

I'm testing Power on GNU Compile Farm gcc135. I set CC= before running cmake. Is there something else necessary to properly configure SLEEF, especially for Power VSX?

[dje@gcc135 bin]$ ldd ./roundtriptest2dsp
./roundtriptest2dsp: /lib64/ld64.so.2: version GLIBC_2.23' not found (required by /home/dje/build/SLEEF/lib/libsleef.so.3) ./roundtriptest2dsp: /lib64/ld64.so.2: version GLIBC_2.23' not found (required by /opt/at12.0/lib64/power9/libm.so.6)
./roundtriptest2dsp: /lib64/ld64.so.2: version `GLIBC_2.22' not found (required by /opt/at12.0/lib64/power9/libc.so.6)
linux-vdso64.so.1 => (0x00007fff8d1b0000)
libsleefdft.so.3 => /home/dje/build/SLEEF/lib/libsleefdft.so.3 (0x00007fff8cfd0000)
libsleef.so.3 => /home/dje/build/SLEEF/lib/libsleef.so.3 (0x00007fff8ceb0000)
libm.so.6 => /opt/at12.0/lib64/power9/libm.so.6 (0x00007fff8cd70000)
libgomp.so.1 => /opt/at12.0/lib64/power9/libgomp.so.1 (0x00007fff8cd10000)
libpthread.so.0 => /opt/at12.0/lib64/power9/libpthread.so.0 (0x00007fff8ccc0000)
libc.so.6 => /opt/at12.0/lib64/power9/libc.so.6 (0x00007fff8ca90000)
/opt/at12.0/lib64/ld64.so.2 => /lib64/ld64.so.2 (0x00007fff8d1d0000)
libdl.so.2 => /opt/at12.0/lib64/libdl.so.2 (0x00007fff8ca60000)

@quickwritereader
Copy link

quickwritereader commented Jul 27, 2020

as I have access to the Cfarm.
I compiled and run it and the results were:

..
failure reasons for qtester:
undefined reference to `mpfr_set_float128'
....
Could not find executable sleef_out/bin/qtester
.....
....

95% tests passed, 2 tests failed out of 41

Total Test time (real) = 239.49 sec

The following tests FAILED:
         40 - qiutpurec_scalar (Not Run)
         41 - qiutpurecfma_scalar (Not Run)

I am using locally build cmake. as I dont have sudoer access
sh script:

#!/bin/bash
export PATH=${HOME}/bin/bin:${HOME}/bin/:/usr/bin:/usr/local/bin
export FC=/opt/at12.0/bin/gfortran
export CC=/opt/at12.0/bin/gcc
export CXX=/opt/at12.0/bin/g++
export LD=/opt/at12.0/bin/ld
export AR=/opt/at12.0/bin/ar
export LIBRARY_PATH=/opt/at12.0/lib64


CMAKE=${HOME}/bin/bin/cmake
SRC_DIR=${HOME}/sleef
BUILD_DIR=${SRC_DIR}/../sleef_out
BUILD_ARG="-DCMAKE_BUILD_TYPE=Release -DSLEEF_SHOW_CONFIG=1 -DENFORCE_TESTER3=TRUE -DBUILD_QUAD=TRUE"
cmake_cmd="${CMAKE}    -G \"Unix Makefiles\"  -B${BUILD_DIR} -S${SRC_DIR}  -DPYTHON_EXECUTABLE=/usr/bin/python3  ${CMAKE_ARG} ${BUILD_ARG}"
echo $cmake_cmd
eval $cmake_cmd

cd ${BUILD_DIR}
make -j `nproc` all
ctest -j `nproc`

@seiko2plus
Copy link
Collaborator

It requires some changes to cmake file related to root path and searches dir. I'm going to release a patch adding CMake toolchain for AT.

@shibatch
Copy link
Owner

shibatch commented Aug 20, 2020

@edelsohn It does not reproduce on my environment.
Please tell me the exact versions of the compilers and cmake options.
What are GCC AT 12.0 and gcc135?

@jiez
Copy link

jiez commented Aug 26, 2020

This bug is actually not just for POWER. It can be reproduced on other architectures using GCC. FFTW needs to be uninstalled to have these tests running.

@kif
Copy link

kif commented Oct 4, 2020

The current master (f50b231) is not building on power9:

In file included from /home/kieffer/workspace/sleef/src/dft/vectortype.h:53,
                 from /home/kieffer/workspace/sleef/build/src/dft/unroll_0_vecextsp.c:1:
/home/kieffer/workspace/sleef/src/arch/helpervecext.h:65:1: error: invalid vector type for attribute ‘vector_size’
   65 | typedef Sleef_quad vquad __attribute__((vector_size(sizeof(Sleef_quad)*VECTLENDP)));
      | ^~~~~~~
/home/kieffer/workspace/sleef/src/arch/helpervecext.h: In function ‘vcast_vq_q’:
/home/kieffer/workspace/sleef/src/arch/helpervecext.h:83:65: error: incompatible types when initializing type ‘long unsigned int’ using type ‘Sleef_quad’
   83 | static INLINE vquad vcast_vq_q(Sleef_quad d) { return (vquad) { d, d }; }
      |                                                                 ^
/home/kieffer/workspace/sleef/src/arch/helpervecext.h:83:68: error: incompatible types when initializing type ‘long unsigned int’ using type ‘Sleef_quad’
   83 | static INLINE vquad vcast_vq_q(Sleef_quad d) { return (vquad) { d, d }; }
      |                                                                    ^
/home/kieffer/workspace/sleef/src/arch/helpervecext.h: In function ‘vrev21_vq_vq’:
/home/kieffer/workspace/sleef/src/arch/helpervecext.h:105:65: error: subscripted value is neither array nor pointer nor vector
  105 | static INLINE vquad vrev21_vq_vq(vquad vd) { return (vquad) { vd[1], vd[0] }; }
      |                                                                 ^
In file included from /home/kieffer/workspace/sleef/src/dft/vectortype.h:53,
                 from /home/kieffer/workspace/sleef/build/src/dft/unroll_2_vecextsp.c:1:
/home/kieffer/workspace/sleef/src/arch/helpervecext.h:65:1: error: invalid vector type for attribute ‘vector_size’
   65 | typedef Sleef_quad vquad __attribute__((vector_size(sizeof(Sleef_quad)*VECTLENDP)));
      | ^~~~~~~
/home/kieffer/workspace/sleef/src/arch/helpervecext.h:105:72: error: subscripted value is neither array nor pointer nor vector
  105 | static INLINE vquad vrev21_vq_vq(vquad vd) { return (vquad) { vd[1], vd[0] }; }
      |                                                                        ^
/home/kieffer/workspace/sleef/src/arch/helpervecext.h: In function ‘vposneg_vq_vq’:
/home/kieffer/workspace/sleef/src/arch/helpervecext.h:107:67: error: subscripted value is neither array nor pointer nor vector
  107 | static INLINE vquad vposneg_vq_vq(vquad vd) { return (vquad) { +vd[0], -vd[1] }; }
      |                                                                   ^
/home/kieffer/workspace/sleef/src/arch/helpervecext.h:107:75: error: subscripted value is neither array nor pointer nor vector
  107 | static INLINE vquad vposneg_vq_vq(vquad vd) { return (vquad) { +vd[0], -vd[1] }; }
      |                                                                           ^
/home/kieffer/workspace/sleef/src/arch/helpervecext.h: In function ‘vnegpos_vq_vq’:
/home/kieffer/workspace/sleef/src/arch/helpervecext.h:108:67: error: subscripted value is neither array nor pointer nor vector
  108 | static INLINE vquad vnegpos_vq_vq(vquad vd) { return (vquad) { -vd[0], +vd[1] }; }
      |                                                                   ^
/home/kieffer/workspace/sleef/src/arch/helpervecext.h:108:75: error: subscripted value is neither array nor pointer nor vector
  108 | static INLINE vquad vnegpos_vq_vq(vquad vd) { return (vquad) { -vd[0], +vd[1] }; }
      |                                                                           ^
/home/kieffer/workspace/sleef/src/arch/helpervecext.h: In function ‘vcast_vq_q’:
/home/kieffer/workspace/sleef/src/arch/helpervecext.h:83:65: error: incompatible types when initializing type ‘long unsigned int’ using type ‘Sleef_quad’
   83 | static INLINE vquad vcast_vq_q(Sleef_quad d) { return (vquad) { d, d }; }
      |                                                                 ^
/home/kieffer/workspace/sleef/src/arch/helpervecext.h:83:68: error: incompatible types when initializing type ‘long unsigned int’ using type ‘Sleef_quad’
   83 | static INLINE vquad vcast_vq_q(Sleef_quad d) { return (vquad) { d, d }; }
      |                                                                    ^
/home/kieffer/workspace/sleef/src/arch/helpervecext.h: In function ‘vrev21_vq_vq’:
/home/kieffer/workspace/sleef/src/arch/helpervecext.h:105:65: error: subscripted value is neither array nor pointer nor vector
  105 | static INLINE vquad vrev21_vq_vq(vquad vd) { return (vquad) { vd[1], vd[0] }; }
      |                                                                 ^
/home/kieffer/workspace/sleef/src/arch/helpervecext.h:105:72: error: subscripted value is neither array nor pointer nor vector
  105 | static INLINE vquad vrev21_vq_vq(vquad vd) { return (vquad) { vd[1], vd[0] }; }
      |                                                                        ^
/home/kieffer/workspace/sleef/src/arch/helpervecext.h: In function ‘vposneg_vq_vq’:
/home/kieffer/workspace/sleef/src/arch/helpervecext.h:107:67: error: subscripted value is neither array nor pointer nor vector
  107 | static INLINE vquad vposneg_vq_vq(vquad vd) { return (vquad) { +vd[0], -vd[1] }; }
      |                                                                   ^
/home/kieffer/workspace/sleef/src/arch/helpervecext.h:107:75: error: subscripted value is neither array nor pointer nor vector
  107 | static INLINE vquad vposneg_vq_vq(vquad vd) { return (vquad) { +vd[0], -vd[1] }; }
      |                                                                           ^
/home/kieffer/workspace/sleef/src/arch/helpervecext.h: In function ‘vnegpos_vq_vq’:
/home/kieffer/workspace/sleef/src/arch/helpervecext.h:108:67: error: subscripted value is neither array nor pointer nor vector
  108 | static INLINE vquad vnegpos_vq_vq(vquad vd) { return (vquad) { -vd[0], +vd[1] }; }
      |                                                                   ^
/home/kieffer/workspace/sleef/src/arch/helpervecext.h:108:75: error: subscripted value is neither array nor pointer nor vector
  108 | static INLINE vquad vnegpos_vq_vq(vquad vd) { return (vquad) { -vd[0], +vd[1] }; }
      |                                                                           ^
In file included from /home/kieffer/workspace/sleef/src/dft/vectortype.h:53,
                 from /home/kieffer/workspace/sleef/build/src/dft/unroll_0_vecextdp.c:1:
/home/kieffer/workspace/sleef/src/arch/helpervecext.h:65:1: error: invalid vector type for attribute ‘vector_size’
   65 | typedef Sleef_quad vquad __attribute__((vector_size(sizeof(Sleef_quad)*VECTLENDP)));
      | ^~~~~~~
In file included from /home/kieffer/workspace/sleef/src/dft/vectortype.h:53,
                 from /home/kieffer/workspace/sleef/build/src/dft/unroll_2_vecextdp.c:1:
/home/kieffer/workspace/sleef/src/arch/helpervecext.h:65:1: error: invalid vector type for attribute ‘vector_size’
   65 | typedef Sleef_quad vquad __attribute__((vector_size(sizeof(Sleef_quad)*VECTLENDP)));
      | ^~~~~~~
/home/kieffer/workspace/sleef/src/arch/helpervecext.h: In function ‘vcast_vq_q’:
/home/kieffer/workspace/sleef/src/arch/helpervecext.h:83:65: error: incompatible types when initializing type ‘long unsigned int’ using type ‘Sleef_quad’
   83 | static INLINE vquad vcast_vq_q(Sleef_quad d) { return (vquad) { d, d }; }
      |                                                                 ^
/home/kieffer/workspace/sleef/src/arch/helpervecext.h:83:68: error: incompatible types when initializing type ‘long unsigned int’ using type ‘Sleef_quad’
   83 | static INLINE vquad vcast_vq_q(Sleef_quad d) { return (vquad) { d, d }; }
      |                                                                    ^
/home/kieffer/workspace/sleef/src/arch/helpervecext.h: In function ‘vcast_vq_q’:
/home/kieffer/workspace/sleef/src/arch/helpervecext.h:83:65: error: incompatible types when initializing type ‘long unsigned int’ using type ‘Sleef_quad’
   83 | static INLINE vquad vcast_vq_q(Sleef_quad d) { return (vquad) { d, d }; }
      |                                                                 ^
/home/kieffer/workspace/sleef/src/arch/helpervecext.h:83:68: error: incompatible types when initializing type ‘long unsigned int’ using type ‘Sleef_quad’
   83 | static INLINE vquad vcast_vq_q(Sleef_quad d) { return (vquad) { d, d }; }
      |                                                                    ^
/home/kieffer/workspace/sleef/src/arch/helpervecext.h: In function ‘vrev21_vq_vq’:
/home/kieffer/workspace/sleef/src/arch/helpervecext.h:105:65: error: subscripted value is neither array nor pointer nor vector
  105 | static INLINE vquad vrev21_vq_vq(vquad vd) { return (vquad) { vd[1], vd[0] }; }
      |                                                                 ^
/home/kieffer/workspace/sleef/src/arch/helpervecext.h:105:72: error: subscripted value is neither array nor pointer nor vector
  105 | static INLINE vquad vrev21_vq_vq(vquad vd) { return (vquad) { vd[1], vd[0] }; }
      |                                                                        ^
/home/kieffer/workspace/sleef/src/arch/helpervecext.h: In function ‘vposneg_vq_vq’:
/home/kieffer/workspace/sleef/src/arch/helpervecext.h:107:67: error: subscripted value is neither array nor pointer nor vector
  107 | static INLINE vquad vposneg_vq_vq(vquad vd) { return (vquad) { +vd[0], -vd[1] }; }
      |                                                                   ^
/home/kieffer/workspace/sleef/src/arch/helpervecext.h:107:75: error: subscripted value is neither array nor pointer nor vector
  107 | static INLINE vquad vposneg_vq_vq(vquad vd) { return (vquad) { +vd[0], -vd[1] }; }
      |                                                                           ^
/home/kieffer/workspace/sleef/src/arch/helpervecext.h: In function ‘vnegpos_vq_vq’:
/home/kieffer/workspace/sleef/src/arch/helpervecext.h: In function ‘vrev21_vq_vq’:
/home/kieffer/workspace/sleef/src/arch/helpervecext.h:108:67: error: subscripted value is neither array nor pointer nor vector
  108 | static INLINE vquad vnegpos_vq_vq(vquad vd) { return (vquad) { -vd[0], +vd[1] }; }
      |                                                                   ^
/home/kieffer/workspace/sleef/src/arch/helpervecext.h:105:65: error: subscripted value is neither array nor pointer nor vector
  105 | static INLINE vquad vrev21_vq_vq(vquad vd) { return (vquad) { vd[1], vd[0] }; }
      |                                                                 ^
/home/kieffer/workspace/sleef/src/arch/helpervecext.h:108:75: error: subscripted value is neither array nor pointer nor vector
  108 | static INLINE vquad vnegpos_vq_vq(vquad vd) { return (vquad) { -vd[0], +vd[1] }; }
      |                                                                           ^
/home/kieffer/workspace/sleef/src/arch/helpervecext.h:105:72: error: subscripted value is neither array nor pointer nor vector
  105 | static INLINE vquad vrev21_vq_vq(vquad vd) { return (vquad) { vd[1], vd[0] }; }
      |                                                                        ^
/home/kieffer/workspace/sleef/src/arch/helpervecext.h: In function ‘vposneg_vq_vq’:
/home/kieffer/workspace/sleef/src/arch/helpervecext.h:107:67: error: subscripted value is neither array nor pointer nor vector
  107 | static INLINE vquad vposneg_vq_vq(vquad vd) { return (vquad) { +vd[0], -vd[1] }; }
      |                                                                   ^
/home/kieffer/workspace/sleef/src/arch/helpervecext.h:107:75: error: subscripted value is neither array nor pointer nor vector
  107 | static INLINE vquad vposneg_vq_vq(vquad vd) { return (vquad) { +vd[0], -vd[1] }; }
      |                                                                           ^
/home/kieffer/workspace/sleef/src/arch/helpervecext.h: In function ‘vnegpos_vq_vq’:
/home/kieffer/workspace/sleef/src/arch/helpervecext.h:108:67: error: subscripted value is neither array nor pointer nor vector
  108 | static INLINE vquad vnegpos_vq_vq(vquad vd) { return (vquad) { -vd[0], +vd[1] }; }
      |                                                                   ^
/home/kieffer/workspace/sleef/src/arch/helpervecext.h:108:75: error: subscripted value is neither array nor pointer nor vector
  108 | static INLINE vquad vnegpos_vq_vq(vquad vd) { return (vquad) { -vd[0], +vd[1] }; }
      |                                                                           ^
In file included from /home/kieffer/workspace/sleef/src/dft/vectortype.h:53,
                 from /home/kieffer/workspace/sleef/build/src/dft/unroll_0_vecextsp.c:1:
/home/kieffer/workspace/sleef/src/arch/helpervecext.h: In function ‘vadd_vq_vq_vq’:
/home/kieffer/workspace/sleef/src/arch/helpervecext.h:843:64: error: invalid operands to binary + (have ‘vquad’ {aka ‘Sleef_quad’} and ‘vquad’ {aka ‘Sleef_quad’})
  843 | static INLINE vquad vadd_vq_vq_vq(vquad x, vquad y) { return x + y; }
      |                                                                ^
/home/kieffer/workspace/sleef/src/arch/helpervecext.h: In function ‘vsub_vq_vq_vq’:
/home/kieffer/workspace/sleef/src/arch/helpervecext.h:844:64: error: invalid operands to binary - (have ‘vquad’ {aka ‘Sleef_quad’} and ‘vquad’ {aka ‘Sleef_quad’})
  844 | static INLINE vquad vsub_vq_vq_vq(vquad x, vquad y) { return x - y; }
      |                                                                ^
/home/kieffer/workspace/sleef/src/arch/helpervecext.h: In function ‘vmul_vq_vq_vq’:
/home/kieffer/workspace/sleef/src/arch/helpervecext.h:845:64: error: invalid operands to binary * (have ‘vquad’ {aka ‘Sleef_quad’} and ‘vquad’ {aka ‘Sleef_quad’})
  845 | static INLINE vquad vmul_vq_vq_vq(vquad x, vquad y) { return x * y; }
      |                                                                ^
/home/kieffer/workspace/sleef/src/arch/helpervecext.h: In function ‘vneg_vq_vq’:
/home/kieffer/workspace/sleef/src/arch/helpervecext.h:847:50: error: wrong type argument to unary minus
  847 | static INLINE vquad vneg_vq_vq(vquad d) { return -d; }
      |                                                  ^
/home/kieffer/workspace/sleef/src/arch/helpervecext.h: In function ‘vloadu_vq_p’:
/home/kieffer/workspace/sleef/src/arch/helpervecext.h:854:34: error: subscripted value is neither array nor pointer nor vector
  854 |   for(int i=0;i<VECTLENDP;i++) vd[i] = ptr[i];
      |                                  ^
In file included from /home/kieffer/workspace/sleef/src/dft/vectortype.h:53,
                 from /home/kieffer/workspace/sleef/build/src/dft/unroll_2_vecextsp.c:1:
/home/kieffer/workspace/sleef/src/arch/helpervecext.h: In function ‘vadd_vq_vq_vq’:
/home/kieffer/workspace/sleef/src/arch/helpervecext.h: In function ‘vstoreu_v_p_vq’:
/home/kieffer/workspace/sleef/src/arch/helpervecext.h:843:64: error: invalid operands to binary + (have ‘vquad’ {aka ‘Sleef_quad’} and ‘vquad’ {aka ‘Sleef_quad’})
  843 | static INLINE vquad vadd_vq_vq_vq(vquad x, vquad y) { return x + y; }
      |                                                                ^
/home/kieffer/workspace/sleef/src/arch/helpervecext.h: In function ‘vsub_vq_vq_vq’:
/home/kieffer/workspace/sleef/src/arch/helpervecext.h:860:42: error: subscripted value is neither array nor pointer nor vector
  860 |   for(int i=0;i<VECTLENDP;i++) ptr[i] = v[i];
      |                                          ^
/home/kieffer/workspace/sleef/src/arch/helpervecext.h: In function ‘vscatter2_v_p_i_i_vq’:
/home/kieffer/workspace/sleef/src/arch/helpervecext.h:844:64: error: invalid operands to binary - (have ‘vquad’ {aka ‘Sleef_quad’} and ‘vquad’ {aka ‘Sleef_quad’})
  844 | static INLINE vquad vsub_vq_vq_vq(vquad x, vquad y) { return x - y; }
      |                                                                ^
/home/kieffer/workspace/sleef/src/arch/helpervecext.h: In function ‘vmul_vq_vq_vq’:
/home/kieffer/workspace/sleef/src/arch/helpervecext.h:866:41: error: subscripted value is neither array nor pointer nor vector
  866 |     *(ptr+(offset + step * i)*2 + 0) = v[i*2+0];
      |                                         ^
/home/kieffer/workspace/sleef/src/arch/helpervecext.h:845:64: error: invalid operands to binary * (have ‘vquad’ {aka ‘Sleef_quad’} and ‘vquad’ {aka ‘Sleef_quad’})
  845 | static INLINE vquad vmul_vq_vq_vq(vquad x, vquad y) { return x * y; }
      |                                                                ^
/home/kieffer/workspace/sleef/src/arch/helpervecext.h: In function ‘vneg_vq_vq’:
/home/kieffer/workspace/sleef/src/arch/helpervecext.h:867:41: error: subscripted value is neither array nor pointer nor vector
  867 |     *(ptr+(offset + step * i)*2 + 1) = v[i*2+1];
      |                                         ^
/home/kieffer/workspace/sleef/src/arch/helpervecext.h:847:50: error: wrong type argument to unary minus
  847 | static INLINE vquad vneg_vq_vq(vquad d) { return -d; }
      |                                                  ^
/home/kieffer/workspace/sleef/src/arch/helpervecext.h: In function ‘vloadu_vq_p’:
/home/kieffer/workspace/sleef/src/arch/helpervecext.h:854:34: error: subscripted value is neither array nor pointer nor vector
  854 |   for(int i=0;i<VECTLENDP;i++) vd[i] = ptr[i];
      |                                  ^
/home/kieffer/workspace/sleef/src/arch/helpervecext.h: In function ‘vstoreu_v_p_vq’:
/home/kieffer/workspace/sleef/src/arch/helpervecext.h:860:42: error: subscripted value is neither array nor pointer nor vector
  860 |   for(int i=0;i<VECTLENDP;i++) ptr[i] = v[i];
      |                                          ^
/home/kieffer/workspace/sleef/src/arch/helpervecext.h: In function ‘vscatter2_v_p_i_i_vq’:
In file included from /home/kieffer/workspace/sleef/src/dft/vectortype.h:53,
                 from /home/kieffer/workspace/sleef/build/src/dft/unroll_0_vecextdp.c:1:
/home/kieffer/workspace/sleef/src/arch/helpervecext.h: In function ‘vadd_vq_vq_vq’:
/home/kieffer/workspace/sleef/src/arch/helpervecext.h:866:41: error: subscripted value is neither array nor pointer nor vector
  866 |     *(ptr+(offset + step * i)*2 + 0) = v[i*2+0];
      |                                         ^
/home/kieffer/workspace/sleef/src/arch/helpervecext.h:843:64: error: invalid operands to binary + (have ‘vquad’ {aka ‘Sleef_quad’} and ‘vquad’ {aka ‘Sleef_quad’})
  843 | static INLINE vquad vadd_vq_vq_vq(vquad x, vquad y) { return x + y; }
      |                                                                ^
In file included from /home/kieffer/workspace/sleef/src/dft/vectortype.h:53,
                 from /home/kieffer/workspace/sleef/build/src/dft/unroll_2_vecextdp.c:1:
/home/kieffer/workspace/sleef/src/arch/helpervecext.h: In function ‘vadd_vq_vq_vq’:
/home/kieffer/workspace/sleef/src/arch/helpervecext.h: In function ‘vsub_vq_vq_vq’:
/home/kieffer/workspace/sleef/src/arch/helpervecext.h:843:64: error: invalid operands to binary + (have ‘vquad’ {aka ‘Sleef_quad’} and ‘vquad’ {aka ‘Sleef_quad’})
  843 | static INLINE vquad vadd_vq_vq_vq(vquad x, vquad y) { return x + y; }
      |                                                                ^
/home/kieffer/workspace/sleef/src/arch/helpervecext.h:844:64: error: invalid operands to binary - (have ‘vquad’ {aka ‘Sleef_quad’} and ‘vquad’ {aka ‘Sleef_quad’})
  844 | static INLINE vquad vsub_vq_vq_vq(vquad x, vquad y) { return x - y; }
      |                                                                ^
/home/kieffer/workspace/sleef/src/arch/helpervecext.h: In function ‘vsub_vq_vq_vq’:
/home/kieffer/workspace/sleef/src/arch/helpervecext.h: In function ‘vmul_vq_vq_vq’:
/home/kieffer/workspace/sleef/src/arch/helpervecext.h:867:41: error: subscripted value is neither array nor pointer nor vector
  867 |     *(ptr+(offset + step * i)*2 + 1) = v[i*2+1];
      |                                         ^
/home/kieffer/workspace/sleef/src/arch/helpervecext.h:844:64: error: invalid operands to binary - (have ‘vquad’ {aka ‘Sleef_quad’} and ‘vquad’ {aka ‘Sleef_quad’})
  844 | static INLINE vquad vsub_vq_vq_vq(vquad x, vquad y) { return x - y; }
      |                                                                ^
/home/kieffer/workspace/sleef/src/arch/helpervecext.h:845:64: error: invalid operands to binary * (have ‘vquad’ {aka ‘Sleef_quad’} and ‘vquad’ {aka ‘Sleef_quad’})
  845 | static INLINE vquad vmul_vq_vq_vq(vquad x, vquad y) { return x * y; }
      |                                                                ^
/home/kieffer/workspace/sleef/src/arch/helpervecext.h: In function ‘vmul_vq_vq_vq’:
/home/kieffer/workspace/sleef/src/arch/helpervecext.h: In function ‘vneg_vq_vq’:
/home/kieffer/workspace/sleef/src/arch/helpervecext.h:845:64: error: invalid operands to binary * (have ‘vquad’ {aka ‘Sleef_quad’} and ‘vquad’ {aka ‘Sleef_quad’})
  845 | static INLINE vquad vmul_vq_vq_vq(vquad x, vquad y) { return x * y; }
      |                                                                ^
/home/kieffer/workspace/sleef/src/arch/helpervecext.h:847:50: error: wrong type argument to unary minus
  847 | static INLINE vquad vneg_vq_vq(vquad d) { return -d; }
      |                                                  ^
/home/kieffer/workspace/sleef/src/arch/helpervecext.h: In function ‘vneg_vq_vq’:
/home/kieffer/workspace/sleef/src/arch/helpervecext.h: In function ‘vloadu_vq_p’:
/home/kieffer/workspace/sleef/src/arch/helpervecext.h:847:50: error: wrong type argument to unary minus
  847 | static INLINE vquad vneg_vq_vq(vquad d) { return -d; }
      |                                                  ^
/home/kieffer/workspace/sleef/src/arch/helpervecext.h:854:34: error: subscripted value is neither array nor pointer nor vector
  854 |   for(int i=0;i<VECTLENDP;i++) vd[i] = ptr[i];
      |                                  ^
/home/kieffer/workspace/sleef/src/arch/helpervecext.h: In function ‘vloadu_vq_p’:
/home/kieffer/workspace/sleef/src/arch/helpervecext.h: In function ‘vstoreu_v_p_vq’:
/home/kieffer/workspace/sleef/src/arch/helpervecext.h:854:34: error: subscripted value is neither array nor pointer nor vector
  854 |   for(int i=0;i<VECTLENDP;i++) vd[i] = ptr[i];
      |                                  ^
/home/kieffer/workspace/sleef/src/arch/helpervecext.h:860:42: error: subscripted value is neither array nor pointer nor vector
  860 |   for(int i=0;i<VECTLENDP;i++) ptr[i] = v[i];
      |                                          ^
/home/kieffer/workspace/sleef/src/arch/helpervecext.h: In function ‘vstoreu_v_p_vq’:
/home/kieffer/workspace/sleef/src/arch/helpervecext.h: In function ‘vscatter2_v_p_i_i_vq’:
/home/kieffer/workspace/sleef/src/arch/helpervecext.h:860:42: error: subscripted value is neither array nor pointer nor vector
  860 |   for(int i=0;i<VECTLENDP;i++) ptr[i] = v[i];
      |                                          ^
/home/kieffer/workspace/sleef/src/arch/helpervecext.h:866:41: error: subscripted value is neither array nor pointer nor vector
  866 |     *(ptr+(offset + step * i)*2 + 0) = v[i*2+0];
      |                                         ^
/home/kieffer/workspace/sleef/src/arch/helpervecext.h: In function ‘vscatter2_v_p_i_i_vq’:
/home/kieffer/workspace/sleef/src/arch/helpervecext.h:866:41: error: subscripted value is neither array nor pointer nor vector
  866 |     *(ptr+(offset + step * i)*2 + 0) = v[i*2+0];
      |                                         ^
/home/kieffer/workspace/sleef/src/arch/helpervecext.h:867:41: error: subscripted value is neither array nor pointer nor vector
  867 |     *(ptr+(offset + step * i)*2 + 1) = v[i*2+1];
      |                                         ^
/home/kieffer/workspace/sleef/src/arch/helpervecext.h:867:41: error: subscripted value is neither array nor pointer nor vector
  867 |     *(ptr+(offset + step * i)*2 + 1) = v[i*2+1];
      |                                         ^
make[2]: *** [src/dft/CMakeFiles/unroll_2_vecextdp_obj.dir/build.make:95: src/dft/CMakeFiles/unroll_2_vecextdp_obj.dir/unroll_2_vecextdp.c.o] Error 1
make[2]: *** [src/dft/CMakeFiles/unroll_0_vecextsp_obj.dir/build.make:95: src/dft/CMakeFiles/unroll_0_vecextsp_obj.dir/unroll_0_vecextsp.c.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:1901: src/dft/CMakeFiles/unroll_0_vecextsp_obj.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
make[1]: *** [CMakeFiles/Makefile2:2168: src/dft/CMakeFiles/unroll_2_vecextdp_obj.dir/all] Error 2
make[2]: *** [src/dft/CMakeFiles/unroll_2_vecextsp_obj.dir/build.make:95: src/dft/CMakeFiles/unroll_2_vecextsp_obj.dir/unroll_2_vecextsp.c.o] Error 1
make[2]: *** [src/dft/CMakeFiles/unroll_0_vecextdp_obj.dir/build.make:95: src/dft/CMakeFiles/unroll_0_vecextdp_obj.dir/unroll_0_vecextdp.c.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:2057: src/dft/CMakeFiles/unroll_2_vecextsp_obj.dir/all] Error 2
make[1]: *** [CMakeFiles/Makefile2:2455: src/dft/CMakeFiles/unroll_0_vecextdp_obj.dir/all] Error 2
[ 38%] Linking C shared library ../../lib/libsleef.so
[ 38%] Built target sleef
make: *** [Makefile:160: all] Error 2

Tested on Power9 with GCC10 (debian11). The previous release (3.5.1) was building and all tests are passing.

@shibatch
Copy link
Owner

shibatch commented Oct 5, 2020

I confirmed the problem.

@shibatch
Copy link
Owner

shibatch commented Oct 5, 2020

#342

@edelsohn
Copy link
Collaborator Author

edelsohn commented Nov 9, 2020

The bounty mostly is complete. We continue to work with @shibatch to adjust some issues, but the majority of the work already has been completed by Shibata-san.

@RajalakshmiSR
Copy link

All the tests are passing in POWER9 with AT14.0.
The files are now compiled with -mcpu=power8 on POWER9. Can we add -mcpu=power9 based on the processor type?

@shibatch
Copy link
Owner

Sure. I will start working on it.

@shibatch
Copy link
Owner

I made PR #360.

shibatch added a commit that referenced this issue Dec 8, 2020
This patch adds POWER9 support as mentioned in issue #313.

Co-authored-by: shibatch <[email protected]>
@edelsohn
Copy link
Collaborator Author

edelsohn commented Dec 9, 2020

This has been accomplished with the latest pull request for P9 support.

@edelsohn edelsohn closed this as completed Dec 9, 2020
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

7 participants