Skip to content

how can i use all power of my cpus? #948

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

Closed
hjl150505 opened this issue Aug 23, 2016 · 3 comments
Closed

how can i use all power of my cpus? #948

hjl150505 opened this issue Aug 23, 2016 · 3 comments

Comments

@hjl150505
Copy link

my machine have 12 cpus, when i use the two matrixs A and B for the function cblas_sgemm(), i found it will call the function GEMM_LOCAL(args, range_m, range_n, sa, sb, 0) which in the driver/level3/level3_thread.c. I found if i modified SWITCH_RATIO which in the param.h from 4 to 0, it will call the function gemm_driver(args, range_m, range_n, sa, sb, 0) which in the dirver/level3/level3_thread.c too.
The question is: when i run the code which use openblas the cpu utilization have improve, but it will failed final. shouldn't i modified the SWITCH_RATIO from 4 to zero? If not, how can i improve the utilization of my cpu except use USE_SIMPLE_THREADED_LEVEL3 = 1.

@hjl150505
Copy link
Author

hjl150505 commented Aug 23, 2016

when i use gdb to debug my program, i receive this:
Program received signal SIGSEGV, Segmentation fault.
sgemm_beta () at ../kernel/x86_64/gemm_beta.S:122
MOVSD %xmm0, 0 * SIZE(C1)

how can i solve this problem

@martin-frbg
Copy link
Collaborator

I would not dare to meddle with internal constants like that, in particular ones that only have one particular value whereever they are defined at all. :-)
Can you provide more context - what CPU model (actually 12 cpus, or a 12-core cpu ?), what size are the matrices A and B (typically), are you using a current version of OpenBLAS ?
(With current OpenBLAS and Intel CPUs you could try the suggestions in #923 )

@hjl150505
Copy link
Author

The environment compile openblas is msys&mingw-w64. I want to use openblas in windows.
1、It is 12-core cpu
2、the matrices size is:
M = 12
N = 100000
K = 128
3、 the openblas version is 0.2.19.dev

i want use mult-thr
qq 20160824120229
eads, but it is only one thread running. So i change SWITCH_RATIO = 4 in param.h to SWITCH_RATIO = 0, when i use gdb to debut my program i get this error:

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