机器学习环境搭建-硬件优化

本文最后更新于 2024年4月26日 凌晨

使用 CPU GPU 加速等紧密贴合硬件的库时,务必查看官方文档的硬件要求

在测试或搭建硬件优化库时,务必备份原环境,以及及时的备份数据

1. Intel CPU + Intel GPU

1
2
3
4
5
6
# 添加 intel channel
conda config --add channels intel
# 核心发行版
conda create -n idp intelpython3_core python=3.x -c intel
# 完整发行版
conda create -n idp intelpython3_full python=3.x -c intel

2. Nvidia GPU

1
2
3
4
# 尽量在最初同时安装 cudnn cudatoolkit
# 后期再安装 cudnn 会比较麻烦
# 只安装 cudatoolkit 后期再添加 cudnn 会存在版本匹配等问题
mamba create -n lab-01 python=3.8 cudnn cudatoolkit

3. Intel CPU

1
2
# 一般各大框架都会默认使用 mkl(所以 intel cpu 一般不需要手动调整)
mamba create -n lab-01 python=3.8 mkl

4. AMD CPU

BLAS、OpenBLAS、ATLAS、MKL_openblas mkl - CSDN博客: https://blog.csdn.net/fuhanghang/article/details/122885265

暂时没有找到针对 AMD CPU 优化的库,ACML 也停止更新了,如果有关于 AMD CPU 的优化需求可以参考下面两篇文章,删除 MKL 限制 或 使用 OpenBLAS

5. 参考


机器学习环境搭建-硬件优化
https://blog.cc01cc.cn/2023/03/11/ai-env-hardware-acceleration/
作者
零一/cc01cc(zeo)
发布于
2023年3月11日
更新于
2024年4月26日
许可协议