title: Process finished with exit code -1073741571 (0xC00000FD) Tensorflow
body: <p>I know this question gets asked a lot but in my case it's a bit wierd. I just got a RTX 3080 and tried to install Tensorflow based on a tutorial I found on <a href="https://www.reddit.com/r/tensorflow/comments/jsalkw/rtx_3090_and_tensorflow_for_windows_10_step_by/" rel="nofollow noreferrer">reddit</a>. I did everything as described there:
  Install Anaconda --&gt; Python 3.8 --&gt; TF-nightly v. 2.5.0 --&gt; Visual Studio C++ --&gt; Cuda 11.1.0 --&gt; cuDNN 8.0.4 --&gt; add path --&gt; restart pc. Everything seems to work at first. I tried following command:</p>
  <pre><code>import tensorflow as tf
  tf.config.list_physical_devices()
  </code></pre>
  <p>This works without any errors as you can see in the output:</p>
  <pre><code>C:\Users\loose\.conda\envs\tf2\python.exe C:/Users/loose/PycharmProjects/GenerateAutomatedEMail/python/test.py
  2021-01-16 00:40:45.043205: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library cudart64_110.dll
  2021-01-16 00:40:46.676446: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library nvcuda.dll
  2021-01-16 00:40:46.699117: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1760] Found device 0 with properties: 
  pciBusID: 0000:2d:00.0 name: GeForce RTX 3080 computeCapability: 8.6
  coreClock: 1.785GHz coreCount: 68 deviceMemorySize: 10.00GiB deviceMemoryBandwidth: 707.88GiB/s
  2021-01-16 00:40:46.699285: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library cudart64_110.dll
  2021-01-16 00:40:46.713523: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library cublas64_11.dll
  2021-01-16 00:40:46.713626: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library cublasLt64_11.dll
  2021-01-16 00:40:46.717017: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library cufft64_10.dll
  2021-01-16 00:40:46.718013: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library curand64_10.dll
  2021-01-16 00:40:46.725508: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library cusolver64_10.dll
  2021-01-16 00:40:46.728010: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library cusparse64_11.dll
  2021-01-16 00:40:46.728534: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library cudnn64_8.dll
  2021-01-16 00:40:46.728660: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1898] Adding visible gpu devices: 0
  
  Process finished with exit code 0
  </code></pre>
  <p>I currently try to train the Seq2Seq model from the <a href="https://www.tensorflow.org/tutorials/text/nmt_with_attention" rel="nofollow noreferrer">TF tutorials</a>. The code is pretty much exactly the same but I use PyCharm instead of Jupyter and I put everything in a class but the code itself is identical. My complete code is availabe in <a href="https://github.com/Daniel-Fauland/GenerateAutomatedEMail/tree/test" rel="nofollow noreferrer">GitHub</a>. When I want to train the model I get the error <em>&quot;Process finished with exit code -1073741571 (0xC00000FD)&quot;</em>. But there is no real error shown the program just finishes with this exit code:</p>
  <pre><code>C:\Users\loose\.conda\envs\tf2\python.exe C:/Users/loose/PycharmProjects/GenerateAutomatedEMail/python/train_model.py
  2021-01-16 00:50:34.337791: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library cudart64_110.dll
  2021-01-16 00:50:36.873698: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library nvcuda.dll
  2021-01-16 00:50:36.894834: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1760] Found device 0 with properties: 
  pciBusID: 0000:2d:00.0 name: GeForce RTX 3080 computeCapability: 8.6
  coreClock: 1.785GHz coreCount: 68 deviceMemorySize: 10.00GiB deviceMemoryBandwidth: 707.88GiB/s
  2021-01-16 00:50:36.895004: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library cudart64_110.dll
  2021-01-16 00:50:36.909453: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library cublas64_11.dll
  2021-01-16 00:50:36.909542: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library cublasLt64_11.dll
  2021-01-16 00:50:36.912954: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library cufft64_10.dll
  2021-01-16 00:50:36.914024: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library curand64_10.dll
  2021-01-16 00:50:36.921476: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library cusolver64_10.dll
  2021-01-16 00:50:36.924059: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library cusparse64_11.dll
  2021-01-16 00:50:36.924660: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library cudnn64_8.dll
  2021-01-16 00:50:36.924807: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1898] Adding visible gpu devices: 0
  2021-01-16 00:50:36.925280: I tensorflow/core/platform/cpu_feature_guard.cc:142] This TensorFlow binary is optimized with oneAPI Deep Neural Network Library (oneDNN) to use the following CPU instructions in performance-critical operations:  AVX2
  To enable them in other operations, rebuild TensorFlow with the appropriate compiler flags.
  2021-01-16 00:50:36.926213: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1760] Found device 0 with properties: 
  pciBusID: 0000:2d:00.0 name: GeForce RTX 3080 computeCapability: 8.6
  coreClock: 1.785GHz coreCount: 68 deviceMemorySize: 10.00GiB deviceMemoryBandwidth: 707.88GiB/s
  2021-01-16 00:50:36.926418: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1898] Adding visible gpu devices: 0
  2021-01-16 00:50:37.388811: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1300] Device interconnect StreamExecutor with strength 1 edge matrix:
  2021-01-16 00:50:37.388901: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1306]      0 
  2021-01-16 00:50:37.388947: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1319] 0:   N 
  2021-01-16 00:50:37.389134: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1446] Created TensorFlow device (/job:localhost/replica:0/task:0/device:GPU:0 with 7447 MB memory) -&gt; physical GPU (device: 0, name: GeForce RTX 3080, pci bus id: 0000:2d:00.0, compute capability: 8.6)
  2021-01-16 00:50:38.006971: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library cudnn64_8.dll
  2021-01-16 00:50:38.586194: I tensorflow/stream_executor/cuda/cuda_dnn.cc:334] Loaded cuDNN version 8004
  2021-01-16 00:50:38.709516: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library cublas64_11.dll
  2021-01-16 00:50:39.312210: I tensorflow/stream_executor/platform/default/dso_loader.cc:49] Successfully opened dynamic library cublasLt64_11.dll
  2021-01-16 00:50:39.313013: I tensorflow/stream_executor/cuda/cuda_bl
  
  as.cc:1838] TensorFloat-32 will be used for the matrix multiplication. This will only be logged once.
  
  Process finished with exit code -1073741571 (0xC00000FD)
  </code></pre>
  <p>So I tried to locate the line when the program crashes. I found out the it crashes as soon as I initialize the &quot;BahdanauAttention&quot; class as shown in this <a href="https://i.imgur.com/rRpl2WM.png" rel="nofollow noreferrer">picture</a>.</p>
  <p><strong>After testing for several hours I can assume/confirm a few things:</strong></p>
  <ul>
  <li>I can run normal (non tensorflow) code just fine without this error in this venv</li>
  <li>I do not run out of ram (only 17GB of 32GB ram in use at most)</li>
  <li>I don't have any programs open that may cause conflicts (like NVIDIA Broadcast or Jupyter Lab, etc.)</li>
  </ul>
  <p><strong>Things I tested to fix the issue:</strong></p>
  <ul>
  <li>Reinstall Conda</li>
  <li>Create new venv</li>
  <li>Reinstall TF as well as all NVIVIDA drivers</li>
  <li>Try a different Python version (3.7 instead of 3.8)</li>
  <li>Restarte my pc</li>
  </ul>
  <p>I'm sorta out of options at this point. Does anyone have an idea how this problem could be fixed?</p>