Openblas download and use
Environment:
Platform: Ubuntu 20.04, Orin: Arm Cortex-A78AE v8.2 64-bit
Steps:
1.
Go to github to download the openblas library URL: https://github.com/xianyi/OpenBLAS
Or ubuntu20.04 comes with openblas download using the command:
sudo apt-get install libopenblas-dev
Copy the u disk into the embedded device
mkdir build1
cd build1
cmake ..
make -j8
Then compile the config.h header file
and copy config.h to the outermost directory (/OpenBLAS)
2.
It will also compile libopenblas.a under the lib folder and
cp libopenblas.a to /usr/libsudo cp libopenblas.a /usr/lib
3.
Then enter the benchmark folder (benchmark test folder) to run the test example.
Take gemm.c as an example and compile it with gcc
gcc gemm.c -o a -lopenblas -I /home/xtic/MTS/OpenBLAS
(use the openblas lib.a of the openblas installed on the computer)
gcc gemm.c -o a -L /usr/lib -lopenblas -I /home/xtic/MTS/OpenBLAS -lopenblas -lpthread -lgfortran
(use the openblas lib of the github library .a)
You can print out the computing power and running time
The openblas gemm function implements the specific calling process of each folder.
The detailed implementation details of interface->driver->kernel
can be found in the following link: https://blog.csdn.net/frank2679/article/details/113243044?ops_request_misc=%257B%2522request %255Fid%2522%253A%2522167582703816800182794976%2522%252C%2522scm%2522%253A%252220140713.130102334...%2522%257D&request_id=16758270 3816800182794976&biz_id=0&utm_medium=distribute.pc_search_result.none-task-blog-2 all sobaiduend~default - 1-113243044- null-null.142 v73 insert_down1, 201 v4 add_ask, 239 v1 insert_chatgpt&utm_term=openblas%20gemm&spm=1018.2226.3001.4187