Skip to content

Commit

Permalink
Merge pull request #8 from MooreThreads/update_doc
Browse files Browse the repository at this point in the history
[MTAI] doc(README): update doc about mt-container-toolkit
  • Loading branch information
yaowang-mt authored Jul 26, 2023
2 parents a2cf2f5 + ce434d1 commit 1a14c97
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 6 deletions.
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ pip install torch_musa_xxxxxx-cp39-cp39-linux_x86_64.whl
- [MUDNN](https://new-developer.mthreads.com/sdk/download/musa?equipment=&os=&driverVersion=&version=)
- Other Libs (including muThrust, muSparse, muAlg, muRand)
- [PyTorch Source Code](https://github.com/pytorch/pytorch/tree/v2.0.0)
- Docker Container Toolkits
- [Docker Container Toolkits](https://mcconline.mthreads.com/software)

**NOTE:** Since some of the dependent libraries are in beta and have not yet been officially released, we recommend using the [development docker](#docker-image-for-developer) provided below to compile **torch_musa**. If you really want to compile **torch_musa** in your own environment, then please contact us for additional dependencies.

Expand Down Expand Up @@ -111,6 +111,9 @@ python setup.py install
### Docker Image
- [Development Docker Image Download Link](https://mcconline.mthreads.com/repo/musa-pytorch-dev-public?repoName=musa-pytorch-dev-public&repoNamespace=mcconline&displayName=MUSA%20Pytorch%20Dev%20Public)
- [Release Docker Image Download Link](https://mcconline.mthreads.com/repo/musa-pytorch-release-public?repoName=musa-pytorch-release-public&repoNamespace=mcconline&displayName=MUSA%20Pytorch%20Release%20Public)

**NOTE:** If you want to use **torch_musa** in docker container, please install [mt-container-toolkit](https://mcconline.mthreads.com/software/1?id=1) first and use '--env MTHREADS_VISIBLE_DEVICES=all' when starting a container.

#### Docker Image for Developer

```bash
Expand Down
Binary file modified docs/MooreThreads-Torch_MUSA-Developer-Guide-CN-v1.0.0.pdf
Binary file not shown.
12 changes: 7 additions & 5 deletions docs/developer_guide/source/4_installation/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* muRAND_dev1.0.0.tar.gz
* muSPARSE_dev0.1.0.tar.gz
* muThrust_dev-0.1.1-Linux.deb
* Docker Container Toolkits
* Docker Container Toolkits(https://mcconline.mthreads.com/software)



Expand All @@ -39,6 +39,9 @@ torch_musa是在PyTorch v2.0.0基础上以插件的方式来支持摩尔线程
开发docker镜像中已经安装了必需的依赖包,包括一些未正式发布的依赖包。如果用户不想在我们提供的docker镜像中开发,请通过developers@mthreads.com邮箱联系我们获取必需的依赖包。

.. attention::
| 使用docker时,请务必提前安装mt-container-toolkit(https://mcconline.mthreads.com/software/1?id=1),并且在启动docker container时添加选项“--env MTHREADS_VISIBLE_DEVICES=all”,否则在docker container内部无法使用torch_musa。
编译步骤
---------

Expand All @@ -58,13 +61,12 @@ torch_musa是在PyTorch v2.0.0基础上以插件的方式来支持摩尔线程
.. code-block:: bash
cd torch_musa
bash scripts/update_daily_mudnn.sh # update daily mudnn lib if needed
bash build.sh # build original PyTorch and Torch_MUSA from scratch
bash build.sh # build original PyTorch and torch_musa from scratch
# Some important parameters are as follows:
bash build.sh --torch # build original PyTorch only
bash build.sh --musa # build Torch_MUSA only
bash build.sh --fp64 # compile fp64 in kernels using mcc in Torch_MUSA
bash build.sh --musa # build torch_musa only
bash build.sh --fp64 # compile fp64 in kernels using mcc in torch_musa
bash build.sh --debug # build in debug mode
bash build.sh --asan # build in asan mode
bash build.sh --clean # clean everything built
Expand Down
9 changes: 9 additions & 0 deletions docs/developer_guide/source/8_FAQ/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,15 @@ Q:如果在更新过torch_musa最新代码后,编译报错?
如果还报错,可能是因为需要更新MUSA软件栈中某个底层软件包。


Docker容器
-----------

Q:如果在docker container内部使用torch_musa时,报错 ``ImportError: libsrv_um_MUSA.so: cannot open shared object file: No such file or directory`` ?

#. 请确保成功安装mt-container-toolkit(https://mcconline.mthreads.com/software/1?id=1);
#. 在启动docker container时请添加 ``--env MTHREADS_VISIBLE_DEVICES=all`` 。


适配算子
----------
Q:如果在CUDA-Porting适配新算子时,编译可以通过,在 ``import torch;import torch_musa`` 时报错找不到符号?
Expand Down

0 comments on commit 1a14c97

Please sign in to comment.