CUDA와 Windows의 성능이 심각하게 저하되어 인텔을 기본 GPU로 만드시겠습니까?

CUDA와 Windows의 성능이 심각하게 저하되어 인텔을 기본 GPU로 만드시겠습니까?

듀얼부트 시스템에 GPU 텐서플로우 설치를 진행했습니다( Windows 10Ubuntu 16.04.x).

두 OS 모두 거의 동일한 버전의 드라이버를 가지고 있습니다.

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

apt-getUbuntu 설치는 소스 설치가 아닌 모든 기본값을 통해 이루어졌으며pip

지금까지 내 생각 중 하나는... 그래픽을 칠하기 위해 NVIDIA GPU를 사용해야 한다는 것입니다.. 컴퓨팅을 위해 모든 GPU를 활용하지 못하는 것입니다.. 이를 확인할 수 있는 방법이 있습니까? 패치를 포함하여 두 장치 모두에 모든 것을 설치했습니다.CUDA 8.x

문제가 무엇인지조차 확실하지 않지만 드라이버가 Optimus를 사용하도록 설정된 것 같습니다.. 다른 프로필로 전환해야 할까요?

여기에 이미지 설명을 입력하세요

아이디어 1: 내일 시도해 볼 수 있는 것은 Ubuntu 16.x 내부의 모든 CPU 최적화를 사용하여 소스에서 tensorflow를 다시 컴파일하는 것입니다. 아마도 pip 설치는 Windows의 바이너리 설치보다 더 고통스러울 것입니다...

아이디어 2: 위에서 아무 일도 일어나지 않으면 BIOS로 가서 인텔 통합 그래픽을 강제로 설치합니다. 다시 설치하고 noveua 그래픽을 설치해 봅니다. 다음과 같습니다.

"Optimus" 지원 노트북인 것 같습니다. 렌더링을 위해 nvidia gpu를 완전히 끌 수 없으며 하이브리드 모드만 활성화합니다. 아마도 새로 설치할 것입니다. 모든 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

설치한 후에는 Nvidia의 독점 드라이버 대신 intel nouveau 드라이버 모드에 있는지 확인해야 합니다.

이제 이상한 부분이 생겼습니다.

여기 사용자는 동일한 문제를 지적했지만 데스크톱 배포의 경우

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_PATH하고 PATH설치 후 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. 갑자기 모든 것이 효과가 있었습니다.

업데이트: 안타깝게도 재부팅으로 인해 구성이 중단되었습니다. 아직 어떻게 고쳐야할지 모르겠어요...

관련 정보