<2022-03-07 Mon>
调用clCreateBuffer()产生异常问题(一)
在vscode上的堆栈输出如下:
libc.so.6!__pthread_kill_implementation (Unknown Source:0)
libc.so.6!raise (Unknown Source:0)
libc.so.6!abort (Unknown Source:0)
libigdrcl.so![Unknown/Just-In-Time compiled code] (Unknown Source:0)
libOpenCL.so!clCreateBuffer (Unknown Source:0)
AcquireMagickCLCacheInfo(MagickCLDevice device, Quantum * pixels, const magick_int64_t length) (gm-ocl/magick/opencl.c:569)
GetAuthenticOpenCLBuffer(const Image * image, MagickCLDevice device, ExceptionInfo * exception) (gm-ocl/magick/pixel_cache.c:5252)
因为堆栈显示问题最终是出在__pthread_kill_implementation上,所以我的调查方向一直在线程同步上,代码调试了一遍又一遍却始终没有找到问题。心灰意冷并已经产生从头再开始的想法了。
注意到:
libigdrcl.so![Unknown/Just-In-Time compiled code] (Unknown Source:0)
谷歌了下libigdrcl.so,难道是安装intel驱动的问题?目前使用的是intel-compute-runtime,现改为intel-opencl-runtime,参考自:“GPGPU - ArchWiki”。
$ sudo pacman -Rns intel-compute-runtime
$ yay -S intel-opencl-runtime
我对比了intel-compute-runtime和intel-opencl-runtime的clinfo输出差异发现intel-compute-runtime支持GPU,intel-opencl-runtime支持CPU。
那代码到底有没有问题?clCreateBuffer()调用失败的原因要不要深究?
vscode环境
// tasks.json
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version"

作者描述了在VSCode环境中遇到的clCreateBuffer调用异常问题,怀疑可能是由IntelComputeRuntime升级到IntelOpenCLRuntime引起的。文章详细记录了堆栈跟踪、代码调试过程以及环境配置。
最低0.47元/天 解锁文章
489

被折叠的 条评论
为什么被折叠?



