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

ParPar on RISC-V with RVV 1.0 (Armbian Ubuntu Noble) #59

Open
sanderjo opened this issue May 18, 2024 · 15 comments
Open

ParPar on RISC-V with RVV 1.0 (Armbian Ubuntu Noble) #59

sanderjo opened this issue May 18, 2024 · 15 comments

Comments

@sanderjo
Copy link

As requested in animetosho/rapidyenc#5 (comment)

@sanderjo
Copy link
Author

With the standard github version: error

sander@bananapif3:~/git/ParPar$ git log | head -20
commit 9d8a607ac6ad1ec4b16fae7f8e61edc40c6f12cf
Author: animetosho <[email protected]>
Date:   Wed Oct 18 12:18:47 2023 +1000

    Update version

commit 30d29e16627a7dccfa701e9a4c032b3fc248dc43
Author: animetosho <[email protected]>
Date:   Wed Oct 18 12:17:38 2023 +1000

    Log even more info on failed ParPar execution in test

commit c30fbce361eaaa9bfd4baebf9deaf602dc443ac5
Author: animetosho <[email protected]>
Date:   Wed Oct 18 11:57:42 2023 +1000

    Display exit code when ParPar execution fails in test

sander@bananapif3:~/git/ParPar$ node-gyp rebuild
gyp info it worked if it ends with ok
gyp info using [email protected]
gyp info using [email protected] | linux | riscv64
gyp info find Python using Python version 3.12.3 found at "/usr/bin/python3"
gyp info spawn /usr/bin/python3
gyp info spawn args [
gyp info spawn args   '/usr/share/nodejs/node-gyp/gyp/gyp_main.py',
gyp info spawn args   'binding.gyp',
gyp info spawn args   '-f',
gyp info spawn args   'make',
gyp info spawn args   '-I',
gyp info spawn args   '/home/sander/git/ParPar/build/config.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/usr/share/nodejs/node-gyp/addon.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/usr/include/nodejs/common.gypi',
gyp info spawn args   '-Dlibrary=shared_library',
gyp info spawn args   '-Dvisibility=default',
gyp info spawn args   '-Dnode_root_dir=/usr/include/nodejs',
gyp info spawn args   '-Dnode_gyp_dir=/usr/share/nodejs/node-gyp',
gyp info spawn args   '-Dnode_lib_file=/usr/include/nodejs/<(target_arch)/node.lib',
gyp info spawn args   '-Dmodule_root_dir=/home/sander/git/ParPar',
gyp info spawn args   '-Dnode_engine=v8',
gyp info spawn args   '--depth=.',
gyp info spawn args   '--no-parallel',
gyp info spawn args   '--generator-output',
gyp info spawn args   'build',
gyp info spawn args   '-Goutput_dir=.'
gyp info spawn args ]
gyp info spawn make
gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
make: Entering directory '/home/sander/git/ParPar/build'
  CXX(target) Release/obj.target/gf16/gf16/gf16mul.o
  AR(target) Release/obj.target/gf16.a
  COPY Release/gf16.a
  CC(target) Release/obj.target/gf16_avx/gf16/gf16_shuffle_avx.o
  AR(target) Release/obj.target/gf16_avx.a
  COPY Release/gf16_avx.a
  CC(target) Release/obj.target/gf16_avx2/gf16/gf16_xor_avx2.o
  CC(target) Release/obj.target/gf16_avx2/gf16/gf16_shuffle_avx2.o
  CC(target) Release/obj.target/gf16_avx2/gf16/gf_add_avx2.o
  CC(target) Release/obj.target/gf16_avx2/gf16/gf16_cksum_avx2.o
  AR(target) Release/obj.target/gf16_avx2.a
  COPY Release/gf16_avx2.a
  CC(target) Release/obj.target/gf16_avx512/gf16/gf16_xor_avx512.o
  CC(target) Release/obj.target/gf16_avx512/gf16/gf16_shuffle_avx512.o
  CC(target) Release/obj.target/gf16_avx512/gf16/gf_add_avx512.o
  CC(target) Release/obj.target/gf16_avx512/gf16/gf16_cksum_avx512.o
  AR(target) Release/obj.target/gf16_avx512.a
  COPY Release/gf16_avx512.a
  CC(target) Release/obj.target/gf16_generic/gf16/gf16_lookup.o
  CC(target) Release/obj.target/gf16_generic/gf16/gf_add_generic.o
  CC(target) Release/obj.target/gf16_generic/gf16/gf16_cksum_generic.o
  AR(target) Release/obj.target/gf16_generic.a
  COPY Release/gf16_generic.a
  CC(target) Release/obj.target/gf16_gfni/gf16/gf16_affine_gfni.o
  AR(target) Release/obj.target/gf16_gfni.a
  COPY Release/gf16_gfni.a
  CC(target) Release/obj.target/gf16_gfni_avx2/gf16/gf16_affine_avx2.o
  CC(target) Release/obj.target/gf16_gfni_avx2/src/platform_warnings.o
  AR(target) Release/obj.target/gf16_gfni_avx2.a
  COPY Release/gf16_gfni_avx2.a
  CC(target) Release/obj.target/gf16_gfni_avx512/gf16/gf16_affine_avx512.o
  AR(target) Release/obj.target/gf16_gfni_avx512.a
  COPY Release/gf16_gfni_avx512.a
  CC(target) Release/obj.target/gf16_neon/gf16/gf16_shuffle_neon.o
  CC(target) Release/obj.target/gf16_neon/gf16/gf16_clmul_neon.o
  CC(target) Release/obj.target/gf16_neon/gf16/gf_add_neon.o
  CC(target) Release/obj.target/gf16_neon/gf16/gf16_cksum_neon.o
  AR(target) Release/obj.target/gf16_neon.a
  COPY Release/gf16_neon.a
  CC(target) Release/obj.target/gf16_rvv/gf16/gf16_shuffle128_rvv.o
In file included from ../gf16/gf16_shuffle128_rvv.c:1:
../gf16/gf16_rvv_common.h: In function ‘gf16_vec_mul2_rvv’:
../gf16/gf16_rvv_common.h:33:20: error: incompatible type for argument 3 of ‘__riscv_vxor_vx_i16m1_m’
   33 |                 v, v,
      |                    ^
      |                    |
      |                    vint16m1_t
In file included from ../gf16/gf16_rvv_common.h:9:
/usr/lib/gcc/riscv64-linux-gnu/14/include/riscv_vector.h:40:9: note: expected ‘short int’ but argument is of type ‘vint16m1_t’
   40 | #pragma riscv intrinsic "vector"
      |         ^~~~~
