Skip to content

Repository files navigation

GPU-dev

  1. download cuda-specific libtorch (2.3.1 with cuda 11.8)

    $ wget https://download.pytorch.org/libtorch/cu118/libtorch-shared-with-deps-2.3.1%2Bcu118.zip

  2. download typhoon-blade, which is the latest version

    $ git clone git@github.com:anqin/blade-build.git

  3. download the GPU docker

    $ docker pull registry.cn-hangzhou.aliyuncs.com/anqindev/ubuntu22-dev:ubuntu22-tf2.15-dev1

CPU-dev

  1. download cuda-specific libtorch (2.3.1 with cuda 11.8)

    $ wget https://download.pytorch.org/libtorch/cpu/libtorch-shared-with-deps-2.3.1%2Bcpu.zip

  2. download typhoon-blade, which is the v2.0-alpha

    $ git clone -b v2.0-alpha git@github.com:anqin/blade-build.git

  3. download the GPU docker

    $ docker pull registry.cn-hangzhou.aliyuncs.com/anqindev/ubuntu22-dev:

Build

  1. path tree would be:

    copy the BUILD.libtorh (for GPU or CPU) to corrent dir:

    pytorch_gpu_dev |- BLADE_ROOT |- BUILD |- .cpp/.h |- libtorch_cpu |- BUILD |- |- libtorch_gpu |- BUILD |-

  2. mount the dirs to docker image

    • list the docker images and find the

    • for GPU

      $ bash docker_env_setup_gpu.sh

    • for CPU

      $ bash docker_env_setup.sh

  3. build the codes

    $ blade build ...

  4. run the example codes

    $ export LD_LIBRARY_PATH=<path/to/libtorch/lib64> $ ./mnist_sample_main $ ./load_model_main net.pt

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages