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

2023-03-11 · 254 字 · 约 1 分钟

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

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

# 1. Intel CPU + Intel GPU

# 添加 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

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

# 3. Intel CPU

# 一般各大框架都会默认使用 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. 参考