../gf16/gf16_rvv_common.h:13:17: error: too many arguments to function ‘__riscv_vxor_vx_i16m1_m’
   13 | #  define RV(f) __riscv_##f
      |                 ^~~~~~~~
../gf16/gf16_rvv_common.h:29:16: note: in expansion of macro ‘RV’
   29 |         return RV(vxor_vx_i16m1_m)
      |                ^~
/usr/lib/gcc/riscv64-linux-gnu/14/include/riscv_vector.h:40:9: note: declared here
   40 | #pragma riscv intrinsic "vector"
      |         ^~~~~
../gf16/gf16_shuffle128_rvv.c: In function ‘_vlseg2e8’:
../gf16/gf16_shuffle128_rvv.c:16:38: error: ‘vd’ undeclared (first use in this function); did you mean ‘d’?
   16 |         *v0 = RV(vget_v_u8m1x2_u8m1)(vd, 0);
      |                                      ^~
      |                                      d
../gf16/gf16_shuffle128_rvv.c:16:38: note: each undeclared identifier is reported only once for each function it appears in
../gf16/gf16_shuffle128_rvv.c:15:22: warning: unused variable ‘d’ [-Wunused-variable]
   15 |         vuint8m1x2_t d = RV(vlseg2e8_v_u8m1x2)(src, vl);
      |                      ^
In file included from ../gf16/gf16_shuffle128_rvv.c:244:
../gf16/gf16_checksum_rvv.h: In function ‘gf16_checksum_exp_rvv’:
../gf16/gf16_checksum_rvv.h:71:35: error: incompatible type for argument 4 of ‘__riscv_vxor_vv_i16m1_m’
   71 |                         res, res, _checksum,
      |                                   ^~~~~~~~~
      |                                   |
      |                                   vint16m1_t
/usr/lib/gcc/riscv64-linux-gnu/14/include/riscv_vector.h:40:9: note: expected ‘long unsigned int’ but argument is of type ‘vint16m1_t’
   40 | #pragma riscv intrinsic "vector"
      |         ^~~~~
../gf16/gf16_rvv_common.h:13:17: error: too many arguments to function ‘__riscv_vxor_vv_i16m1_m’
   13 | #  define RV(f) __riscv_##f
      |                 ^~~~~~~~
../gf16/gf16_checksum_rvv.h:67:23: note: in expansion of macro ‘RV’
   67 |                 res = RV(vxor_vv_i16m1_m)
      |                       ^~
/usr/lib/gcc/riscv64-linux-gnu/14/include/riscv_vector.h:40:9: note: declared here
   40 | #pragma riscv intrinsic "vector"
      |         ^~~~~
../gf16/gf16_rvv_common.h: In function ‘gf16_vec_mul2_rvv’:
../gf16/gf16_rvv_common.h:37:1: warning: control reaches end of non-void function [-Wreturn-type]
   37 | }
      | ^
make: *** [gf16_rvv.target.mk:127: Release/obj.target/gf16_rvv/gf16/gf16_shuffle128_rvv.o] Error 1
make: Leaving directory '/home/sander/git/ParPar/build'
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/usr/share/nodejs/node-gyp/lib/build.js:203:23)
gyp ERR! stack     at ChildProcess.emit (node:events:517:28)
gyp ERR! stack     at ChildProcess._handle.onexit (node:internal/child_process:292:12)
gyp ERR! System Linux 6.1.15-legacy-k1
gyp ERR! command "/usr/bin/node" "/usr/bin/node-gyp" "rebuild"
gyp ERR! cwd /home/sander/git/ParPar
gyp ERR! node -v v18.19.1
gyp ERR! node-gyp -v v9.3.0
gyp ERR! not ok 
sander@bananapif3:~/git/ParPar$ 

@sanderjo
Copy link
Author

sanderjo commented May 18, 2024

If you want to test, you'll need the dev branch of the code, do a cmake in the test/bench folder, then run ./bench-gf16 -fmuladdmp

This is unknown terrority for me.

The git looks older?

ander@bananapif3:~/git/ParPar$ git branch -a
* master
  remotes/origin/HEAD -> origin/master
  remotes/origin/dev
  remotes/origin/interface_redesign
  remotes/origin/master
sander@bananapif3:~/git/ParPar$ git checkout origin/dev
Note: switching to 'origin/dev'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by switching back to a branch.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:

  git switch -c <new-branch-name>

Or undo this operation with:

  git switch -

Turn off this advice by setting config variable advice.detachedHead to false

HEAD is now at 1410d77 GHA fixes
sander@bananapif3:~/git/ParPar$ 
sander@bananapif3:~/git/ParPar$ git log | head -10
commit 1410d77116404cac8190e03ef9f20657f64c99b9
Author: animetosho <[email protected]>
Date:   Thu May 16 10:22:56 2024 +1000

    GHA fixes

commit 37186c1eccb9d75f37b67e1ac6f79091e78328d7
Author: animetosho <[email protected]>
Date:   Sun May 12 19:24:02 2024 +1000

sander@bananapif3:~/git/ParPar$ 

@sanderjo
Copy link
Author

sander@bananapif3:~/git/ParPar$ cd test/bench/
sander@bananapif3:~/git/ParPar/test/bench$ cmake
Usage

  cmake [options] <path-to-source>
  cmake [options] <path-to-existing-build>
  cmake [options] -S <path-to-source> -B <path-to-build>

Specify a source directory to (re-)generate a build system for it in the
current working directory.  Specify an existing build directory to
re-generate its build system.

Run 'cmake --help' for more information.


and

sander@bananapif3:~/git/ParPar/test/bench$ cmake ..
CMake Warning:
  Ignoring extra path from command line:

   ".."


CMake Error: The source directory "/home/sander/git/ParPar/test" does not appear to contain CMakeLists.txt.
Specify --help for usage, or press the help button on the CMake GUI.

@sanderjo
Copy link
Author

On the dev branch (right?), the node-gyp rebuild does not give a (real) error, so good? Where is the parpar binary now?

sander@bananapif3:~/git/ParPar$ git log | head -10
commit 1410d77116404cac8190e03ef9f20657f64c99b9
Author: animetosho <[email protected]>
Date:   Thu May 16 10:22:56 2024 +1000

    GHA fixes

