-
問題錄
- (Ubuntu18.04)在運行程序時,在啓動jupyter的Terminal中,出現 “Your CPU supports instructions that this TensorFlow binary was not compiled to use : AVX2 FMA”
- 解決方案: 在程序中添加兩行代碼
import os os.environ['TF_CPP_MIN_LOG_LEVEL'] = '2' # 忽略哪些報告
- 解決方案: 在程序中添加兩行代碼
- Ubuntu18.04)在運行程序時,在啓動jupyter的Terminal中,出現如下報錯:
Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 FMA Successfully opened dynamic library libcuda.so.1 unable to create StreamExecutor for CUDA:0: failed initializing StreamExecutor for CUDA device ordinal 0: Internal: failed call to cuDevicePrimaryCtxRetain: CUDA_ERROR_OUT_OF_MEMORY: out of memory; total memory reported: 8366784512 Attempting to fetch value instead of handling error Internal: no supported devices found for platform CUDA KernelRestarter: restarting kernel (1/5), keep random ports WARNING:root:kernel 6dbbeb38-7b12-473a-89c0-51d5a0398abe restarted Kernel Restarting The kernel appears to have died. It will restart automatically.
- 原因分析:顯卡內存不足,因爲在使用TensorFlow做人工神經網絡運算時,會默認佔用GPU所有的顯存,這樣以防止被其他程序佔用。
- 問題解決:
- 重啓 jupyter note book,清除已佔用的GPU內存。
- 或者:在程序中加入(待驗證)
import os os.environ['KMP_DUPLICATE_LIB_OK'] = 'TRUE'