取自Sklearn文档:
总结The problem is that Python multiprocessing does a fork system call without following it with an exec system call for performance reasons. Many librarIEs like (some versions of) Accelerate / veclib under OSX,(some versions of) MKL,the OpenMP runtime of GCC,nvIDia’s Cuda (and probably many others),manage their own internal thread pool. Upon a call to fork,the thread pool state in the child process is corrupted: the thread pool belIEves it has many threads while only the main thread state has been forked. It is possible to change the librarIEs to make them detect when a fork happens and reinitialize the thread pool in that case: we dID that for OpenBLAS (merged upstream in master since 0.2.10) and we contributed a patch to GCC’s OpenMP runtime (not yet revIEwed).
以上是内存溢出为你收集整理的python – n_jobs在sklearn-classes中不起作用全部内容,希望文章能够帮你解决python – n_jobs在sklearn-classes中不起作用所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)