commit 37186c1eccb9d75f37b67e1ac6f79091e78328d7
sander@bananapif3:~/git/ParPar$ node-gyp rebuild
gyp info it worked if it ends with ok
gyp info using [email protected]
gyp info using [email protected] | linux | riscv64
gyp info find Python using Python version 3.12.3 found at "/usr/bin/python3"
gyp info spawn /usr/bin/python3
gyp info spawn args [
gyp info spawn args   '/usr/share/nodejs/node-gyp/gyp/gyp_main.py',
gyp info spawn args   'binding.gyp',
gyp info spawn args   '-f',
gyp info spawn args   'make',
gyp info spawn args   '-I',
gyp info spawn args   '/home/sander/git/ParPar/build/config.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/usr/share/nodejs/node-gyp/addon.gypi',
gyp info spawn args   '-I',
gyp info spawn args   '/usr/include/nodejs/common.gypi',
gyp info spawn args   '-Dlibrary=shared_library',
gyp info spawn args   '-Dvisibility=default',
gyp info spawn args   '-Dnode_root_dir=/usr/include/nodejs',
gyp info spawn args   '-Dnode_gyp_dir=/usr/share/nodejs/node-gyp',
gyp info spawn args   '-Dnode_lib_file=/usr/include/nodejs/<(target_arch)/node.lib',
gyp info spawn args   '-Dmodule_root_dir=/home/sander/git/ParPar',
gyp info spawn args   '-Dnode_engine=v8',
gyp info spawn args   '--depth=.',
gyp info spawn args   '--no-parallel',
gyp info spawn args   '--generator-output',
gyp info spawn args   'build',
gyp info spawn args   '-Goutput_dir=.'
gyp info spawn args ]
gyp info spawn make
gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
make: Entering directory '/home/sander/git/ParPar/build'
  CXX(target) Release/obj.target/gf16/gf16/gf16mul.o
  AR(target) Release/obj.target/gf16.a
  COPY Release/gf16.a
  CC(target) Release/obj.target/gf16_avx/gf16/gf16_shuffle_avx.o
  AR(target) Release/obj.target/gf16_avx.a
  COPY Release/gf16_avx.a
  CC(target) Release/obj.target/gf16_avx2/gf16/gf16_xor_avx2.o
  CC(target) Release/obj.target/gf16_avx2/gf16/gf16_shuffle_avx2.o
  CC(target) Release/obj.target/gf16_avx2/gf16/gf_add_avx2.o
  CC(target) Release/obj.target/gf16_avx2/gf16/gf16_cksum_avx2.o
  AR(target) Release/obj.target/gf16_avx2.a
  COPY Release/gf16_avx2.a
  CC(target) Release/obj.target/gf16_avx512/gf16/gf16_xor_avx512.o
  CC(target) Release/obj.target/gf16_avx512/gf16/gf16_shuffle_avx512.o
  CC(target) Release/obj.target/gf16_avx512/gf16/gf_add_avx512.o
  CC(target) Release/obj.target/gf16_avx512/gf16/gf16_cksum_avx512.o
  AR(target) Release/obj.target/gf16_avx512.a
  COPY Release/gf16_avx512.a
  CC(target) Release/obj.target/gf16_generic/gf16/gf16_lookup.o
  CC(target) Release/obj.target/gf16_generic/gf16/gf_add_generic.o
  CC(target) Release/obj.target/gf16_generic/gf16/gf16_cksum_generic.o
  AR(target) Release/obj.target/gf16_generic.a
  COPY Release/gf16_generic.a
  CC(target) Release/obj.target/gf16_gfni/gf16/gf16_affine_gfni.o
  AR(target) Release/obj.target/gf16_gfni.a
  COPY Release/gf16_gfni.a
  CC(target) Release/obj.target/gf16_gfni_avx10/gf16/gf16_affine_avx10.o
  CC(target) Release/obj.target/gf16_gfni_avx10/gf16/gf_add_avx10.o
  AR(target) Release/obj.target/gf16_gfni_avx10.a
  COPY Release/gf16_gfni_avx10.a
  CC(target) Release/obj.target/gf16_gfni_avx2/gf16/gf16_affine_avx2.o
  CC(target) Release/obj.target/gf16_gfni_avx2/src/platform_warnings.o
  AR(target) Release/obj.target/gf16_gfni_avx2.a
  COPY Release/gf16_gfni_avx2.a
  CC(target) Release/obj.target/gf16_gfni_avx512/gf16/gf16_affine_avx512.o
  AR(target) Release/obj.target/gf16_gfni_avx512.a
  COPY Release/gf16_gfni_avx512.a
  CC(target) Release/obj.target/gf16_neon/gf16/gf16_shuffle_neon.o
  CC(target) Release/obj.target/gf16_neon/gf16/gf16_clmul_neon.o
  CC(target) Release/obj.target/gf16_neon/gf16/gf_add_neon.o
  CC(target) Release/obj.target/gf16_neon/gf16/gf16_cksum_neon.o
  AR(target) Release/obj.target/gf16_neon.a
  COPY Release/gf16_neon.a
  CC(target) Release/obj.target/gf16_rvv/gf16/gf16_shuffle128_rvv.o
In file included from ../gf16/gf16_shuffle128_rvv.c:238:
../gf16/gf16_checksum_rvv.h: In function ‘gf16_checksum_blocku_rvv’:
../gf16/gf16_checksum_rvv.h:35:16: warning: unused variable ‘vlmax’ [-Wunused-variable]
   35 |         size_t vlmax = RV(vsetvlmax_e8m1)();
      |                ^~~~~
  CC(target) Release/obj.target/gf16_rvv/gf16/gf_add_rvv.o
  CC(target) Release/obj.target/gf16_rvv/gf16/gf16_cksum_rvv.o
In file included from ../gf16/gf16_cksum_rvv.c:4:
../gf16/gf16_checksum_rvv.h: In function ‘gf16_checksum_blocku_rvv’:
../gf16/gf16_checksum_rvv.h:35:16: warning: unused variable ‘vlmax’ [-Wunused-variable]
   35 |         size_t vlmax = RV(vsetvlmax_e8m1)();
      |                ^~~~~
  AR(target) Release/obj.target/gf16_rvv.a
  COPY Release/gf16_rvv.a
  CC(target) Release/obj.target/gf16_rvv_zvbc/gf16/gf16_clmul_rvv.o
