Unfortunately, the list of CUDA-enabled GPU cards does not include the 940MX.
The 940MX has the same 5.0 compute capability as the 940M listed under Geforce products on https://developer.nvidia.com/cuda-gpus. It is technically supported by TensorFlow. That said, this mobile GPU has a small memory buffer and will not be able to run many deep learning models. It’s performance is also not comparable to recent Desktop GPUs. For example, it has more than 11x fewer CUDA cores than an RTX 2070Ti.