[TEST] Tensorflow 2.4.0-rc0 on RTX 3000 series (3070/3080/3090)

Tensorflow on RTX 3000 series (RTX 3070, RTX 3080, RTX 3090)

빌드 환경 (Build environment)

OS: Windows 10 Education (Build 19042.608)
Architecture: x86_64 (amd64)
Git branch: v2.4.0-rc0
Python: 3.7 (anaconda)
Target CUDA and CUDNN: CUDA 11.1 Update 1, CUDNN v8.0.5 (Novemvber 9th, 2020) (requires login)
Target arch: CC 8.6, 6.1 → Must be also usable on GTX 1000 series!
Numpy: 1.19.4 (Must be manually reinstalled back to version 1.19.3 before using!)

사용법 (Usage)

  1. Requirements: CUDA 11.1 Update 1, CUDNN v8.0.5 (Novemvber 9th, 2020) (requires login)
  2. Download tensorflow-2.4.0rc0-cp37-cp37m-win_amd64.whl
  3. Install within CMD or Powershell cmdline (where pip3 is available)
  4. Install tensorflow : pip install tensorflow-2.4.0rc0-cp37-cp37m-win_amd64.whl
  5. (Optional) Install additional requirements
  6. (Required) Roll back numpy version to 1.19.3: pip install numpy==1.19.3
  7. (Maybe optional) cupti library filename mismatch – add “C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.1\extras\CUPTI\lib64” to PATH and copy “cupti64_2020.2.1.dll” to “cupti64.dll” or “cupti.dll”.

제한 사항 (Restriction, To-Dos)

  • Higher GPU usage might be restricted – use those code to resolve SOME of those problems:
# Memory Pre-configuration
config = tf.compat.v1.ConfigProto(
    gpu_options=tf.compat.v1.GPUOptions(
        per_process_gpu_memory_fraction=0.8,
        allow_growth = True
    )
    # device_count = {'GPU': 1}
)
session = tf.compat.v1.Session(config=config)
tf.compat.v1.keras.backend.set_session(session)
  • Closing application while tensorflow library loads always failes – might be a buggy codes?
  • another unknown restriction would exist – this is a test build for my own use, so use with care! I will edit this article when tensorflow officially supports RTX3000 series (or tested).