In file included from ../gf16/gf16_clmul_rvv.c:144:
../gf16/gf16_checksum_rvv.h: In function ‘gf16_checksum_blocku_rvv’:
../gf16/gf16_checksum_rvv.h:35:16: warning: unused variable ‘vlmax’ [-Wunused-variable]
   35 |         size_t vlmax = RV(vsetvlmax_e8m1)();
      |                ^~~~~
  AR(target) Release/obj.target/gf16_rvv_zvbc.a
  COPY Release/gf16_rvv_zvbc.a
  CC(target) Release/obj.target/gf16_sha3/gf16/gf16_clmul_sha3.o
  AR(target) Release/obj.target/gf16_sha3.a
  COPY Release/gf16_sha3.a
  CC(target) Release/obj.target/gf16_sse2/gf16/gf16_xor_sse2.o
  CC(target) Release/obj.target/gf16_sse2/gf16/gf16_lookup_sse2.o
  CC(target) Release/obj.target/gf16_sse2/gf16/gf_add_sse2.o
  CC(target) Release/obj.target/gf16_sse2/gf16/gf16_cksum_sse2.o
  AR(target) Release/obj.target/gf16_sse2.a
  COPY Release/gf16_sse2.a
  CC(target) Release/obj.target/gf16_ssse3/gf16/gf16_shuffle_ssse3.o
  AR(target) Release/obj.target/gf16_ssse3.a
  COPY Release/gf16_ssse3.a
  CC(target) Release/obj.target/gf16_sve/gf16/gf16_shuffle128_sve.o
  CC(target) Release/obj.target/gf16_sve/gf16/gf_add_sve.o
  CC(target) Release/obj.target/gf16_sve/gf16/gf16_cksum_sve.o
  AR(target) Release/obj.target/gf16_sve.a
  COPY Release/gf16_sve.a
  CC(target) Release/obj.target/gf16_sve2/gf16/gf16_shuffle128_sve2.o
  CC(target) Release/obj.target/gf16_sve2/gf16/gf16_shuffle2x128_sve2.o
  CC(target) Release/obj.target/gf16_sve2/gf16/gf16_shuffle512_sve2.o
  CC(target) Release/obj.target/gf16_sve2/gf16/gf16_clmul_sve2.o
  CC(target) Release/obj.target/gf16_sve2/gf16/gf_add_sve2.o
  AR(target) Release/obj.target/gf16_sve2.a
  COPY Release/gf16_sve2.a
  CC(target) Release/obj.target/gf16_vbmi/gf16/gf16_shuffle_vbmi.o
  AR(target) Release/obj.target/gf16_vbmi.a
  COPY Release/gf16_vbmi.a
  CXX(target) Release/obj.target/hasher/hasher/hasher.o
  CXX(target) Release/obj.target/hasher/hasher/hasher_input.o
  CXX(target) Release/obj.target/hasher/hasher/hasher_md5mb.o
  CXX(target) Release/obj.target/hasher/hasher/hasher_scalar.o
  CXX(target) Release/obj.target/hasher/hasher/tables.o
  AR(target) Release/obj.target/hasher.a
  COPY Release/hasher.a
  CXX(target) Release/obj.target/hasher_armcrc/hasher/hasher_armcrc.o
  AR(target) Release/obj.target/hasher_armcrc.a
  COPY Release/hasher_armcrc.a
  CXX(target) Release/obj.target/hasher_avx2/hasher/hasher_avx2.o
  AR(target) Release/obj.target/hasher_avx2.a
  COPY Release/hasher_avx2.a
  CXX(target) Release/obj.target/hasher_avx512/hasher/hasher_avx512.o
  AR(target) Release/obj.target/hasher_avx512.a
  COPY Release/hasher_avx512.a
  CXX(target) Release/obj.target/hasher_avx512vl/hasher/hasher_avx512vl.o
  AR(target) Release/obj.target/hasher_avx512vl.a
  COPY Release/hasher_avx512vl.a
  CXX(target) Release/obj.target/hasher_bmi1/hasher/hasher_bmi1.o
  AR(target) Release/obj.target/hasher_bmi1.a
  COPY Release/hasher_bmi1.a
  CC(target) Release/obj.target/hasher_c/hasher/crc_zeropad.o
  CC(target) Release/obj.target/hasher_c/hasher/md5-final.o
  AR(target) Release/obj.target/hasher_c.a
  COPY Release/hasher_c.a
  CXX(target) Release/obj.target/hasher_clmul/hasher/hasher_clmul.o
  AR(target) Release/obj.target/hasher_clmul.a
  COPY Release/hasher_clmul.a
  CXX(target) Release/obj.target/hasher_neon/hasher/hasher_neon.o
  AR(target) Release/obj.target/hasher_neon.a
  COPY Release/hasher_neon.a
  CXX(target) Release/obj.target/hasher_neoncrc/hasher/hasher_neoncrc.o
  AR(target) Release/obj.target/hasher_neoncrc.a
  COPY Release/hasher_neoncrc.a
  CXX(target) Release/obj.target/hasher_rvzbc/hasher/hasher_rvzbc.o
  AR(target) Release/obj.target/hasher_rvzbc.a
  COPY Release/hasher_rvzbc.a
  CXX(target) Release/obj.target/hasher_sse2/hasher/hasher_sse.o
  AR(target) Release/obj.target/hasher_sse2.a
  COPY Release/hasher_sse2.a
  CXX(target) Release/obj.target/hasher_sve2/hasher/hasher_sve2.o
  AR(target) Release/obj.target/hasher_sve2.a
  COPY Release/hasher_sve2.a
  CXX(target) Release/obj.target/hasher_xop/hasher/hasher_xop.o
  AR(target) Release/obj.target/hasher_xop.a
  COPY Release/hasher_xop.a
  CC(target) Release/obj.target/parpar_gf_c/gf16/opencl-include/cl.o
  CC(target) Release/obj.target/parpar_gf_c/gf16/gfmat_coeff.o
  AR(target) Release/obj.target/parpar_gf_c.a
  COPY Release/parpar_gf_c.a
  CXX(target) Release/obj.target/parpar_gf/src/gf.o
  CXX(target) Release/obj.target/parpar_gf/gf16/controller.o
  CXX(target) Release/obj.target/parpar_gf/gf16/controller_cpu.o
  CXX(target) Release/obj.target/parpar_gf/gf16/controller_ocl.o



  CXX(target) Release/obj.target/parpar_gf/gf16/controller_ocl_init.o
  SOLINK_MODULE(target) Release/obj.target/parpar_gf.node
  COPY Release/parpar_gf.node
make: Leaving directory '/home/sander/git/ParPar/build'
gyp info ok 

@sanderjo
Copy link
Author

Ah, cmake . (so with a dot) works ?

