beagle-dev / beagle-lib

general purpose library for evaluating the likelihood of sequence evolution on trees
MIT License
131 stars 57 forks source link

MAC M1 chip: UNSUPPORTED (log once): createKernel: newComputePipelineState failed #194

Closed xieruopeng closed 1 year ago

xieruopeng commented 1 year ago

Using BEAGLE library v4.0.0 (PRE-RELEASE) for accelerated, parallel likelihood evaluation 2009-, BEAGLE Working Group - https://beagle-dev.github.io/ Citation: Ayres et al (2019) Systematic Biology 68: 1052-1061 | doi:10.1093/sysbio/syz020

BEAGLE resources available: 0 : CPU (arm64) Flags: PRECISION_SINGLE PRECISION_DOUBLE COMPUTATION_SYNCH EIGEN_REAL EIGEN_COMPLEX SCALING_MANUAL SCALING_AUTO SCALING_ALWAYS SCALERS_RAW SCALERS_LOG VECTOR_SSE VECTOR_NONE THREADING_CPP THREADING_NONE PROCESSOR_CPU FRAMEWORK_CPU

1 : Apple M1 Ultra (OpenCL 1.2 ) Global memory (MB): 98304 Clock speed (Ghz): 1.00 Number of compute units: 64 Flags: PRECISION_SINGLE PRECISION_DOUBLE COMPUTATION_SYNCH COMPUTATION_ASYNCH EIGEN_REAL EIGEN_COMPLEX SCALING_MANUAL SCALING_AUTO SCALING_ALWAYS SCALERS_RAW SCALERS_LOG VECTOR_NONE THREADING_CPP THREADING_NONE PROCESSOR_GPU FRAMEWORK_OPENCL PARALLELOPS_STREAMS PARALLELOPS_GRID

UNSUPPORTED (log once): createKernel: newComputePipelineState failed OpenCL error: Failed to create compute kernel kernelMatrixConvolution

Anyone meet such error when running Beast with gpu?

xji3 commented 1 year ago

Thanks for the report. I am able to replicate your error message. The reason is that your gpu doesn't support double precision and you have to manually tell beagle to use single precision to match the hardware by adding a flage -beagle_single. Please also note that the GPU in apple silicon may not be as fast as using -beagle_CPU -beagle_SSE. This issue could provide some more information for you (issue 170).

xieruopeng commented 1 year ago

Thanks a lot