Tensorflow GPU 1.8 with MacOS 10.13.6
 
Notifications
Clear all

Tensorflow GPU 1.8 with MacOS 10.13.6  

 of  3
  RSS

myegpu
(@myegpu)
New Member
Joined: 2 years ago
 

Thanks in advance!

And this is the deviceQuery output if it helps:
--------------

CUDA Device Query (Runtime API) version (CUDART static linking)

 

Detected 1 CUDA Capable device(s)

 

Device 0: "GeForce GTX 1080 Ti"

  CUDA Driver Version / Runtime Version          9.1 / 9.1

  CUDA Capability Major/Minor version number:    6.1

  Total amount of global memory:                 11264 MBytes (11810963456 bytes)

  (28) Multiprocessors, (128) CUDA Cores/MP:     3584 CUDA Cores

  GPU Max Clock rate:                            1633 MHz (1.63 GHz)

  Memory Clock rate:                             5505 Mhz

  Memory Bus Width:                              352-bit

  L2 Cache Size:                                 2883584 bytes

  Maximum Texture Dimension Size (x,y,z)         1D=(131072), 2D=(131072, 65536), 3D=(16384, 16384, 16384)

  Maximum Layered 1D Texture Size, (num) layers  1D=(32768), 2048 layers

  Maximum Layered 2D Texture Size, (num) layers  2D=(32768, 32768), 2048 layers

  Total amount of constant memory:               65536 bytes

  Total amount of shared memory per block:       49152 bytes

  Total number of registers available per block: 65536

  Warp size:                                     32

  Maximum number of threads per multiprocessor:  2048

  Maximum number of threads per block:           1024

  Max dimension size of a thread block (x,y,z): (1024, 1024, 64)

  Max dimension size of a grid size    (x,y,z): (2147483647, 65535, 65535)

  Maximum memory pitch:                          2147483647 bytes

  Texture alignment:                             512 bytes

  Concurrent copy and kernel execution:          Yes with 2 copy engine(s)

  Run time limit on kernels:                     Yes

  Integrated GPU sharing Host Memory:            No

  Support host page-locked memory mapping:       Yes

  Alignment requirement for Surfaces:            Yes

  Device has ECC support:                        Disabled

  Device supports Unified Addressing (UVA):      Yes

  Supports Cooperative Kernel Launch:            Yes

  Supports MultiDevice Co-op Kernel Launch:      No

  Device PCI Domain ID / Bus ID / location ID:   0 / 69 / 0

  Compute Mode:

     < Default (multiple host threads can use ::cudaSetDevice() with device simultaneously) >

 

deviceQuery, CUDA Driver = CUDART, CUDA Driver Version = 9.1, CUDA Runtime Version = 9.1, NumDevs = 1

Result = PASS

--------------------

To do: Create my signature with system and expected eGPU configuration information to give context to my posts. I have no builds.

.

ReplyQuote
Maximilian M
(@maximilian_m)
New Member
Joined: 2 years ago
 

The github for the ncclAllReduce issue is not availabe. Any ideas ?

To do: Create my signature with system and expected eGPU configuration information to give context to my posts. I have no builds.

.

ReplyQuote
ricc
 ricc
(@ricc)
Eminent Member
Joined: 3 years ago
 

@maximilian_m

Hello, sorry for being so late.

I uploaded the file here:

https://github.com/antoniopioricciardi/Tensorflow-MacOS-10.13.6-eGPU

Moreover, I made some little changes to the guide, you can check it here:

https://gist.github.com/antoniopioricciardi/240921b16e32dcc67a779e11dfaade1d

This post was modified 2 years ago

2014 Macbook Pro 15" Iris Pro /w Aorus Gaming Box GTX 1070


ReplyQuote
ricc
 ricc
(@ricc)
Eminent Member
Joined: 3 years ago
 

@myegpu

By googling a bit I noticed it could be because some mix of numpy versions.
Try upgrading your pip, then uninstall numpy with 

pip uninstall numpy

Then install it with :

pip install -U numpy

2014 Macbook Pro 15" Iris Pro /w Aorus Gaming Box GTX 1070


ReplyQuote
marquefilips
(@marquefilips)
Active Member
Joined: 2 years ago
 

yeah, sorry about running 2.7, I've started again from scratch and cant' get it working, this is the error. 

Python 3.6.4 (v3.6.4:d48ecebad5, Dec 18 2017, 21:07:28)