sander@bananapif3:~/git/ParPar/test/bench$ cmake .
-- The C compiler identification is GNU 14.0.1
-- The CXX compiler identification is GNU 14.0.1
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
Building for riscv64
-- Looking for posix_memalign
-- Looking for posix_memalign - found
-- Performing Test COMPILER_SUPPORTS_RVV
-- Performing Test COMPILER_SUPPORTS_RVV - Success
-- Performing Test COMPILER_SUPPORTS_RVV_ZVBC
-- Performing Test COMPILER_SUPPORTS_RVV_ZVBC - Success
-- Performing Test COMPILER_SUPPORTS_RVZBKC
-- Performing Test COMPILER_SUPPORTS_RVZBKC - Success
-- Configuring done (5.5s)
-- Generating done (0.2s)
-- Build files have been written to: /home/sander/git/ParPar/test/bench

@sanderjo
Copy link
Author

sander@bananapif3:~/git/ParPar/test/bench$ ./bench-gf16 -fmuladdmp
-bash: ./bench-gf16: No such file or directory
sander@bananapif3:~/git/ParPar/test/bench$ 
sander@bananapif3:~/git/ParPar/test/bench$ 
sander@bananapif3:~/git/ParPar/test/bench$ ll
total 240
drwxrwxr-x  3 sander sander   4096 May 18 16:08 ./
drwxrwxr-x  5 sander sander   4096 May 18 15:53 ../
-rw-rw-r--  1 sander sander   4926 May 18 15:53 bench.h
-rw-rw-r--  1 sander sander  14874 May 18 16:08 CMakeCache.txt
drwxrwxr-x 17 sander sander   4096 May 18 16:08 CMakeFiles/
-rw-rw-r--  1 sander sander   1645 May 18 16:08 cmake_install.cmake
-rw-rw-r--  1 sander sander   1069 May 18 15:53 CMakeLists.txt
-rw-rw-r--  1 sander sander  36541 May 18 15:53 gf16.cpp
-rw-rw-r--  1 sander sander  16395 May 18 15:53 gf16-ctrl.cpp
-rw-rw-r--  1 sander sander   2103 May 18 15:53 gf16-inv.cpp
-rw-rw-r--  1 sander sander   2334 May 18 15:53 gf16-pmul.cpp
-rw-rw-r--  1 sander sander   5057 May 18 15:53 hasher.cpp
-rw-rw-r--  1 sander sander 124172 May 18 16:08 Makefile
sander@bananapif3:~/git/ParPar/test/bench$ 

@sanderjo
Copy link
Author

Oh, after the cmake . a plain make ? Running that now ... BRB

@sanderjo
Copy link
Author

sander@bananapif3:~/git/ParPar/test/bench$ make
[  1%] Building C object CMakeFiles/gf16_c.dir/home/sander/git/ParPar/gf16/gf_add_avx2.c.o
[  2%] Building C object CMakeFiles/gf16_c.dir/home/sander/git/ParPar/gf16/gf_add_avx10.c.o
[  3%] Building C object CMakeFiles/gf16_c.dir/home/sander/git/ParPar/gf16/gf_add_avx512.c.o
[  4%] Building C object CMakeFiles/gf16_c.dir/home/sander/git/ParPar/gf16/gf_add_generic.c.o
[  5%] Building C object CMakeFiles/gf16_c.dir/home/sander/git/ParPar/gf16/gf_add_neon.c.o
[  6%] Building C object CMakeFiles/gf16_c.dir/home/sander/git/ParPar/gf16/gf_add_rvv.c.o
[  7%] Building C object CMakeFiles/gf16_c.dir/home/sander/git/ParPar/gf16/gf_add_sse2.c.o
[  8%] Building C object CMakeFiles/gf16_c.dir/home/sander/git/ParPar/gf16/gf_add_sve.c.o
[  9%] Building C object CMakeFiles/gf16_c.dir/home/sander/git/ParPar/gf16/gf_add_sve2.c.o
[ 10%] Building C object CMakeFiles/gf16_c.dir/home/sander/git/ParPar/gf16/gf16_affine_avx2.c.o
[ 11%] Building C object CMakeFiles/gf16_c.dir/home/sander/git/ParPar/gf16/gf16_affine_avx10.c.o
[ 12%] Building C object CMakeFiles/gf16_c.dir/home/sander/git/ParPar/gf16/gf16_affine_avx512.c.o
[ 13%] Building C object CMakeFiles/gf16_c.dir/home/sander/git/ParPar/gf16/gf16_affine_gfni.c.o
[ 14%] Building C object CMakeFiles/gf16_c.dir/home/sander/git/ParPar/gf16/gf16_cksum_avx2.c.o
[ 15%] Building C object CMakeFiles/gf16_c.dir/home/sander/git/ParPar/gf16/gf16_cksum_avx512.c.o
[ 17%] Building C object CMakeFiles/gf16_c.dir/home/sander/git/ParPar/gf16/gf16_cksum_generic.c.o
[ 18%] Building C object CMakeFiles/gf16_c.dir/home/sander/git/ParPar/gf16/gf16_cksum_neon.c.o
[ 19%] Building C object CMakeFiles/gf16_c.dir/home/sander/git/ParPar/gf16/gf16_cksum_rvv.c.o
In file included from /home/sander/git/ParPar/gf16/gf16_cksum_rvv.c:4:
/home/sander/git/ParPar/gf16/gf16_checksum_rvv.h: In function ‘gf16_checksum_blocku_rvv’:
/home/sander/git/ParPar/gf16/gf16_checksum_rvv.h:35:16: warning: unused variable ‘vlmax’ [-Wunused-variable]
   35 |         size_t vlmax = RV(vsetvlmax_e8m1)();
      |                ^~~~~
[ 20%] Building C object CMakeFiles/gf16_c.dir/home/sander/git/ParPar/gf16/gf16_cksum_sse2.c.o
[ 21%] Building C object CMakeFiles/gf16_c.dir/home/sander/git/ParPar/gf16/gf16_cksum_sve.c.o
[ 22%] Building C object CMakeFiles/gf16_c.dir/home/sander/git/ParPar/gf16/gf16_clmul_neon.c.o
[ 23%] Building C object CMakeFiles/gf16_c.dir/home/sander/git/ParPar/gf16/gf16_clmul_sha3.c.o
[ 24%] Building C object CMakeFiles/gf16_c.dir/home/sander/git/ParPar/gf16/gf16_clmul_sve2.c.o
[ 25%] Building C object CMakeFiles/gf16_c.dir/home/sander/git/ParPar/gf16/gf16_clmul_rvv.c.o
In file included from /home/sander/git/ParPar/gf16/gf16_clmul_rvv.c:144:
/home/sander/git/ParPar/gf16/gf16_checksum_rvv.h: In function ‘gf16_checksum_blocku_rvv’:
/home/sander/git/ParPar/gf16/gf16_checksum_rvv.h:35:16: warning: unused variable ‘vlmax’ [-Wunused-variable]
   35 |         size_t vlmax = RV(vsetvlmax_e8m1)();
      |                ^~~~~
