Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"found 0 compatible adapters" after following setup instructions #27

Closed
arnabanerji opened this issue Jun 28, 2020 · 2 comments
Closed

Comments

@arnabanerji
Copy link

I did my best to follow the instructions at https://docs.microsoft.com/en-us/windows/win32/direct3d12/gpu-tensorflow-wsl. I already had a WSL 1 installation of Ubuntu, so in order, I:

  1. Installed the NVIDIA preview drivers
  2. Set my WSL to default to WSL 2
  3. Reset my Ubuntu installation
  4. Installed the nvidia-cuda-toolkit package

Successfully ran the deviceQuery sample to get this output:

./deviceQuery Starting...

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

Detected 1 CUDA Capable device(s)

Device 0: "GeForce RTX 2070 SUPER"
  CUDA Driver Version / Runtime Version          11.1 / 10.1
  CUDA Capability Major/Minor version number:    7.5
  Total amount of global memory:                 8192 MBytes (8589934592 bytes)
  (40) Multiprocessors, ( 64) CUDA Cores/MP:     2560 CUDA Cores
  GPU Max Clock rate:                            1815 MHz (1.81 GHz)
  Memory Clock rate:                             7001 Mhz
  Memory Bus Width:                              256-bit
  L2 Cache Size:                                 4194304 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 shared memory per multiprocessor:        65536 bytes
  Total number of registers available per block: 65536
  Warp size:                                     32
  Maximum number of threads per multiprocessor:  1024
  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 6 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
  Device supports Managed Memory:                Yes
  Device supports Compute Preemption:            Yes
  Supports Cooperative Kernel Launch:            Yes
  Supports MultiDevice Co-op Kernel Launch:      Yes
  Device PCI Domain ID / Bus ID / location ID:   0 / 1 / 0
  Compute Mode:
     < Default (multiple host threads can use ::cudaSetDevice() with device simultaneously) >

deviceQuery, CUDA Driver = CUDART, CUDA Driver Version = 11.1, CUDA Runtime Version = 10.1, NumDevs = 1
Result = PASS

However, now if I try to verify that TF/DirectML is picking up my GPU, I get:

Python 3.6.10 |Anaconda, Inc.| (default, May  8 2020, 02:54:21) 
[GCC 7.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import tensorflow.compat.v1 as tf
>>> tf.enable_eager_execution9tf.ConfigProto(log_device_placement=True))
  File "<stdin>", line 1
    tf.enable_eager_execution9tf.ConfigProto(log_device_placement=True))
                                                                       ^
SyntaxError: invalid syntax
>>> tf.enable_eager_execution(tf.ConfigProto(log_device_placement=True))
>>> print(tf.add([1.0, 2.0], [3.0, 4.0])
... )
2020-06-28 02:54:53.570206: I tensorflow/core/common_runtime/dml/dml_device_factory.cc:45] DirectML device enumeration: found 0 compatible adapters.
2020-06-28 02:54:53.572666: I tensorflow/core/common_runtime/eager/execute.cc:571] Executing op Add in device /job:localhost/replica:0/task:0/device:CPU:0
tf.Tensor([4. 6.], shape=(2,), dtype=float32)

I don't know if I should have done things in a different order, given that I already had WSL up and running. But if I can do things differently, I'd love to know. So far, it looks like only the most preliminary of guides are up.

@PatriceVignola
Copy link
Contributor

Hi @arnabanerji . Your question looks similar to #18. In summary, Nvidia doesn't have a WSL driver for DirectX yet, so you cannot use the tensorflow-directml package on WSL with Nvidia graphics at the moment. You can however try it out on Windows. In the page that you linked, the "Nvidia" section will be updated once they release a preview driver for DirectX on WSL. Keep an eye out for it!

@arnabanerji
Copy link
Author

Hey @PatriceVignola, thanks for your answer! That's definitely the problem. I guess in my head I figured the new NVIDIA driver release meant everything should work and I assumed the DirectML page was just out of date relative to the announcement. I'm very excited for DirectML to work though, it looks like it makes life really simple for everyone.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants