[LibTorch & Win] 各版本 LibTorch 下载

本文详细介绍了Libtorch不同版本与CUDA的兼容性问题,强调新版本可能无法在旧CUDA环境下运行,而旧版本可以在新环境中使用。提供了从1.0.0到1.10.0各个版本的CPU和CUDA版本的下载链接,包括Release和Debug版本,帮助开发者选择合适的Libtorch库。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

值得一提的是:

  • 以下全为 Win 版本Linux 版本点击 这里
  • 所有版本都是已经编译好的,解压后就可以使用
  • libtorch 的版本和 pytorch 是对应的,比如 libtorch 1.6.0 对应于 pytorch 1.6.0。
  • cuda 的兼容性问题
    • 新版本无法在旧机器上运行。比如 libtorch 1.6.0 的 cu102 版本无法在 cuda-9.0 的机器上运行(已实测)。
    • 旧版本可以在新机器上运行。 比如 libtorch 1.7.1 的 cu110 版本可以在 cuda-11.2 的机器上运行(已实测)。
  • libtorch 版本越高,速度越快
  • 目前 官网 上仅提供最新 1.10.0 版本

libtorch 1.0.0

release

# cpu
https://download.pytorch.org/libtorch/cpu/libtorch-win-shared-with-deps-1.0.0.zip
# cuda
https://download.pytorch.org/libtorch/cu80/libtorch-win-shared-with-deps-1.0.0.zip
https://download.pytorch.org/libtorch/cu90/libtorch-win-shared-with-deps-1.0.0.zip
https://download.pytorch.org/libtorch/cu100/libtorch-win-shared-with-deps-1.0.0.zip

debug (失效)

# cpu
https://download.pytorch.org/libtorch/cpu/libtorch-win-shared-with-deps-debug-1.0.0.zip
# cuda
https://download.pytorch.org/libtorch/cu80/libtorch-win-shared-with-deps-debug-1.0.0.zip
https://download.pytorch.org/libtorch/cu90/libtorch-win-shared-with-deps-debug-1.0.0.zip
https://download.pytorch.org/libtorch/cu100/libtorch-win-shared-with-deps-debug-1.0.0.zip

libtorch 1.0.1

release

# cpu
https://download.pytorch.org/libtorch/cpu/libtorch-win-shared-with-deps-1.0.1.zip
# cuda
https://download.pytorch.org/libtorch/cu80/libtorch-win-shared-with-deps-1.0.1.zip
https://download.pytorch.org/libtorch/cu90/libtorch-win-shared-with-deps-1.0.1.zip
https://download.pytorch.org/libtorch/cu100/libtorch-win-shared-with-deps-1.0.1.zip

debug (失效)

# cpu
https://download.pytorch.org/libtorch/cpu/libtorch-win-shared-with-deps-debug-1.0.1.zip
# cuda
https://download.pytorch.org/libtorch/cu80/libtorch-win-shared-with-deps-debug-1.0.1.zip
https://download.pytorch.org/libtorch/cu90/libtorch-win-shared-with-deps-debug-1.0.1.zip
https://download.pytorch.org/libtorch/cu100/libtorch-win-shared-with-deps-debug-1.0.1.zip

libtorch 1.1.0

release

# cpu
https://download.pytorch.org/libtorch/cpu/libtorch-win-shared-with-deps-1.1.0.zip
# cuda
https://download.pytorch.org/libtorch/cu90/libtorch-win-shared-with-deps-1.1.0.zip
https://download.pytorch.org/libtorch/cu100/libtorch-win-shared-with-deps-1.1.0.zip

debug

# cpu
https://download.pytorch.org/libtorch/cpu/libtorch-win-shared-with-deps-debug-1.1.0.zip
# cuda
https://download.pytorch.org/libtorch/cu90/libtorch-win-shared-with-deps-debug-1.1.0.zip
https://download.pytorch.org/libtorch/cu100/libtorch-win-shared-with-deps-debug-1.1.0.zip

libtorch 1.2.0

release

# cpu
https://download.pytorch.org/libtorch/cpu/libtorch-win-shared-with-deps-1.2.0.zip
# cuda
https://download.pytorch.org/libtorch/cu92/libtorch-win-shared-with-deps-1.2.0.zip
https://download.pytorch.org/libtorch/cu100/libtorch-win-shared-with-deps-1.2.0.zip

debug

# cpu
https://download.pytorch.org/libtorch/cpu/libtorch-win-shared-with-deps-debug-1.2.0.zip
# cuda
https://download.pytorch.org/libtorch/cu92/libtorch-win-shared-with-deps-debug-1.2.0.zip
https://download.pytorch.org/libtorch/cu100/libtorch-win-shared-with-deps-debug-1.2.0.zip

