Tensorflow GPU 1.8 with MacOS 10.13.6 Black Screen Problem
 

Tensorflow GPU 1.8 with MacOS 10.13.6 Black Screen Problem  

  RSS

jrowell
(@jrowell)
New Member
Joined: 1 year ago
 

I have a Mid-2018 MBP with an Akitio Node Thunderbolt 3 enclosure holding a GeForce GTX Nvidia 1070Ti. I got this set up strictly for compute-only purposes, and therefore I do not use an external monitor as it is my intention to use this set up for machine learning. I followed the excellent PurgeWrangler tutorial and was able to successfully configure the eGPU and get it up and running as shown below.



Given that the eGPU is installed and being used, the problem I am having is that the eGPU only seems to be working for applications such as Firefox and the like, but I cannot get it to work for any computational programs or purposes. I followed this tutorial for setting up Tensorflow, CUDA, and cuDNN with all of the proper dependencies and everything went well in that regard. I have also installed and ran the set-eGPU.sh script and have tried setting it for all applications, and have also tried setting it for only specific applications like Python, IDLE,  and Terminal.

The problem I am having is that when I get to step 16 in that tutorial to test the installation, I got a black screen after typing in "tf.Session()" and had to restart the computer after waiting for a little while for the black screen to restore. Once the Macbook Pro booted back up, I had the following output in the terminal screen from when I ran the "tf.Session()" command:

To the best of my knowledge I followed the exact sequence of steps in the tutorials I have followed, and I went through and checked all of my dependencies and still no luck... This is my first time using an eGPU, so maybe I am missing something obvious but I would certainly appreciate any help! When I open applications like Firefox I can see in Activity Monitor that the eGPU is clearly working, I just cannot seem to get it to work for computational purposes.

Any help would be appreciated!

Thanks in advance,
Jeff Rowell

Mid-2018 Macbook Pro + Akitio Node Thunderbolt 3 + GeForce GTX Nvidia 1070Ti


ReplyQuote
mac_editor
(@mac_editor)
Famed Member Moderator
Joined: 3 years ago
 

@jrowell Similar:

https://egpu.io/forums/pro-applications/tensorflow-to-use-egpu-akitio-node-nvidia-1070-osx/

https://github.com/marnovo/macOS-eGPU-CUDA-guide#step-by-step-tutorials

Another thing to try would be to disable your AMD GPU completely. See command line Swiss knife in my signature (12th commands). The power-prefs command auto-clears after one boot and looses its effect IFF a previous working discrete GPU was present (which we are preventing using the boot args). Sometimes the power-prefs command may not work. In that case, re-apply the command in Single User Mode.  

purge-wranglerpurge-nvdaset-eGPU
Insights Into macOS Video Editing Performance
2018 MacBook Pro 15" RP560X + RX 5700 XT (Mantiz Venus)

Master Threads:
2014 15-inch MacBook Pro 750M
2018 15-inch MacBook Pro

eGPUless as I am currently in progress of setting up new home.


ReplyQuote
dArtagnan1625
(@dartagnan1625)
Active Member
Joined: 2 years ago
 

I followed some guidelines similar to this when I successfully installed TensorFlow. I had intermittent black screen issues in the past which were solved by hot-plugging the eGPU after login. If you haven't tried that already, it may help.

As for the out of memory issue, I haven't seen that problem using TF 1.7. If downgrading to TF 1.7 is acceptable for you, you could try that version:
pip3 uninstall tensorflow
pip3 install https://storage.googleapis.com/74thopen/tensorflow_osx/tensorflow-1.7.0-cp36-cp36m-macosx_10_13_x86_64_cuda387.178.whl

It should use all the same drivers and libraries you already have.

2016 15" MBP (Radeon 455) + Sonnet Breakaway 350 + Nvidia GTX 1070 Ti


ReplyQuote
jrowell
(@jrowell)
New Member
Joined: 1 year ago
 

@mac_editor

Thank you very much for pointing me to the Command Line Swiss Knife. I ran the following two commands and that did the trick for me and fixed the black screen issue!

@dartagnan1625
Thank you as well! I tried hot-plugging after login and forgot to mention that it did not work. I forgot to install virtualenv but once I did that I think it fixed the out of memory issue!

This forum rocks, thanks for the help!

Mid-2018 Macbook Pro + Akitio Node Thunderbolt 3 + GeForce GTX Nvidia 1070Ti


ReplyQuote
mac_editor
(@mac_editor)
Famed Member Moderator
Joined: 3 years ago
 

@jrowell Good to hear! To undo this later on, just remove the boot-args and reboot twice (power pref lasts one boot), or manually set the power pref to default using %00 instead of %01.

purge-wranglerpurge-nvdaset-eGPU
Insights Into macOS Video Editing Performance
2018 MacBook Pro 15" RP560X + RX 5700 XT (Mantiz Venus)

Master Threads:
2014 15-inch MacBook Pro 750M
2018 15-inch MacBook Pro

eGPUless as I am currently in progress of setting up new home.


ReplyQuote