{"action":"created","issue":{"url":"https://api.github.com/repos/gcp/leela-zero/issues/1759","repository_url":"https://api.github.com/repos/gcp/leela-zero","labels_url":"https://api.github.com/repos/gcp/leela-zero/issues/1759/labels{/name}","comments_url":"https://api.github.com/repos/gcp/leela-zero/issues/1759/comments","events_url":"https://api.github.com/repos/gcp/leela-zero/issues/1759/events","html_url":"https://github.com/gcp/leela-zero/issues/1759","id":353211455,"node_id":"MDU6SXNzdWUzNTMyMTE0NTU=","number":1759,"title":"leelazero failed to run with RK3288 OpenCL","user":{"login":"genleung","id":478956,"node_id":"MDQ6VXNlcjQ3ODk1Ng==","avatar_url":"https://avatars1.githubusercontent.com/u/478956?v=4","gravatar_id":"","url":"https://api.github.com/users/genleung","html_url":"https://github.com/genleung","followers_url":"https://api.github.com/users/genleung/followers","following_url":"https://api.github.com/users/genleung/following{/other_user}","gists_url":"https://api.github.com/users/genleung/gists{/gist_id}","starred_url":"https://api.github.com/users/genleung/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/genleung/subscriptions","organizations_url":"https://api.github.com/users/genleung/orgs","repos_url":"https://api.github.com/users/genleung/repos","events_url":"https://api.github.com/users/genleung/events{/privacy}","received_events_url":"https://api.github.com/users/genleung/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2018-08-23T03:43:21Z","updated_at":"2018-08-23T12:07:27Z","closed_at":null,"author_association":"NONE","body":"I successfully built leelazero next branch on a Linux(Linaro) @ RK3288 SoC which has OpenCL1.1 support, but failed to run it. Here are the results:\r\n\r\n> linaro@tkb:~/software/lz$ ./leelaz -w 5b_3rdparty.txt -g --noponder -p1\r\n> Using 2 thread(s).\r\n> RNG seed: 18061742662717508185\r\n> BLAS Core: ARMV6\r\n> Detecting residual layers...v1...64 channels...5 blocks.\r\n> Initializing OpenCL (autodetect precision).\r\n> Detected 1 OpenCL platforms.\r\n> Platform version: OpenCL 1.2 v1.r9p0-05rel0-git(f980191).e4ba9e4c6ff8005348d0332aae160089\r\n> Platform profile: FULL_PROFILE\r\n> Platform name:    ARM Platform\r\n> Platform vendor:  ARM\r\n> Device ID:     0\r\n> Device name:   Mali-T760\r\n> Device type:   GPU\r\n> Device vendor: ARM\r\n> Device driver: 1.2\r\n> Device speed:  99 MHz\r\n> Device cores:  4 CU\r\n> Device score:  112\r\n> Selected platform: ARM Platform\r\n> Selected device: Mali-T760\r\n> with OpenCL 1.2 capability.\r\n> Half precision compute support: YES\r\n> \r\n> Started OpenCL SGEMM tuner.\r\n> Will try 290 valid configurations.\r\n> (1/290) KWG=16 KWI=2 MDIMA=8 MDIMC=8 MWG=16 NDIMB=8 NDIMC=8 NWG=16 SA=1 SB=1 STRM=0 STRN=0 VWM=2 VWN=2 0.0000 ms (inf GFLOPS)\r\n> (2/290) KWG=16 KWI=2 MDIMA=8 MDIMC=8 MWG=32 NDIMB=8 NDIMC=8 NWG=16 SA=1 SB=1 STRM=0 STRN=0 VWM=2 VWN=2 0.0000 ms (inf GFLOPS)\r\n> (3/290) KWG=16 KWI=2 MDIMA=8 MDIMC=8 MWG=64 NDIMB=8 NDIMC=8 NWG=16 SA=1 SB=1 STRM=0 STRN=0 VWM=2 VWN=2 0.0000 ms (inf GFLOPS)\r\n> (4/290) KWG=16 KWI=2 MDIMA=8 MDIMC=8 MWG=16 NDIMB=8 NDIMC=8 NWG=32 SA=1 SB=1 STRM=0 STRN=0 VWM=2 VWN=2 0.0000 ms (inf GFLOPS)\r\n> (5/290) KWG=16 KWI=2 MDIMA=8 MDIMC=8 MWG=32 NDIMB=8 NDIMC=8 NWG=32 SA=1 SB=1 STRM=0 STRN=0 VWM=2 VWN=2 0.0000 ms (inf GFLOPS)\r\n> .... ( the similar outputs are omitted here) ...\r\n> SB=1 STRM=0 STRN=0 VWM=4 VWN=4 0.0000 ms (inf GFLOPS)\r\n> (288/290) KWG=32 KWI=8 MDIMA=8 MDIMC=8 MWG=64 NDIMB=16 NDIMC=16 NWG=64 SA=1 SB=1 STRM=0 STRN=0 VWM=4 VWN=4 0.0000 ms (inf GFLOPS)\r\n> (289/290) KWG=16 KWI=8 MDIMA=16 MDIMC=16 MWG=64 NDIMB=16 NDIMC=16 NWG=64 SA=1 SB=1 STRM=0 STRN=0 VWM=4 VWN=4 0.0000 ms (inf GFLOPS)\r\n> (290/290) KWG=32 KWI=8 MDIMA=16 MDIMC=16 MWG=64 NDIMB=16 NDIMC=16 NWG=64 SA=1 SB=1 STRM=0 STRN=0 VWM=4 VWN=4 0.0000 ms (inf GFLOPS)\r\n> Failed to enqueue: 14 kernels\r\n> Failed to find a working configuration.\r\n> Check your OpenCL drivers.\r\n> Minimum error: 0.000000. Error bound: 0.000100\r\n> Detected 1 OpenCL platforms.\r\n> Platform version: OpenCL 1.2 v1.r9p0-05rel0-git(f980191).e4ba9e4c6ff8005348d0332aae160089\r\n> Platform profile: FULL_PROFILE\r\n> Platform name:    ARM Platform\r\n> Platform vendor:  ARM\r\n> Device ID:     0\r\n> Device name:   Mali-T760\r\n> Device type:   GPU\r\n> Device vendor: ARM\r\n> Device driver: 1.2\r\n> Device speed:  99 MHz\r\n> Device cores:  4 CU\r\n> Device score:  112\r\n> Selected platform: ARM Platform\r\n> Selected device: Mali-T760\r\n> with OpenCL 1.2 capability.\r\n> Half precision compute support: YES\r\n> \r\n> Started OpenCL SGEMM tuner.\r\n> Will try 290 valid configurations.\r\n> (1/290) KWG=16 KWI=2 MDIMA=8 MDIMC=8 MWG=16 NDIMB=8 NDIMC=8 NWG=16 SA=1 SB=1 STRM=0 STRN=0 VWM=2 VWN=2 0.0000 ms (inf GFLOPS)\r\n> (2/290) KWG=16 KWI=2 MDIMA=8 MDIMC=8 MWG=32 NDIMB=8 NDIMC=8 NWG=16 SA=1 SB=1 STRM=0 STRN=0 VWM=2 VWN=2 0.0000 ms (inf GFLOPS)\r\n> (3/290) KWG=16 KWI=2 MDIMA=8 MDIMC=8 MWG=64 NDIMB=8 NDIMC=8 NWG=16 SA=1 SB=1 STRM=0 STRN=0 VWM=2 VWN=2 0.0000 ms (inf GFLOPS)\r\n> (4/290) KWG=16 KWI=2 MDIMA=8 MDIMC=8 MWG=16 NDIMB=8 NDIMC=8 NWG=32 SA=1 SB=1 STRM=0 STRN=0 VWM=2 VWN=2 0.0000 ms (inf GFLOPS)\r\n> (5/290) KWG=16 KWI=2 MDIMA=8 MDIMC=8 MWG=32 NDIMB=8 NDIMC=8 NWG=32 SA=1 SB=1 \r\n> .... ( the similar outputs are omitted here) ...\r\n> (286/290) KWG=16 KWI=8 MDIMA=8 MDIMC=8 MWG=64 NDIMB=16 NDIMC=16 NWG=64 SA=1 SB=1 STRM=0 STRN=0 VWM=4 VWN=4 0.0000 ms (inf GFLOPS)\r\n> (287/290) KWG=32 KWI=8 MDIMA=8 MDIMC=8 MWG=32 NDIMB=16 NDIMC=16 NWG=64 SA=1 SB=1 STRM=0 STRN=0 VWM=4 VWN=4 0.0000 ms (inf GFLOPS)\r\n> (288/290) KWG=32 KWI=8 MDIMA=8 MDIMC=8 MWG=64 NDIMB=16 NDIMC=16 NWG=64 SA=1 SB=1 STRM=0 STRN=0 VWM=4 VWN=4 0.0000 ms (inf GFLOPS)\r\n> (289/290) KWG=16 KWI=8 MDIMA=16 MDIMC=16 MWG=64 NDIMB=16 NDIMC=16 NWG=64 SA=1 SB=1 STRM=0 STRN=0 VWM=4 VWN=4 0.0000 ms (inf GFLOPS)\r\n> (290/290) KWG=32 KWI=8 MDIMA=16 MDIMC=16 MWG=64 NDIMB=16 NDIMC=16 NWG=64 SA=1 SB=1 STRM=0 STRN=0 VWM=4 VWN=4 0.0000 ms (inf GFLOPS)\r\n> Failed to enqueue: 14 kernels\r\n> Failed to find a working configuration.\r\n> Check your OpenCL drivers.\r\n> Minimum error: 0.000079. Error bound: 0.100000\r\n> Both single precision and half precision failed to run\r\n> terminate called after throwing an instance of 'std::runtime_error'\r\n>   what():  Failed to initialize net\r\n> Given up\r\n> "},"comment":{"url":"https://api.github.com/repos/gcp/leela-zero/issues/comments/415391602","html_url":"https://github.com/gcp/leela-zero/issues/1759#issuecomment-415391602","issue_url":"https://api.github.com/repos/gcp/leela-zero/issues/1759","id":415391602,"node_id":"MDEyOklzc3VlQ29tbWVudDQxNTM5MTYwMg==","user":{"login":"Ttl","id":544240,"node_id":"MDQ6VXNlcjU0NDI0MA==","avatar_url":"https://avatars2.githubusercontent.com/u/544240?v=4","gravatar_id":"","url":"https://api.github.com/users/Ttl","html_url":"https://github.com/Ttl","followers_url":"https://api.github.com/users/Ttl/followers","following_url":"https://api.github.com/users/Ttl/following{/other_user}","gists_url":"https://api.github.com/users/Ttl/gists{/gist_id}","starred_url":"https://api.github.com/users/Ttl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Ttl/subscriptions","organizations_url":"https://api.github.com/users/Ttl/orgs","repos_url":"https://api.github.com/users/Ttl/repos","events_url":"https://api.github.com/users/Ttl/events{/privacy}","received_events_url":"https://api.github.com/users/Ttl/received_events","type":"User","site_admin":false},"created_at":"2018-08-23T12:07:27Z","updated_at":"2018-08-23T12:07:27Z","author_association":"COLLABORATOR","body":"```\r\nFailed to enqueue: 14 kernels\r\nFailed to find a working configuration.\r\nCheck your OpenCL drivers.\r\nMinimum error: 0.000000. Error bound: 0.000100\r\n```\r\n\r\nIt looks like only 14 kernels fail to run and the rest are working fine. The broken part is OpenCL kernel profiling that is used to time the kernel execution. It seems that this driver always returns zero seconds for the runtime. 0 is used as uninitialized value and it fails since tuner checks if runtime is 0 after the tuning for a sign of no working kernels.\r\n\r\nYou can fix this by adding an alternative method of timing to the tuner. It should only be used if the driver profiling timer returns zero since driver profiling is much more accurate with working drivers."}}
{"actor":{"display_login":"Ttl"}}