libtorch 1.3.0

release

# cpu
https://download.pytorch.org/libtorch/cpu/libtorch-win-shared-with-deps-1.3.0.zip
# cuda
https://download.pytorch.org/libtorch/cu92/libtorch-win-shared-with-deps-1.3.0.zip
https://download.pytorch.org/libtorch/cu101/libtorch-win-shared-with-deps-1.3.0.zip

debug

# cpu
https://download.pytorch.org/libtorch/cpu/libtorch-win-shared-with-deps-debug-1.3.0.zip
# cuda
https://download.pytorch.org/libtorch/cu92/libtorch-win-shared-with-deps-debug-1.3.0.zip
https://download.pytorch.org/libtorch/cu101/libtorch-win-shared-with-deps-debug-1.3.0.zip

libtorch 1.3.1

release

# cpu
https://download.pytorch.org/libtorch/cpu/libtorch-win-shared-with-deps-1.3.1.zip
# cuda
https://download.pytorch.org/libtorch/cu92/libtorch-win-shared-with-deps-1.3.1.zip
https://download.pytorch.org/libtorch/cu101/libtorch-win-shared-with-deps-1.3.1.zip

debug

# cpu
https://download.pytorch.org/libtorch/cpu/libtorch-win-shared-with-deps-debug-1.3.1.zip
# cuda
https://download.pytorch.org/libtorch/cu92/libtorch-win-shared-with-deps-debug-1.3.1.zip
https://download.pytorch.org/libtorch/cu101/libtorch-win-shared-with-deps-debug-1.3.1.zip

libtorch 1.4.0

release

# cpu
https://download.pytorch.org/libtorch/cpu/libtorch-win-shared-with-deps-1.4.0.zip
# cuda
https://download.pytorch.org/libtorch/cu92/libtorch-win-shared-with-deps-1.4.0.zip
https://download.pytorch.org/libtorch/cu101/libtorch-win-shared-with-deps-1.4.0.zip

debug

# cpu
https://download.pytorch.org/libtorch/cpu/libtorch-win-shared-with-deps-debug-1.4.0.zip
# cuda
https://download.pytorch.org/libtorch/cu92/libtorch-win-shared-with-deps-debug-1.4.0.zip
https://download.pytorch.org/libtorch/cu101/libtorch-win-shared-with-deps-debug-1.4.0.zip

libtorch 1.5.0

release

# cpu
https://download.pytorch.org/libtorch/cpu/libtorch-win-shared-with-deps-1.5.0%2Bcpu.zip
# cuda
https://download.pytorch.org/libtorch/cu92/libtorch-win-shared-with-deps-1.5.0%2Bcu92.zip
https://download.pytorch.org/libtorch/cu101/libtorch-win-shared-with-deps-1.5.0.zip
https://download.pytorch.org/libtorch/cu102/libtorch-win-shared-with-deps-1.5.0.zip

debug

# cpu
https://download.pytorch.org/libtorch/cpu/libtorch-win-shared-with-deps-debug-1.5.0%2Bcpu.zip
# cuda
https://download.pytorch.org/libtorch/cu92/libtorch-win-shared-with-deps-debug-1.5.0%2Bcu92.zip
https://download.pytorch.org/libtorch/cu101/libtorch-win-shared-with-deps-debug-1.5.0.zip
https://download.pytorch.org/libtorch/cu102/libtorch-win-shared-with-deps-debug-1.5.0.zip

libtorch 1.6.0

release

# cpu
https://download.pytorch.org/libtorch/cpu/libtorch-win-shared-with-deps-1.6.0%2Bcpu.zip
# cuda
https://download.pytorch.org/libtorch/cu101/libtorch-win-shared-with-deps-1.6.0%2Bcu101.zip
https://download.pytorch.org/libtorch/cu102/libtorch-win-shared-with-deps-1.6.0.zip

debug

# cpu
https://download.pytorch.org/libtorch/cpu/libtorch-win-shared-with-deps-debug-1.6.0%2Bcpu.zip
# cuda
https://download.pytorch.org/libtorch/cu101/libtorch-win-shared-with-deps-debug-1.6.0%2Bcu101.zip
https://download.pytorch.org/libtorch/cu102/libtorch-win-shared-with-deps-debug-1.6.0.zip

libtorch 1.7.0

release