[ 26%] Building C object CMakeFiles/gf16_c.dir/home/sander/git/ParPar/gf16/gf16_lookup.c.o
[ 27%] Building C object CMakeFiles/gf16_c.dir/home/sander/git/ParPar/gf16/gf16_lookup_sse2.c.o
[ 28%] Building C object CMakeFiles/gf16_c.dir/home/sander/git/ParPar/gf16/gf16_shuffle_avx.c.o
[ 29%] Building C object CMakeFiles/gf16_c.dir/home/sander/git/ParPar/gf16/gf16_shuffle_avx2.c.o
[ 30%] Building C object CMakeFiles/gf16_c.dir/home/sander/git/ParPar/gf16/gf16_shuffle_avx512.c.o
[ 31%] Building C object CMakeFiles/gf16_c.dir/home/sander/git/ParPar/gf16/gf16_shuffle_neon.c.o
[ 32%] Building C object CMakeFiles/gf16_c.dir/home/sander/git/ParPar/gf16/gf16_shuffle_ssse3.c.o
[ 34%] Building C object CMakeFiles/gf16_c.dir/home/sander/git/ParPar/gf16/gf16_shuffle_vbmi.c.o
[ 35%] Building C object CMakeFiles/gf16_c.dir/home/sander/git/ParPar/gf16/gf16_shuffle2x128_sve2.c.o
[ 36%] Building C object CMakeFiles/gf16_c.dir/home/sander/git/ParPar/gf16/gf16_shuffle128_rvv.c.o
In file included from /home/sander/git/ParPar/gf16/gf16_shuffle128_rvv.c:238:
/home/sander/git/ParPar/gf16/gf16_checksum_rvv.h: In function ‘gf16_checksum_blocku_rvv’:
/home/sander/git/ParPar/gf16/gf16_checksum_rvv.h:35:16: warning: unused variable ‘vlmax’ [-Wunused-variable]
   35 |         size_t vlmax = RV(vsetvlmax_e8m1)();
      |                ^~~~~
[ 37%] Building C object CMakeFiles/gf16_c.dir/home/sander/git/ParPar/gf16/gf16_shuffle128_sve.c.o
[ 38%] Building C object CMakeFiles/gf16_c.dir/home/sander/git/ParPar/gf16/gf16_shuffle128_sve2.c.o
[ 39%] Building C object CMakeFiles/gf16_c.dir/home/sander/git/ParPar/gf16/gf16_shuffle512_sve2.c.o
[ 40%] Building C object CMakeFiles/gf16_c.dir/home/sander/git/ParPar/gf16/gf16_xor_avx2.c.o
[ 41%] Building C object CMakeFiles/gf16_c.dir/home/sander/git/ParPar/gf16/gf16_xor_avx512.c.o
[ 42%] Building C object CMakeFiles/gf16_c.dir/home/sander/git/ParPar/gf16/gf16_xor_sse2.c.o
[ 43%] Building C object CMakeFiles/gf16_c.dir/home/sander/git/ParPar/gf16/gfmat_coeff.c.o
[ 44%] Building C object CMakeFiles/gf16_c.dir/home/sander/git/ParPar/gf16/opencl-include/cl.c.o
[ 45%] Building C object CMakeFiles/gf16_c.dir/home/sander/git/ParPar/src/platform_warnings.c.o
[ 46%] Building C object CMakeFiles/gf16_c.dir/home/sander/git/ParPar/gf16/gf16pmul_avx2.c.o
[ 47%] Building C object CMakeFiles/gf16_c.dir/home/sander/git/ParPar/gf16/gf16pmul_neon.c.o
[ 48%] Building C object CMakeFiles/gf16_c.dir/home/sander/git/ParPar/gf16/gf16pmul_sse.c.o
[ 50%] Building C object CMakeFiles/gf16_c.dir/home/sander/git/ParPar/gf16/gf16pmul_sve2.c.o
[ 51%] Building C object CMakeFiles/gf16_c.dir/home/sander/git/ParPar/gf16/gf16pmul_rvv.c.o
[ 52%] Building C object CMakeFiles/gf16_c.dir/home/sander/git/ParPar/gf16/gf16pmul_vpclgfni.c.o
[ 53%] Building C object CMakeFiles/gf16_c.dir/home/sander/git/ParPar/gf16/gf16pmul_vpclmul.c.o
[ 54%] Linking C static library libgf16_c.a
[ 54%] Built target gf16_c
[ 55%] Building CXX object CMakeFiles/gf16_base.dir/home/sander/git/ParPar/gf16/gf16mul.cpp.o
[ 56%] Linking CXX static library libgf16_base.a
[ 56%] Built target gf16_base
[ 57%] Building CXX object CMakeFiles/gf16_pmul.dir/home/sander/git/ParPar/gf16/gf16pmul.cpp.o
[ 58%] Linking CXX static library libgf16_pmul.a
[ 58%] Built target gf16_pmul
[ 59%] Building CXX object CMakeFiles/gf16_inv.dir/home/sander/git/ParPar/gf16/gfmat_inv.cpp.o
[ 60%] Linking CXX static library libgf16_inv.a
[ 60%] Built target gf16_inv
[ 61%] Building CXX object CMakeFiles/gf16_ctl.dir/home/sander/git/ParPar/gf16/controller.cpp.o
[ 62%] Building CXX object CMakeFiles/gf16_ctl.dir/home/sander/git/ParPar/gf16/controller_cpu.cpp.o
[ 63%] Building CXX object CMakeFiles/gf16_ctl.dir/home/sander/git/ParPar/gf16/controller_ocl.cpp.o


