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

add OpenBLAS detection and modify tests codes #40

Merged
merged 6 commits into from
Mar 22, 2023

Conversation

katsu560
Copy link
Contributor

@katsu560 katsu560 commented Mar 18, 2023

I revised src/CMakeLists.txt for fixing indents and commands for Haiku and adding OpenBLAS detection.
OpenBLAS detection codes in whisper CMakeLists.txt isn't enough. That detects only OpenBLAS library.
Thus, I added codes for detecting OpenBLAS header based on caffe's FindOpenBLAS.cmake.

I also revised tests/CMakeLists.txt for adding OpenBLAS detection and support x86 system w/o FMA instructions.
And some tests code are modified.

test-vec1.c:
The fmadd codes are changed to without FMA codes on no FMA support system.

test-grad0.c test-mul-mat0.c:
The loop number is changeable by environment variable GGML_NLOOP or command line option.
Because, 1000 or 500 loop are too much to finish loop in a time.

test2.c:
n_threads is changeable by environment variable GGML_NTHREADS or command line option.
Because my 4-logical core cpu pc can't do test2 with 8 threads setting.

After adapted my modifications, the results of make test is as follows on my old SandyBridge Linux pc.

$ GGML_NLOOP=1 GGML_NTHREADS=4 make test
Running tests...
Test project /home/user/github/gpt/ggml/build
      Start  1: test-vec0
 1/10 Test  #1: test-vec0 ........................   Passed    4.01 sec
      Start  2: test-vec1
 2/10 Test  #2: test-vec1 ........................   Passed   11.79 sec
      Start  3: test-grad0
 3/10 Test  #3: test-grad0 .......................   Passed  147.97 sec
      Start  4: test-mul-mat0
 4/10 Test  #4: test-mul-mat0 ....................   Passed   35.14 sec
      Start  5: test-mul-mat2
 5/10 Test  #5: test-mul-mat2 ....................   Passed    2.49 sec
      Start  6: test0
 6/10 Test  #6: test0 ............................   Passed    2.46 sec
      Start  7: test1
 7/10 Test  #7: test1 ............................   Passed   25.39 sec
      Start  8: test2
 8/10 Test  #8: test2 ............................   Passed   12.83 sec
      Start  9: test3
 9/10 Test  #9: test3 ............................   Passed   12.71 sec
      Start 10: test-svd0
10/10 Test #10: test-svd0 ........................   Passed    2.36 sec

100% tests passed, 0 tests failed out of 10

Total Test time (real) = 257.22 sec

@ggerganov ggerganov merged commit 434b8ea into ggerganov:master Mar 22, 2023
@katsu560 katsu560 deleted the devpr branch March 25, 2023 02:08
CCLDArjun pushed a commit to CCLDArjun/ggml that referenced this pull request Dec 18, 2023
* Nix flake

* Nix: only add Accelerate framework on macOS

* Nix: development shel, direnv and compatibility

* Nix: use python packages supplied by withPackages

* Nix: remove channel compatibility

* Nix: fix ARM neon dotproduct on macOS

---------

Co-authored-by: Pavol Rusnak <pavol@rusnak.io>
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 this pull request may close these issues.

2 participants