# cpu
https://download.pytorch.org/libtorch/cpu/libtorch-win-shared-with-deps-1.7.0%2Bcpu.zip
# cuda
https://download.pytorch.org/libtorch/cu101/libtorch-win-shared-with-deps-1.7.0%2Bcu101.zip
https://download.pytorch.org/libtorch/cu102/libtorch-win-shared-with-deps-1.7.0.zip
https://download.pytorch.org/libtorch/cu110/libtorch-win-shared-with-deps-1.7.0%2Bcu110.zip

debug

# cpu
https://download.pytorch.org/libtorch/cpu/libtorch-win-shared-with-deps-debug-1.7.0%2Bcpu.zip
# cuda
https://download.pytorch.org/libtorch/cu101/libtorch-win-shared-with-deps-debug-1.7.0%2Bcu101.zip
https://download.pytorch.org/libtorch/cu102/libtorch-win-shared-with-deps-debug-1.7.0.zip
https://download.pytorch.org/libtorch/cu110/libtorch-win-shared-with-deps-debug-1.7.0%2Bcu110.zip

libtorch 1.7.1

release

# cpu
https://download.pytorch.org/libtorch/cpu/libtorch-win-shared-with-deps-1.7.1%2Bcpu.zip
# cuda
https://download.pytorch.org/libtorch/cu101/libtorch-win-shared-with-deps-1.7.1%2Bcu101.zip
https://download.pytorch.org/libtorch/cu102/libtorch-win-shared-with-deps-1.7.1.zip
https://download.pytorch.org/libtorch/cu110/libtorch-win-shared-with-deps-1.7.1%2Bcu110.zip

debug

# cpu
https://download.pytorch.org/libtorch/cpu/libtorch-win-shared-with-deps-debug-1.7.1%2Bcpu.zip
# cuda
https://download.pytorch.org/libtorch/cu101/libtorch-win-shared-with-deps-debug-1.7.1%2Bcu101.zip
https://download.pytorch.org/libtorch/cu102/libtorch-win-shared-with-deps-debug-1.7.1.zip
https://download.pytorch.org/libtorch/cu110/libtorch-win-shared-with-deps-debug-1.7.1%2Bcu110.zip

libtorch 1.8.0

release

# cpu
https://download.pytorch.org/libtorch/cpu/libtorch-win-shared-with-deps-1.8.0%2Bcpu.zip
# cuda
https://download.pytorch.org/libtorch/cu102/libtorch-win-shared-with-deps-1.8.0.zip
https://download.pytorch.org/libtorch/cu111/libtorch-win-shared-with-deps-1.8.0%2Bcu111.zip

debug

# cpu
https://download.pytorch.org/libtorch/cpu/libtorch-win-shared-with-deps-debug-1.8.0%2Bcpu.zip
# cuda
https://download.pytorch.org/libtorch/cu102/libtorch-win-shared-with-deps-debug-1.8.0.zip
https://download.pytorch.org/libtorch/cu111/libtorch-win-shared-with-deps-debug-1.8.0%2Bcu111.zip

libtorch 1.8.1

release

# cpu
https://download.pytorch.org/libtorch/cpu/libtorch-win-shared-with-deps-1.8.1%2Bcpu.zip
# cuda
https://download.pytorch.org/libtorch/cu102/libtorch-win-shared-with-deps-1.8.1%2Bcu102.zip
https://download.pytorch.org/libtorch/cu111/libtorch-win-shared-with-deps-1.8.1%2Bcu111.zip

debug

# cpu
https://download.pytorch.org/libtorch/cpu/libtorch-win-shared-with-deps-debug-1.8.1%2Bcpu.zip
# cuda
https://download.pytorch.org/libtorch/cu102/libtorch-win-shared-with-deps-debug-1.8.1%2Bcu102.zip
https://download.pytorch.org/libtorch/cu111/libtorch-win-shared-with-deps-debug-1.8.1%2Bcu111.zip

libtorch 1.8.2 (LTS)

release

# cpu
https://download.pytorch.org/libtorch/lts/1.8/cpu/libtorch-win-shared-with-deps-1.8.2%2Bcpu.zip
# cuda
https://download.pytorch.org/libtorch/lts/1.8/cu102/libtorch-win-shared-with-deps-1.8.2%2Bcu102.zip
https://download.pytorch.org/libtorch/lts/1.8/cu111/libtorch-win-shared-with-deps-1.8.2%2Bcu111.zip

debug

# cpu
https://download.pytorch.org/libtorch/lts/1.8/cpu/libtorch-win-shared-with-deps-debug-1.8.2%2Bcpu.zip
# cuda
https://download.pytorch.org/libtorch/lts/1.8/cu102/libtorch-win-shared-with-deps-debug-1.8.2%2Bcu102.zip
https://download.pytorch.org/libtorch/lts/1.8/cu111/libtorch-win-shared-with-deps-debug-1.8.2%2Bcu111.zip