[ 64%] Building CXX object CMakeFiles/gf16_ctl.dir/home/sander/git/ParPar/gf16/controller_ocl_init.cpp.o
[ 65%] Linking CXX static library libgf16_ctl.a
[ 65%] Built target gf16_ctl
[ 67%] Building C object CMakeFiles/hasher_c.dir/home/sander/git/ParPar/hasher/crc_zeropad.c.o
[ 68%] Building C object CMakeFiles/hasher_c.dir/home/sander/git/ParPar/hasher/md5-final.c.o
[ 69%] Linking C static library libhasher_c.a
[ 69%] Built target hasher_c
[ 70%] Building CXX object CMakeFiles/hasher.dir/home/sander/git/ParPar/hasher/hasher.cpp.o
[ 71%] Building CXX object CMakeFiles/hasher.dir/home/sander/git/ParPar/hasher/hasher_input.cpp.o
[ 72%] Building CXX object CMakeFiles/hasher.dir/home/sander/git/ParPar/hasher/hasher_md5crc.cpp.o
[ 73%] Building CXX object CMakeFiles/hasher.dir/home/sander/git/ParPar/hasher/hasher_md5mb.cpp.o
[ 74%] Building CXX object CMakeFiles/hasher.dir/home/sander/git/ParPar/hasher/hasher_armcrc.cpp.o
[ 75%] Building CXX object CMakeFiles/hasher.dir/home/sander/git/ParPar/hasher/hasher_avx2.cpp.o
[ 76%] Building CXX object CMakeFiles/hasher.dir/home/sander/git/ParPar/hasher/hasher_avx512.cpp.o
[ 77%] Building CXX object CMakeFiles/hasher.dir/home/sander/git/ParPar/hasher/hasher_avx512vl.cpp.o
[ 78%] Building CXX object CMakeFiles/hasher.dir/home/sander/git/ParPar/hasher/hasher_bmi1.cpp.o
[ 79%] Building CXX object CMakeFiles/hasher.dir/home/sander/git/ParPar/hasher/hasher_clmul.cpp.o
[ 80%] Building CXX object CMakeFiles/hasher.dir/home/sander/git/ParPar/hasher/hasher_neon.cpp.o
[ 81%] Building CXX object CMakeFiles/hasher.dir/home/sander/git/ParPar/hasher/hasher_neoncrc.cpp.o
[ 82%] Building CXX object CMakeFiles/hasher.dir/home/sander/git/ParPar/hasher/hasher_scalar.cpp.o
[ 84%] Building CXX object CMakeFiles/hasher.dir/home/sander/git/ParPar/hasher/hasher_sse.cpp.o
[ 85%] Building CXX object CMakeFiles/hasher.dir/home/sander/git/ParPar/hasher/hasher_sve2.cpp.o
[ 86%] Building CXX object CMakeFiles/hasher.dir/home/sander/git/ParPar/hasher/hasher_xop.cpp.o
[ 87%] Building CXX object CMakeFiles/hasher.dir/home/sander/git/ParPar/hasher/hasher_rvzbc.cpp.o
[ 88%] Building CXX object CMakeFiles/hasher.dir/home/sander/git/ParPar/hasher/tables.cpp.o
[ 89%] Linking CXX static library libhasher.a
[ 89%] Built target hasher
[ 90%] Building CXX object CMakeFiles/bench-gf16.dir/gf16.cpp.o
[ 91%] Linking CXX executable bench-gf16
[ 91%] Built target bench-gf16
[ 92%] Building CXX object CMakeFiles/bench-ctrl.dir/gf16-ctrl.cpp.o
/home/sander/git/ParPar/test/bench/gf16-ctrl.cpp: In function ‘int main(int, char**)’:
/home/sander/git/ParPar/test/bench/gf16-ctrl.cpp:351:14: warning: variable ‘showDefaultOclMethod’ set but not used [-Wunused-but-set-variable]
  351 |         bool showDefaultOclMethod = true;
      |              ^~~~~~~~~~~~~~~~~~~~
[ 93%] Linking CXX executable bench-ctrl
[ 93%] Built target bench-ctrl
[ 94%] Building CXX object CMakeFiles/bench-inv.dir/gf16-inv.cpp.o
[ 95%] Linking CXX executable bench-inv
[ 95%] Built target bench-inv
[ 96%] Building CXX object CMakeFiles/bench-pmul.dir/gf16-pmul.cpp.o
[ 97%] Linking CXX executable bench-pmul
[ 97%] Built target bench-pmul
[ 98%] Building CXX object CMakeFiles/bench-hasher.dir/hasher.cpp.o
[100%] Linking CXX executable bench-hasher
[100%] Built target bench-hasher

@sanderjo
Copy link
Author

(intermediate)

sander@bananapif3:~/git/ParPar/test/bench$ ./bench-gf16 -fmuladdmp
Default method: Shuffle-128 (RVV) @ 16K
                 1K       2K       4K       8K      16K      32K      48K      64K      96K     128K     192K     256K     512K    1024K 
Lookup:
 MAddPk 2:    122.1    150.7    170.5    182.1    184.1    188.0    188.7    189.9    190.0    190.5    188.5    189.2    189.3    189.6 
 MAddPk 3:    122.2    150.8    170.3    179.9    184.2    187.9    189.0    189.9    189.2    189.9    188.5    189.3    189.4    189.4 
 MAddPk 4:    122.3    150.8    170.3    178.0    184.3    188.1    188.9    189.8    188.3    189.7    188.1    189.2    189.3    189.4 
 MAddPk 6:    122.3    150.8    169.7    177.9    184.2    188.1    189.2    189.4    189.2    189.3    189.4    189.3    189.2    189.3 
 MAddPk 8:    122.3    150.7    166.9    177.9    184.2    188.0    187.5    189.0    187.7    189.3    183.8    189.3    189.2    189.4 
 MAddPk16:    122.3    148.3    166.9    178.1    184.2    187.1    186.5    188.6    183.3    189.3    183.5    189.1    189.3    189.5 
3-part Lookup:
 MAddPk 2:    113.0    129.1    138.9    143.0    143.5    145.1    145.4    146.0    145.9    146.2    144.7    145.5    145.2    145.1 

@animetosho
Copy link
Owner

animetosho commented May 18, 2024

Oh sorry, I should've given clearer instructions, but it looks like you figured it out. Thanks for the effort!

Oof, probably should use a smaller test size - can add something like -z1024 to the bench-gf16 command to hopefully make the bench run faster.

@sanderjo
Copy link
Author

sander@bananapif3:~/git/ParPar/test/bench$ time ./bench-gf16 -fmuladdmp
Default method: Shuffle-128 (RVV) @ 16K
                 1K       2K       4K       8K      16K      32K      48K      64K      96K     128K     192K     256K     512K    1024K 
