Help with CUDA install on OS 10.13

Hello,

I’m fairly new to CUDA, and been learning a lot on my own and reading what I can find online. My latest attempt has been to follow this blog post to the letter:

However, when I try to run deviceQuery, I get the error:

cudaGetDeviceCount returned 35
→ CUDA driver version is insufficient for CUDA runtime version
Result = FAIL

If you can help point me in the right direction, I’d appreciate any help. Here is what I believe is the relevant information:

  1. I am running OS 10.13 on an iMac 21.5 inch late 2012
  2. I have an NVIDIA GEFORCE GT 640M 512 MB
  3. As per the blog post, I’m using Xcode command line 8.3.3, Bazel 0.9.0, CUDA 9.1, cuDNN 7.0.4, python3
  4. I saw another post ask about the following, so here is some output:
    kextstat | grep NVDA
    136 2 0xffffff7f8333c000 0x2e6000 0x2e6000 com.apple.nvidia.driver.NVDAResman (10.2.8) 39AC3832-2295-3B7B-85F6-F69D66D46EC7 <122 98 94 12 7 5 4 3 1>
    137 0 0xffffff7f83622000 0x1b3000 0x1b3000 com.apple.nvidia.driver.NVDAGK100Hal (10.2.8) 7064CB37-CB6D-34F7-974D-DD12944BD354 <136 12 4 3>
    ➜ ~ kextstat | grep -i cuda
    176 0 0xffffff7f824ea000 0x2000 0x2000 com.nvidia.CUDA (1.1.0) 4329B052-6C8A-3900-8E83-744487AEDEF1 <4 1>
    ➜ ~

Thank you.