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.6.2.tar.gz (22.1 kB view details)

Uploaded Source

File details

Details for the file tsc-auto-0.6.2.tar.gz.

File metadata

  • Download URL: tsc-auto-0.6.2.tar.gz
  • Upload date:
  • Size: 22.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.0 importlib_metadata/4.8.1 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7

File hashes

Hashes for tsc-auto-0.6.2.tar.gz
Algorithm Hash digest
SHA256 1605f73d5eb0d46b82df309d960d072014192465ef71826d08d2ce6015fb6521
MD5 21931177da30ea01322fd98744e68c94
BLAKE2b-256 c2fe9c92c6982c5778b6260f691f709e8bd72277de118f4b8a57162547b367fb

See more details on using hashes here.

Supported by

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