Lookup:
 MAddPk 2:    120.9    149.7    170.0    181.8    183.9    187.6    188.7    189.6    190.0    190.7    188.4    189.8    189.8    189.8 
 MAddPk 3:    121.0    149.7    169.9    179.4    184.0    187.7    188.8    189.6    189.2    190.1    188.8    189.7    189.7    189.7 
 MAddPk 4:    121.0    149.8    169.9    177.2    184.1    187.7    188.7    189.7    188.4    189.9    188.4    189.6    189.4    189.6 
 MAddPk 6:    121.1    149.7    169.2    177.1    184.1    187.9    189.1    189.4    189.6    189.8    189.9    189.6    189.4    189.5 
 MAddPk 8:    121.0    149.7    166.5    177.6    184.2    187.9    187.4    189.1    188.0    189.7    184.0    189.4    189.4    189.4 
 MAddPk16:    121.0    147.4    166.3    177.6    184.1    187.0    186.7    188.6    183.6    189.5    183.7    189.3    189.4    189.4 
3-part Lookup:
 MAddPk 2:    112.8    129.1    138.9    142.9    143.3    144.9    145.2    145.8    145.9    146.1    144.6    145.7    145.5    145.4 
 MAddPk 3:    112.9    129.1    138.4    140.9    143.4    144.9    145.3    145.8    145.1    145.8    144.8    145.6    145.4    145.3 
 MAddPk 4:    113.0    129.1    138.3    141.1    143.4    144.9    145.2    145.7    144.7    145.7    144.5    145.5    145.2    145.2 
 MAddPk 6:    113.0    129.1    135.0    141.4    143.3    144.9    145.3    145.5    145.6    145.6    145.6    145.4    145.1    145.1 
 MAddPk 8:    112.9    128.9    136.0    141.5    143.3    144.8    144.1    145.3    144.4    145.5    141.2    145.3    145.1    145.0 
 MAddPk16:    112.9    127.3    136.5    141.5    143.3    144.3    143.7    145.0    141.0    145.4    140.9    145.1    145.0    145.0 
Shuffle-128 (RVV):
 MAddPk 2:   1167.7   1235.0   1270.9   1287.7   1270.0   1288.5   1292.6   1298.0   1298.3   1301.1   1281.1   1293.4   1295.0   1294.0 
 MAddPk 3:   1102.8   1154.7   1183.5   1151.2   1172.9   1191.5   1186.2   1187.7   1175.2   1182.9   1176.3   1180.7   1181.4   1177.3 
 MAddPk 4:   1105.1   1154.6   1181.7   1152.4   1147.5   1188.7   1187.4   1188.8   1178.0   1185.0   1173.3   1186.7   1179.0   1167.0 
 MAddPk 6:   1114.2   1161.0   1173.5   1160.1   1159.5   1193.0   1186.0   1185.5   1187.4   1182.2   1181.5   1180.4   1178.3   1173.2 
 MAddPk 8:   1136.4   1183.4   1044.5   1184.8   1183.1   1216.8   1202.5   1212.0   1201.6   1210.3   1168.9   1208.9   1202.0   1201.7 
 MAddPk16:   1118.1   1056.3   1144.3   1166.2   1151.5   1176.4   1177.0   1187.7   1149.5   1182.8   1141.4   1174.4   1173.3   1172.4 

real    3m9.426s
user    3m9.376s
sys     0m0.025s

@sanderjo
Copy link
Author

And, yes, bench-gf16 contains vector commands, so looks good?

sander@bananapif3:~/git/ParPar/test/bench$ objdump -d bench-gf16  | awk '{ print $3 }' | sort -u | grep -E "^v" | head -10
vadd.vv
vand.vi
vand.vv
vfirst.m
vl1re16.v
vl1r.v
vle8.v
vlm.v
vlseg2e16.v
vlseg2e8.v
sander@bananapif3:~/git/ParPar/test/bench$ objdump -d bench-gf16  | awk '{ print $3 }' | sort -u | grep -E "^v" | wc -l
33

@animetosho
Copy link
Owner

Thank you! That's some interesting results.

@sanderjo
Copy link
Author

I wrote a RVV detector: https://github.com/sanderjo/anything_everything/blob/main/rvv_detector/rvv_detector.py

... which I brute-force ran on ~/git/ParPar. See results below with only the files that do contain RVV code.

Is this what you expected?

NB: this is

commit 1410d77116404cac8190e03ef9f20657f64c99b9 (HEAD, origin/dev)
Author: animetosho <[email protected]>
Date:   Thu May 16 10:22:56 2024 +1000

    GHA fixes

Binary files with RVV code in them:

sander@bananapif3:~$ cat logging_rvv_gitParPar.log  | grep -i number | grep -vi "commands 0" 
git/ParPar/test/bench/CMakeFiles/gf16_c.dir/home/sander/git/ParPar/gf16/gf_add_rvv.c.o: number of RVV commands 1224 (and 2596 non-RVV commands)
git/ParPar/test/bench/CMakeFiles/gf16_c.dir/home/sander/git/ParPar/gf16/gf16_cksum_rvv.c.o: number of RVV commands 434 (and 372 non-RVV commands)
git/ParPar/test/bench/CMakeFiles/gf16_c.dir/home/sander/git/ParPar/gf16/gf16_shuffle128_rvv.c.o: number of RVV commands 3839 (and 3944 non-RVV commands)
git/ParPar/test/bench/CMakeFiles/gf16_c.dir/home/sander/git/ParPar/gf16/gf16_clmul_rvv.c.o: number of RVV commands 965 (and 2141 non-RVV commands)
git/ParPar/test/bench/bench-gf16: number of RVV commands 6462 (and 36367 non-RVV commands)
git/ParPar/test/bench/bench-ctrl: number of RVV commands 6462 (and 73114 non-RVV commands)
git/ParPar/test/bench/bench-inv: number of RVV commands 6462 (and 45666 non-RVV commands)
git/ParPar/build/Release/obj.target/gf16_rvv_zvbc/gf16/gf16_clmul_rvv.o: number of RVV commands 939 (and 1686 non-RVV commands)
git/ParPar/build/Release/obj.target/gf16_rvv/gf16/gf16_shuffle128_rvv.o: number of RVV commands 2489 (and 2749 non-RVV commands)
git/ParPar/build/Release/obj.target/gf16_rvv/gf16/gf_add_rvv.o: number of RVV commands 813 (and 1675 non-RVV commands)
git/ParPar/build/Release/obj.target/gf16_rvv/gf16/gf16_cksum_rvv.o: number of RVV commands 434 (and 372 non-RVV commands)
git/ParPar/build/Release/obj.target/parpar_gf.node: number of RVV commands 4675 (and 91740 non-RVV commands)
git/ParPar/build/Release/parpar_gf.node: number of RVV commands 4675 (and 91740 non-RVV commands)

@animetosho
Copy link
Owner

The results roughly look right to me.

In terms of your script, I'm not sure if instructions starting with v are guaranteed to all be vector related. But if it's just a quick script for yourself, it's probably sufficient.

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