Skip to main content

Auto selector for GPU and CUDA, support the detection of tensorflow or torch

Project description

介绍

  • 可以自动检测 torch 和 tensorflow 版本, 并自动设置环境变量相应的 cuda, 同时自动选择占用显存最低的显卡运行.
  • 可以实现自动后台运行运行并记录和查看日志/中止程序.
  • 需要在 anaconda 环境下使用.

安装

pip install tsc-auto

使用方式

  • 查看帮助: ta --help
  • 自动选择最低显存占用显卡跑 torch 的 cnn.py 程序: ta -p -a cnn.py
  • 手动选择编号0和1的显卡跑 tensorflow 的 cnn.py 程序: ta -t -d 0,1 -a cnn.py

cuda的位置默认在用户主目录 (可以使用 ln -s 软链接)

  • ...
  • ~/cuda/8.0
  • ...
  • ~/cuda/11.3
  • ...

下载处理好的cuda

如果自行安装 cuda 和 cudnn, 需要处理的方式

  • cd ~/cuda
  • mv /usr/local/cuda-11.0/ 11.0
  • cp cudnn-v8.2.0.53/include/cudnn.h 11.0/include/
  • cp cudnn-v8.2.0.53/lib64/libcudnn* 11.0/lib64
  • chmod a+r 11.0/include/cudnn.h 11.0/lib64/libcudnn*

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tsc-auto-0.8.1.tar.gz (26.8 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page