libtorch 1.9.0

release

# cpu
https://download.pytorch.org/libtorch/cpu/libtorch-win-shared-with-deps-1.9.0%2Bcpu.zip
# cuda
https://download.pytorch.org/libtorch/cu102/libtorch-win-shared-with-deps-1.9.0%2Bcu102.zip
https://download.pytorch.org/libtorch/cu111/libtorch-win-shared-with-deps-1.9.0%2Bcu111.zip

debug

# cpu
https://download.pytorch.org/libtorch/cpu/libtorch-win-shared-with-deps-debug-1.9.0%2Bcpu.zip
# cuda
https://download.pytorch.org/libtorch/cu102/libtorch-win-shared-with-deps-debug-1.9.0%2Bcu102.zip
https://download.pytorch.org/libtorch/cu111/libtorch-win-shared-with-deps-debug-1.9.0%2Bcu111.zip

libtorch 1.9.1

release

# cpu
https://download.pytorch.org/libtorch/cpu/libtorch-win-shared-with-deps-1.9.1%2Bcpu.zip
# cuda
https://download.pytorch.org/libtorch/cu102/libtorch-win-shared-with-deps-1.9.1%2Bcu102.zip
https://download.pytorch.org/libtorch/cu111/libtorch-win-shared-with-deps-1.9.1%2Bcu111.zip

debug

# cpu
https://download.pytorch.org/libtorch/cpu/libtorch-win-shared-with-deps-debug-1.9.1%2Bcpu.zip
# cuda
https://download.pytorch.org/libtorch/cu102/libtorch-win-shared-with-deps-debug-1.9.1%2Bcu102.zip
https://download.pytorch.org/libtorch/cu111/libtorch-win-shared-with-deps-debug-1.9.1%2Bcu111.zip

libtorch 1.10.0

release

# cpu
https://download.pytorch.org/libtorch/cpu/libtorch-win-shared-with-deps-1.10.0%2Bcpu.zip
# cuda
https://download.pytorch.org/libtorch/cu102/libtorch-win-shared-with-deps-1.10.0%2Bcu102.zip
https://download.pytorch.org/libtorch/cu113/libtorch-win-shared-with-deps-1.10.0%2Bcu113.zip

debug

# cpu
https://download.pytorch.org/libtorch/cpu/libtorch-win-shared-with-deps-debug-1.10.0%2Bcpu.zip
# cuda
https://download.pytorch.org/libtorch/cu102/libtorch-win-shared-with-deps-debug-1.10.0%2Bcu102.zip
https://download.pytorch.org/libtorch/cu113/libtorch-win-shared-with-deps-debug-1.10.0%2Bcu113.zip
Win10 C++ libtorch调用YOLOv8的步骤如下: 1. 首先,确保你已经安装好了适用于C++的libtorch。你可以从官方网站下载并按照指导进行安装。确保你选择的是与你的操作系统和编译器版本相匹配的libtorch。 2. 下载并配置YOLOv8的模型文件和权重。YOLOv8是一种目标检测算法,它使用预先训练的权重和模型来进行目标检测。你可以在网上找到YOLOv8的预训练权重和模型文件。确保你已经下载了它们并将它们存放在适当的位置。 3. 创建一个C++项目,并在项目中包含libtorch的头文件路径和库文件路径。你需要在项目属性中设置这些路径,以便编译器能够正确地找到libtorch,并将其链接到你的项目中。 4. 在你的C++代码中,包含YOLOv8和libtorch的头文件。你需要包含YOLOv8模型和权重加载的相关头文件,以及libtorch的头文件。 5. 在代码中加载YOLOv8的模型和权重。使用libtorch的加载模型函数,将YOLOv8的模型和权重文件加载到内存中。 6. 准备待检测的图像数据。将要检测的图像数据转换为libtorch中的张量格式。确保输入的图像数据与YOLOv8的模型输入尺寸一致。 7. 将图像输入模型进行推理。使用加载的YOLOv8模型对图像进行前向传递,得到目标检测结果。 8. 解析模型的输出结果。通过处理模型的输出张量,可以得到目标的位置、类别和置信度等信息。 9. 根据解析后的结果,进行目标的绘制和展示。你可以使用C++图形库或其他绘图工具来绘制检测到的目标,在图像上标注目标的位置和类别等信息。 以上步骤大致描述了在Win10平台上使用C++和libtorch调用YOLOv8目标检测模型的过程。具体实现可能因实际情况而有所区别,请根据你的项目需求进行调整和完善。
评论 22
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值