What CUDA/CUDNN versions are compatible with GTX860M?

I’m unsure whether I can use CUDA 10.0 on GTX860M, if not, this means I cannot use TF 2.0. Recently I encountered this error, which was not present while I use the CPU version of TF 2.0

2019-12-12 15:42:27.272181: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library cudart64_100.dll
2019-12-12 15:44:02.738014: I tensorflow/stream_executor/platform/default/dso_loader.cc:44] Successfully opened dynamic library nvcuda.dll
2019-12-12 15:44:03.021713: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1618] Found device 0 with properties: 
name: GeForce GTX 860M major: 5 minor: 0 memoryClockRate(GHz): 1.0195
pciBusID: 0000:01:00.0
2019-12-12 15:44:03.022991: I tensorflow/stream_executor/platform/default/dlopen_checker_stub.cc:25] GPU libraries are statically linked, skip dlopen check.
2019-12-12 15:44:03.026364: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1746] Adding visible gpu devices: 0
2019-12-12 15:44:03.034081: I tensorflow/core/platform/cpu_feature_guard.cc:142] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX AVX2
2019-12-12 15:44:03.046229: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1618] Found device 0 with properties: 
name: GeForce GTX 860M major: 5 minor: 0 memoryClockRate(GHz): 1.0195
pciBusID: 0000:01:00.0
2019-12-12 15:44:03.047017: I tensorflow/stream_executor/platform/default/dlopen_checker_stub.cc:25] GPU libraries are statically linked, skip dlopen check.
2019-12-12 15:44:03.049190: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1746] Adding visible gpu devices: 0
2019-12-12 15:44:08.408388: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1159] Device interconnect StreamExecutor with strength 1 edge matrix:
2019-12-12 15:44:08.408802: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1165]      0 
2019-12-12 15:44:08.409050: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1178] 0:   N 
2019-12-12 15:44:08.415573: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1304] Created TensorFlow device (/job:localhost/replica:0/task:0/device:GPU:0 with 1376 MB memory) -> physical GPU (device: 0, name: GeForce GTX 860M, pci bus id: 0000:01:00.0, compute capability: 5.0)
2019-12-12 15:44:15.865016: W tensorflow/core/framework/op_kernel.cc:1622] OP_REQUIRES failed at resource_variable_ops.cc:703 : Resource exhausted: OOM when allocating tensor with shape[39015,100,300] and type float on /job:localhost/replica:0/task:0/device:CPU:0 by allocator cpu

I wonder why this allocation happened on CPU rather than GPU.

*when I used the CPU version of TF 2.0

You can use CUDA 10 (or really any recent version of CUDA 8.x, 9.x, 10.x) with that GPU.
The GPU output from TF looks normal.
I wouldn’t be able to explain why that particular allocation is failing, but that is a function of your TF script, not any problem with CUDA support on your GPU that I can see.