[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin

Type "help", "copyright", "credits" or "license" for more information.

>>> import tensorflow as tf

Traceback (most recent call last):

File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/tensorflow/python/pywrap_tensorflow.py", line 41, in <module>

from tensorflow.python.pywrap_tensorflow_internal import *

File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/tensorflow/python/pywrap_tensorflow_internal.py", line 28, in <module>

_pywrap_tensorflow_internal = swig_import_helper()

File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/tensorflow/python/pywrap_tensorflow_internal.py", line 24, in swig_import_helper

_mod = imp.load_module('_pywrap_tensorflow_internal', fp, pathname, description)

File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/imp.py", line 243, in load_module

return load_dynamic(name, filename, file)

File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/imp.py", line 343, in load_dynamic

return _load(spec)

ImportError: dlopen(/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/tensorflow/python/_pywrap_tensorflow_internal.so, 10): Library not loaded: @rpath/libcublas.8.0.dylib

Referenced from: /Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/tensorflow/python/_pywrap_tensorflow_internal.so

Reason: image not found

During handling of the above exception, another exception occurred:

Traceback (most recent call last):

File "<stdin>", line 1, in <module>

File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/tensorflow/__init__.py", line 24, in <module>

from tensorflow.python import *

File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/tensorflow/python/__init__.py", line 51, in <module>

from tensorflow.python import pywrap_tensorflow

File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/tensorflow/python/pywrap_tensorflow.py", line 52, in <module>

raise ImportError(msg)

ImportError: Traceback (most recent call last):

File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/tensorflow/python/pywrap_tensorflow.py", line 41, in <module>

from tensorflow.python.pywrap_tensorflow_internal import *

File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/tensorflow/python/pywrap_tensorflow_internal.py", line 28, in <module>

_pywrap_tensorflow_internal = swig_import_helper()

File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/tensorflow/python/pywrap_tensorflow_internal.py", line 24, in swig_import_helper

_mod = imp.load_module('_pywrap_tensorflow_internal', fp, pathname, description)

File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/imp.py", line 243, in load_module

return load_dynamic(name, filename, file)

File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/imp.py", line 343, in load_dynamic

return _load(spec)

ImportError: dlopen(/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/tensorflow/python/_pywrap_tensorflow_internal.so, 10): Library not loaded: @rpath/libcublas.8.0.dylib

Referenced from: /Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/tensorflow/python/_pywrap_tensorflow_internal.so

Reason: image not found

Failed to load the native TensorFlow runtime.

See  https://www.tensorflow.org/install/install_sources#common_installation_problems 

2012 MBP15" 10.13.6, Razer X Core, NVIDIA GTX 1080, (internal Intel HD 4000/Nvidia), Nvidia 387.10.10.10.40.105, Cuda 387.130, TF 1.5 AND 2017 MBP15” 10.13.6 Razer X Core, NVidia GTX and Nvidia GTX GeForce Titan Black (when it’s not misbehaving).


ReplyQuote
marquefilips
(@marquefilips)
Active Member
Joined: 2 years ago
 

So I used the commands from this tutorial and finally got tensorflow building, ugh.  https://segmentfault.com/a/1190000015807229 - now I am going to document and script everything for the next person, this was horrible.

2012 MBP15" 10.13.6, Razer X Core, NVIDIA GTX 1080, (internal Intel HD 4000/Nvidia), Nvidia 387.10.10.10.40.105, Cuda 387.130, TF 1.5 AND 2017 MBP15” 10.13.6 Razer X Core, NVidia GTX and Nvidia GTX GeForce Titan Black (when it’s not misbehaving).


ricc liked
ReplyQuote
myegpu
(@myegpu)
New Member
Joined: 2 years ago
 

Thanks Ricc!

I finally got it to work. I had to do "ln -s" libcudart9.1, libcurand.9.1, libcufft.9.1 and libcublas.9.1.1 to their corresponding 8.0 versions. Also libcudnn.7 to its corresponding .5 version. Then I uninstalled and installed numpy. I'm just happy it works now!

I wonder why "conda install tensorflow-gpu" doesn't work. It returns PackagesNotFoundError. It'd be a lot easier if this would just work like in Windows or Ubuntu.

To do: Create my signature with system and expected eGPU configuration information to give context to my posts. I have no builds.

.

ReplyQuote
Tony Zhang
(@tony_zhang)
New Member
Joined: 3 years ago
 

Thanks for the tutorial! I am just wondering if it's possible to use apply this on tensorflow 1.11? I am also a newbee of tensorflow. Is there any benefits from going 1.8 to 1.11?

Macbook Pro 2016 15' + Akitio Node + GTX1060 System: Mac OS 10.13.6, Win10


ReplyQuote
ricc
 ricc
(@ricc)
Eminent Member
Joined: 3 years ago
 

Nice! It would be very appreciated

2014 Macbook Pro 15" Iris Pro /w Aorus Gaming Box GTX 1070


ReplyQuote
ricc
 ricc
(@ricc)
Eminent Member
Joined: 3 years ago
 

@marquefilips Nice! It would be very appreciated.

@myegpu Probably because there's no official GPU version for tensorflow on MacOS (sadly).

@tony_zhang I don't know, it would be necessary to check the required version of CUDA and other libraries first. Then, see if there's an already compiled version of it (otherwise it needs to be compiled). After my exams - just another week  Roll - I'll search for it and let you know! 
This post was modified 2 years ago

2014 Macbook Pro 15" Iris Pro /w Aorus Gaming Box GTX 1070


ReplyQuote
 of  3