“[TEST] Tensorflow 2.4.0-rc0 on RTX 3000 series (3070/3080/3090)”에 대한 9개의 댓글

  1. 안녕하세요
    안녕하세요

    안녕하세요,
    올려두신 글 보며, 설치 진행했는데, .dll 파일들을 못찾는다는 에러가 떴습니다.. path 설정도 알려주신대로 추가했는데 이름을 아무렇게나 했거든요.. 그게 문제가 될까요? 오류코드 한번 확인 부탁 드립니다 ㅠㅠ

    OS: Windows 10 Pro
    Architecture: x86_64
    Python: 3.7 (anaconda)
    Target CUDA and CUDNN: CUDA 11.1 Update 1, CUDNN v8.0.5 (Novemvber 9th, 2020)
    Numpy: 1.19.3
    GPU : RTX 3080

    2020-11-25 00:56:07.186697: W tensorflow/stream_executor/platform/default/dso_loader.cc:60] Could not load dynamic library ‘cudart64_110.dll’; dlerror: cudart64_110.dll not found
    2020-11-25 00:56:07.187205: W tensorflow/stream_executor/platform/default/dso_loader.cc:60] Could not load dynamic library ‘cublas64_11.dll’; dlerror: cublas64_11.dll not found
    2020-11-25 00:56:07.187706: W tensorflow/stream_executor/platform/default/dso_loader.cc:60] Could not load dynamic library ‘cublasLt64_11.dll’; dlerror: cublasLt64_11.dll not found
    2020-11-25 00:56:07.188212: W tensorflow/stream_executor/platform/default/dso_loader.cc:60] Could not load dynamic library ‘cufft64_10.dll’; dlerror: cufft64_10.dll not found
    2020-11-25 00:56:07.188716: W tensorflow/stream_executor/platform/default/dso_loader.cc:60] Could not load dynamic library ‘curand64_10.dll’; dlerror: curand64_10.dll not found
    2020-11-25 00:56:07.189176: W tensorflow/stream_executor/platform/default/dso_loader.cc:60] Could not load dynamic library ‘cusolver64_11.dll’; dlerror: cusolver64_11.dll not found
    2020-11-25 00:56:07.189676: W tensorflow/stream_executor/platform/default/dso_loader.cc:60] Could not load dynamic library ‘cusparse64_11.dll’; dlerror: cusparse64_11.dll not found
    2020-11-25 00:56:07.190135: W tensorflow/stream_executor/platform/default/dso_loader.cc:60] Could not load dynamic library ‘cudnn64_8.dll’; dlerror: cudnn64_8.dll not found
    2020-11-25 00:56:07.190229: W tensorflow/core/common_runtime/gpu/gpu_device.cc:1757] Cannot dlopen some GPU libraries. Please make sure the missing libraries mentioned above are installed properly if you would like to use GPU. Follow the guide at https://www.tensorflow.org/install/gpu for how to download and setup the required libraries for your platform.

    1. 기존 PATH에 아래 Entry를 추가해보세요. CUDA 설치 위치에 따라 달라집니다. 아래 Entry는 CUDA 설치시에 자동으로 추가되는데, 어떤 이유로 인해서 없어진게 아닌가 해요.

      C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.1\bin

      또한, PyCharm과 같은 IDE는 PATH 변경 후 재시작해주어야 적용됩니다. 되도록이면 시스템 재시작이 효과가 좋아요.

  2. 질문 있습니다. 현재 RTX 3080의 GPU 가동을 위해 세팅 중인데요. 잘 안되네요. ㅠㅠ 찾아보다가 여기서 해결해보려고 하고 있습니다.

    사용법 과정에서 아나콘다 프롬프트 실행 후
    pip install tensorflow-2.4.0rc0-cp37-cp37m-win_amd64.whl
    입력했는데, 아래와 같이 에러가 나왔습니다. 해결방법 좀 알려주세요.

    ERROR: tensorflow-2.4.0rc0-cp37-cp37m-win_amd64.whl is not a supported wheel on this platform.

    P.S. 또한 기존에 돌리던 파이썬 패키지들도 RTX 3080의 GPU 인식이 안되어, CPU로 돌리고 있는데 혹시 좋은 방법 알려주시면 대단히 감사하겠습니다. ㅠㅠ

    1. Q. 사용법 과정에서 아나콘다 프롬프트 실행 후
      pip install tensorflow-2.4.0rc0-cp37-cp37m-win_amd64.whl
      입력했는데, 아래와 같이 에러가 나왔습니다. 해결방법 좀 알려주세요.

      A. 오류에서 플랫폼에 대한 언급이 있었네요. 제가 빌드할 때 사용했던 환경은 64bit Windows 10이었습니다. 혹시 사용하시는 시스템이 Linux이시면, 직접 Tensorflow를 빌드하시거나 다른 버전을 사용하실수밖에 없을것 같아요…

      Q. 또한 기존에 돌리던 파이썬 패키지들도 RTX 3080의 GPU 인식이 안되어, CPU로 돌리고 있는데 혹시 좋은 방법 알려주시면 대단히 감사하겠습니다. ㅠㅠ

      A. PyTorch의 경우 nightly 버전에서 RTX 3070 위에서 돌아가는 것으로 알고 있습니다. 다만 다른 패키지들의 경우 시도해보지는 않았구요, 직접 해당 패키지를 소스부터 빌드하시거나 간단히 해당 패키지의 Nightly 버전을 사용해보시는게 당장으로서는 최선일것 같네요.. 파이팅입니다ㅠㅠㅠ

  3. 안녕하세요~
    3090, 텐서플로우로 mrcnn 돌리다가 약간 문제가 있는 것 같아서 질문드립니다. 일단 현재 환경세팅은 아래와 같습니다.

    [환경 세팅]
    Windows 10
    Python 3.8.5
    Anaconda3-2020.11-Windows-x86_64
    CUDA_11.0.3_451.82_win10
    cudnn-11.0-windows-x64-v8.0.4.30
    tensorflow-gpu 2.4.1 (stable)

    gpu를 찾는데는 문제 없음. 학습시에도 gpu를 사용하는 것은 확인했습니다.
    사용률이 너무 낮다는 문제점이 있는거 같은데, 혹시 무엇을 바꿔봐야할지 조언주시면 감사하겠습니다!

    [문제점]
    문제점 1. 작업관리자 사용률(gpu.util, 3D)이 1% 이하입니다. Cuda 점유율을 보면 0-24%를 반복적으로 fluctuate합니다.
    문제점 2. 전용 GPU는 23.3/24.0GB를 쓰는데, 공유 GPU는 0.4로 거의 사용하지 않습니다.

    1. 안녕히세요.

      Mask R-CNN의 구현체를 정확히는 알지 못해서, 큰 도음은 드리지 못할것 같습니다.
      다만, CUDA 점유율이 낮다는 문제는 dataloader나 augmentation 부분에서 bottleneck이 생길 확률이 크다고 생각됩니다.

      혹시나, augmentation이 모두 완료된 1-batch에 대해서만 몇 epoch간 반복 학습을 해보실 수 있다면 한번 시도해보시고, 그 결과로 GPU 사용량이 90% 넘게 유지되면 확실히 병목 현상일 것이라 생각해볼 수 있겠습니다. 다만, 그렇지 않다면 모델 구조상의 문제일 것이라 생각합니다.

답글 남기기

이메일 주소는 공개되지 않습니다. 필수 필드는 *로 표시됩니다