Closed ghost closed 1 year ago
Try this:
export LD_LIBRARY_PATH=/system/vendor/lib64:$PREFIX/lib
make alltuners
If that does not work try switching the directories like this:
export LD_LIBRARY_PATH=$PREFIX/lib:/system/vendor/lib64
make alltuners
Try this:
export LD_LIBRARY_PATH=/system/vendor/lib64:$PREFIX/lib make alltuners
Thank you for your response. Unfortunately, no success.
~/CLBlast/build (master) [2]> export LD_LIBRARY_PATH=/system/vendor/lib64:$PREFIX/lib
u0_a1282@localhost ~/CLBlast/build (master)> make alltuners
CANNOT LINK EXECUTABLE "/data/data/com.termux/files/usr/bin/cmake": cannot locate symbol "_ZNKSt6__ndk14__fs10filesystem4path10__filenameEv" referenced by "/data/data/com.termux/files/usr/bin/cmake"...
make: *** [Makefile:3065: cmake_check_build_system] Error 1
If that does not work try switching the directories like this:
export LD_LIBRARY_PATH=$PREFIX/lib:/system/vendor/lib64 make alltuners
truboxl from the Termux repo says that can't work: https://github.com/termux/termux-packages/issues/16852#issuecomment-1579047943
.. I tried it anyway, but failed to complete make:
~/CLBlast/build (master) [2]> export LD_LIBRARY_PATH=$PREFIX/lib:/system/vendor/lib64
u0_a1282@localhost ~/CLBlast (master)> make alltuners
[ 6%] Built target tuners_common_library
[ 8%] Built target clblast_tuner_xgemv
[ 10%] Built target clblast_tuner_transpose_pad
[ 12%] Built target clblast_tuner_copy_fast
[ 80%] Built target clblast
[ 83%] Built target clblast_tuner_routine_xgemm
[ 85%] Built target clblast_tuner_transpose_fast
[ 87%] Built target clblast_tuner_xaxpy
[ 89%] Built target clblast_tuner_routine_xtrsv
[ 91%] Built target clblast_tuner_xdot
[ 92%] Built target clblast_tuner_xgemm_direct
[ 93%] Built target clblast_tuner_xconvgemm
[ 95%] Built target clblast_tuner_xger
[ 96%] Built target clblast_tuner_invert
[ 98%] Built target clblast_tuner_copy_pad
[100%] Built target clblast_tuner_xgemm
* Options given/available:
-platform 0 [=default]
-device 0 [=default]
-precision 32 (single) [=default]
-m 1024 [=default]
-n 1024 [=default]
-alpha 2.00 [=default]
-fraction 1.00 [=default]
-runs 10 [=default]
-max_l2_norm 0.00 [=default]
CLBlast: OpenCL error: clGetPlatformIDs: -1001
make[3]: *** [CMakeFiles/alltuners.dir/build.make:70: CMakeFiles/alltuners] Error 23
make[2]: *** [CMakeFiles/Makefile2:545: CMakeFiles/alltuners.dir/all] Error 2
make[1]: *** [CMakeFiles/Makefile2:552: CMakeFiles/alltuners.dir/rule] Error 2
make: *** [Makefile:377: alltuners] Error 2
Thanks for direction with this. edit: corrected make directory with same result.
@JackJollimore The main problem is that Adreno devices don't support ocl-icd interface. Which is why you need all these env variables hacks.
I can't give you an exact solution because I don't have an Adreno device to test with, but you could probably remove all cmake
commands from the Makefile
and only run the tuners. That should work, but as I said I don't have a device to test it.
@JackJollimore The main problem is that Adreno devices don't support ocl-icd interface. Which is why you need all these env variables hacks.
I can't give you an exact solution because I don't have an Adreno device to test with, but you could probably remove all
cmake
commands from theMakefile
and only run the tuners. That should work, but as I said I don't have a device to test it.
Thanks. I don't have the skill to remove all cmake
commands from the Makefile
.
I'll test, but the Makefile
might as well be in french to me.
So make alltuners
is basically a target that does two things: compile all tuners, and run them all. This can also be achieved manually by running each executable separately. Especially in case of issues, that should be the way forward. So retry first as follows:
make clblast_tuner_xaxpy # or just plain `make`
./clblast_tuner_xaxpy --precision 32 --device 0 --platform 0
See also https://github.com/CNugteren/CLBlast/blob/master/doc/tuning.md, it has the full list of tuner commands.
So
make alltuners
is basically a target that does two things: compile all tuners, and run them all. This can also be achieved manually by running each executable separately. Especially in case of issues, that should be the way forward. So retry first as follows:make clblast_tuner_xaxpy # or just plain `make` ./clblast_tuner_xaxpy --precision 32 --device 0 --platform 0
See also https://github.com/CNugteren/CLBlast/blob/master/doc/tuning.md, it has the full list of tuner commands.
Thanks for clarifying. These gave issues:
./clblast_tuner_xgemm -precision 32
./clblast_tuner_xgemm -precision 3232
./clblast_tuner_xgemm -precision 16
./clblast_tuner_xgemm_direct -precision 16
./clblast_tuner_routine_xtrsv -precision 16 doesnt run
It appears they make a json, but failing at another process:
* Writing a total of 578 results to 'clblast_xgemm_1_32.json'
* Completed tuning process
* (2/4) Tuning main GEMM kernel (GEMMK == 0) for random parameters out of larger set
* Options given/available: -platform 0 [=default]
-device 0 [=default]
-precision 32 (single) [=default]
-m 1024 [=default]
-n 1024 [=default]
-k 1024 [=default]
-alpha 2.00 [=default]
-beta 2.00 [=default]
-fraction 512.00 [=default]
-runs 2 [=default] -max_l2_norm 0.00 [=default]
* Found 120800 configuration(s)
* Exploring a random subset of 235 configuration(s)
* Parameters explored: GEMMK MWG NWG KWG MDIMC NDIMC MDIMA NDIMB KWI VWM VWN STRM STRN SA SB KREG
...
| 1057.22 ms | 2.0 | results match | | 150 | 235 | 0 64 128 16 8 16 32 8
2 1 1 0 1 1 1 1 | 8 16 | 128 128 | OK 230 ms | 93.65 ms | 22.9 | results match |
fish: Job 1, 'LD_LIBRARY_PATH=/vendor/lib64:$…' terminated by signal SIGABRT (Abort)
I'm not sure if that's concerning or not.
I continued, then used this normally:
python ../scripts/database/database.py . ..
make
I hope it's suffecient: https://github.com/CNugteren/CLBlast/issues/1#issuecomment-1599694622
Thanks! It seems it did work indeed, the tuning results look fine and have been added to the library here: https://github.com/CNugteren/CLBlast/pull/493
So I guess we can close this issue.
Hi, I want to export a json to supply tuner variables for Adreno 640 devices.
I build CLBlast fine, but make alltuners fails when I follow documentation from: https://github.com/CNugteren/CLBlast/blob/master/doc/tuning.md
Here's the error;
I tried without including path to OpenCL library:
Here's clinfo;
Thank you.