-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Crash under OSX #1677
Comments
Almost certainly broken graphics drivers, just like many Macs. Nothing we can do to fix that. You skipped all the output from the graphics/OpenCL detection. |
is there a fix for Mac users? or do they have no choice to use gpu mode? |
I met this crash, too. |
Whether you have problems or not depends entirely on the graphics card in your Mac and the driver versions that you have for it. If your drivers are broken you can hope Apple issues an update (hahaha) or use the CPU. |
For those running into problems, what's the output from the beginning of running ./leelaz ? It should include the OpenCL version / date and devices with driver info, etc. as well as which device ended up being selected. |
leela zero says Initializing OpenCL (autodetect precision). |
So.. I updated to 10.13.6 and now this device causes my machine to either hard lock or
The above was with 10.13.5 and didn't crash but updating to |
Can confirm it crashes with
|
Regarding "integrated intel graphics not making much difference" - the on-paper performance of Iris 540 is 230GFLOPS in single precision, Leela can squeeze out 108GFLOPS. Meanwhile, the CPU peak performance according to whetstone is 16GFLOPS - so not using GPU on my macbook makes Leela still 6x-14x slower, very roughly. It makes a difference even for integrated GPUs. :) |
Also hit this issue lately, but only with Probably related to changes from PR #1643, I found it work before that commit. Possibly the GPU on Mac has problem supporting that. How hard it would be to support both F(4x4, 3x3) and F(2x2, 3x3)? It is a pain for me now writing new code on my MBP. @gcp @Ttl |
@Ttl To work around this problem , I tried to revert #1643 but keeps the batch support: Though no error reported, the NN eval seems to be totally off on the first move:
Could you take a look and see what I did wrong here? |
You have transposed some of the matrices. Type the matrices from https://arxiv.org/abs/1509.09308 equation (7) exactly as they are written. diff --git a/src/kernels/convolve3.opencl b/src/kernels/convolve3.opencl
index 4149632..83f005a 100644
--- a/src/kernels/convolve3.opencl
+++ b/src/kernels/convolve3.opencl
@@ -30,10 +30,10 @@ void __in_transform_eq(real x[WINOGRAD_ALPHA][WINOGRAD_ALPHA], __global net_t *
real T2[WINOGRAD_ALPHA][WINOGRAD_ALPHA];
const real Bt[WINOGRAD_ALPHA * WINOGRAD_ALPHA] = \
- {1.0, 0.0, 0.0, 0.0,
- 0.0, 1.0, -1.0, 1.0,
- -1.0, 1.0, 1.0, 0.0,
- 0.0, 0.0, 0.0, -1.0};
+ {1.0, 0.0, -1.0, 0.0,
+ 0.0, 1.0, 1.0, 0.0,
+ 0.0, -1.0, 1.0, 0.0,
+ 0.0, 1.0, 0.0, -1.0};
// Calculates transpose(B).x.B
for (int i = 0; i < WINOGRAD_ALPHA; i++){
@@ -154,10 +154,8 @@ void __out_transform_eq(__global const net_t * restrict M, real o[WINOGRAD_M * W
}
const real At[WINOGRAD_M * WINOGRAD_ALPHA] = \
- {1.0, 1.0,
- 1.0, 1.0,
- 1.0, -1.0,
- 0.0, -1.0};
+ {1.0, 1.0, 1.0, 0.0,
+ 0.0, 1.0, -1.0, -1.0};
// Calculates transpose(A).temp_m.A
for (int i = 0; i < WINOGRAD_M; i++){
CPUPipe.cpp also has to be fixed. I don't see how changing the matrix sizes would fix the problem. Before changing to F(2x2, 3x3) try commenting out |
@Ttl Thanks. It works now. FYI commenting out |
This crash happens when built with
#define USE_OPENCL
It does not happen when built with
// #define USE_OPENCL
Steps to reproduce:
Result:
Leela: play black q4
Passes: 0 Black (X) Prisoners: 0
White (O) to move White (O) Prisoners: 0
a b c d e f g h j k l m n o p q r s t
19 . . . . . . . . . . . . . . . . . . . 19
18 . . . . . . . . . . . . . . . . . . . 18
17 . . . . . . . . . . . . . . . . . . . 17
16 . . . + . . . . . + . . . . . + . . . 16
15 . . . . . . . . . . . . . . . . . . . 15
14 . . . . . . . . . . . . . . . . . . . 14
13 . . . . . . . . . . . . . . . . . . . 13
12 . . . . . . . . . . . . . . . . . . . 12
11 . . . . . . . . . . . . . . . . . . . 11
10 . . . + . . . . . + . . . . . + . . . 10
9 . . . . . . . . . . . . . . . . . . . 9
8 . . . . . . . . . . . . . . . . . . . 8
7 . . . . . . . . . . . . . . . . . . . 7
6 . . . . . . . . . . . . . . . . . . . 6
5 . . . . . . . . . . . . . . . . . . . 5
4 . . . + . . . . . + . . . . .(X). . . 4
3 . . . . . . . . . . . . . . . . . . . 3
2 . . . . . . . . . . . . . . . . . . . 2
1 . . . . . . . . . . . . . . . . . . . 1
a b c d e f g h j k l m n o p q r s t
Hash: C231EF71B9CB954B Ko-Hash: 5223DC630503F965
Black time: 01:00:00
White time: 01:00:00
Leela: genmove black
Thinking at most 36.3 seconds...
NN eval=1.000000
Abort trap: 6
The text was updated successfully, but these errors were encountered: