CUDA vs Windows效能嚴重不足,intel主打GPU?

CUDA vs Windows效能嚴重不足,intel主打GPU?

我已經在雙重開機系統上完成了 GPU 張量流安裝(Windows 10Ubuntu 16.04.x

兩個作業系統的驅動程式版本大致相同

Lenovo P50 laptop with Nvidia Quadro M1000M    

Windows 376.51 nvidia driver version
Ubuntu  375.66 nvidia driver version

我訓練深度學習模型,每個訓練集花費的時間差異很大

Windows 10   + Tensorflow 1.3 GPU + CUDA =  8 min. per epoch
Ubuntu 16.04 + Tensorflow 1.3 GPU + CUDA = 45 min. per epoch

Ubuntu 安裝是透過所有預設設定apt-get(不是來源安裝)進行的,並且pip

到目前為止,我的一個想法是……我必須使用 NVIDIA GPU 來繪製圖形……而不是利用所有 GPU 進行計算……有沒有辦法檢查這一點?我已經在同一台電腦上安裝了所有內容...包括補丁CUDA 8.x

我什至不清楚問題是什麼,但看起來驅動程式已設定為使用 Optimus。

在此輸入影像描述

想法一:我明天可能會嘗試從原始碼重新編譯tensorflow..在Ubuntu 16.x內進行所有CPU最佳化..也許pip安裝比Windows上的二進位安裝更痛苦...

想法二:如果上述沒有任何作用,我將進入BIOS並強制英特爾集成顯示卡..重新安裝並嘗試安裝noveua顯卡..有點像這樣:

似乎這是一台啟用了「Optimus」的筆記型電腦。也許我會進行全新安裝..刪除所有nvidia驅動程序,看看我是否可以讓X以這種方式工作..?

http://guanghan.info/blog/en/my-works/building-our-personal-deep-learning-rig-gtx-1080-ubuntu-16-04-cuda-8-0rc-cudnn-7-tensorflowmxnetcaffedarknet/

"So I went to BIOS and set the integrated graphics as default and 
restart. Remember to switch the HDMI from the port on GTX1080 to that 
on the motherboard. Now the display works well. I successfully 
installed Ubuntu following its prompt guides."

https://devtalk.nvidia.com/default/topic/991849/-solved-run-cuda-on-dedicated-nvidia-gpu-while-connecting-monitors-to-intel-hd-graphics-is-this-possible -/

When installing the NVIDIA display driver, be sure to:

1. not install the openGL libs (there are command line options with 
driver runfile installers or CUDA runfile installers to allow this)
2. make sure not to make any changes to the xorg.conf configuration.

答案1

經過多次搜尋、搜尋..合併..我成功找到了問題並解決了它!是的,Windows 中的 Intel GPU 得到了使用,而 Linux 中卻沒有被利用…迫使 NVIDIA GPU 繪製螢幕並失去資源。

我在先前的系統上重新安裝了一個新的 Ubuntu 16.04 USB 記憶棒。

During reinstallation choose updates, but don't use 3rd party libraries

安裝後,您應該驗證您是否處於 intel nouveau 驅動程式模式...而不是 Nvidia 的專有驅動程式。

現在奇怪的部分來了

這裡的用戶指出了同樣的問題..但是對於桌面部署

https://devtalk.nvidia.com/default/topic/991849/cuda-setup-and-installation/-solved-run-cuda-on-dedicated-nvidia-gpu-while-connecting-monitors-to-intel-hd -圖形是可能的-/

基本上...

總之,為了使其發揮作用,您需要

1. make sure you have enabled onboard graphics in the BIOS settings (or set it as primary)

我使用了混合模式..因為沒有隻有英特爾的選項

2. install both xorg intel driver and nvidia/cuda drivers

在這裡,你需要傳遞標誌

--no-opengl-files //for the driver install I choose latest (384)

--no-openfl-libs // cuda 8.0 + patch here ..

請務必停用 nouveau ..以及說明中概述的所有步驟..

知道你很好的主要方法..安裝glmark2並始終確保它輸出英特爾

3. start nvidia-settings, and go to the PRIME settings page, set Intel (Power Saving Mode) as default
4. modify your .bashrc and set LD_LIBRARY_PATH to at least contain /usr/local/cuda/lib64:/usr/lib/nvidia-XXX where XXX in my case is 375.

這個資料夾對我來說根本不存在。我仍然添加了預設值LD_LIBRARY_PATHPATH在安裝後 cuda 說明中概述

4. logout to restart X or reboot
5. run glmark2 to confirm GL status

因為你應該在不安裝 opengl 檔案的情況下安裝..這可能是不需要的

<strike>6. (update) if the libGL printed from step 5 points to nvidia's driver folder, you need to remove/rename the libGL.so*/libGLX.so*/libGLdispatch.so* under nvidia driver folder so that your OS can pick up the mesa libGL library.</strike>


7. run nvidia-smi to list your dedicated NVIDIA GPU, and run your CUDA program, you should not see any errors.

這對我不起作用,直到我跑了nvidia-modprobe一次……然後突然一切都起作用了。

更新:遺憾的是重新啟動破壞了配置。還不知道如何修復...

相關內容