简体   繁体   中英

Tensorflow import is very slow because it's looking for "cudart64_110.dll". I don't have a gpu. Is there a cpu-only version?

When I run a script that imports tensorflow (2.8) it spend 10+ seconds printing the message below before running my script. I don't have a gpu.

From what I can find on here, v2 upwards combines cpu/gpu versions. Is it possible to stop the gpu check?

2022-02-04 10:15:46.628917: W tensorflow/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library 'cudart64_110.dll'; dlerror: cudart64_110.dll not found
2022-02-04 10:15:47.068570: I tensorflow/stream_executor/cuda/cudart_stub.cc:29] Ignore above cudart dlerror if you do not have a GPU set up on your machine.

Yes, You can surpass these warnings (W) or informational (I) messages using below code:

import os
os.environ['TF_CPP_MIN_LOG_LEVEL'] = '2'

You can also check this link for more details on TensorFlow installation.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM