日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

MKL_THREADING_LAYER=INTEL is incompatible with libgomp.so.1 library

發布時間:2023/12/15 编程问答 42 豆豆
生活随笔 收集整理的這篇文章主要介紹了 MKL_THREADING_LAYER=INTEL is incompatible with libgomp.so.1 library 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

使用pytorch做分布式訓練時,遇到錯誤:

Error: mkl-service + Intel(R) MKL: MKL_THREADING_LAYER=INTEL is incompatible with libgomp.so.1 library.Try to import numpy first or set the threading layer accordingly. Set MKL_SERVICE_FORCE_INTEL to force it.

解決方案1:在環境變量增加設置

export MKL_SERVICE_FORCE_INTEL=1

解決方案2:在環境變量增加設置

export MKL_THREADING_LAYER=GNU

問題分析:

Grepping conda manifests, libgomp is pulled in by?libgcc-ng, which is in turn pulled in by, uh, pretty much everything. So the culprit is more likely to be whoever's setting?MKL_THREADING_LAYER=INTEL. As far as that goes, well, it's weird.

import osdef print_layer(prefix):print(f'{prefix}: {os.environ.get("MKL_THREADING_LAYER")}')if __name__ == '__main__':print_layer('Pre-import')import numpy as npfrom torch import multiprocessing as mpprint_layer('Post-import')mp.set_start_method('spawn')p = mp.Process(target=print_layer, args=('Child',))p.start()p.join()

See, if torch is imported before numpy then the child process here gets a GNU threading layer (even though the parent doesn't have the variable defined).

Pre-import: None Post-import: None Child: GNU

But if the imports are swapped so numpy is imported before torch, the child process gets an INTEL threading layer

Pre-import: None Post-import: None Child: INTEL

So I suspect numpy - or ones of its imports - is messing with the?env?parameter of?Popen, but half an hour's search and I can't figure out how.

Ref:?https://github.com/pytorch/pytorch/issues/37377

總結

以上是生活随笔為你收集整理的MKL_THREADING_LAYER=INTEL is incompatible with libgomp.so.1 library的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。