# bitsandbytes ## 安装 bitsandbytes支持 + Python 3.7+ + DTK 22.10.1 ### 下载DTK并配置其环境变量: ```bash # DTK tar包下载目录:光合社区/资源工具/DCU Toolkit/DTK23.10.1(https://cancon.hpccube.com:65024/1/main/DTK-22.10.1),根据系统选择对应DTK的tar包,并解压至/opt目录。 export ROCM_PATH=/opt/dtk-22.10.1 source /opt/dtk-22.10.1/env.sh ``` 注意:上述ROCM_PATH和Makefile中的ROCM_PATH请根据自己的环境作相应更改,此处仅供参考。 ### 编译bitsandbytes ```bash #下载源码 git clone http://developer.hpccube.com/codes/aicomponent/bitsandbytes.git cd bitsandbytes export CUDA_VERSION=gfx906 make hip ``` ### 安装bitsandbytes ```bash python setup.py install python3 -m bitsandbytes #安装测试 ``` ## Note 当前版本仅支持优化器相关的功能,其余功能正在开发中,完成后会及时更新。