Giter VIP home page Giter VIP logo

extremeweatherproject's Introduction

ExtremeWeatherProject

Hi! This is our course project for CMU Parallel Computer Architecture and Programming. In this project, we parallelize the Transformer model using Tensor Model Parallelism and Pipeline Parallelism. We implemented the Encoder from scratch in C++, Tensor Model Parallelism inside a layer in OpenMP and MPI, and Pipeline Parallelism in MPI. Results can be found in the report shown in our project website: Project Website

How to run

0. Prerequisites

  • C++ compiler
  • OpenMP
  • OpenMPI

1. Clone the repository and make

git clone https://github.com/xyd18/ExtremeWeatherProject.git

Next, under the root directly, run

make debug # for debug version, which has extensive printings
make release # for release version

2. Run the program

For the Tensor Model Parallelism version in OpenMP

./bin/debug-transformer-openmp # debug version
./bin/release-transformer-openmp # release version

For the Tensor Model Parallelism version in MPI, using 4 processes

mpirun -np 4 ./bin/debug-transformer-tmp-cube -o logs/debug-transformer-tmp-cube-4.txt > logs/debug-transformer-tmp-cube-4.log # debug version
mpirun -np 4 ./bin/release-transformer-tmp-cube -o logs/release-transformer-tmp-cube-4.txt > logs/release-transformer-tmp-cube-4.log # release version

For the Pipeline Parallelism version in MPI, using 4 processes

mpirun -np 4 ./bin/debug-ViT -pip -out Vit_output.bin > logs/debug-ViT.log # debug version
mpirun -np 4 ./bin/release-ViT -pip -out Vit_output.bin > logs/release-ViT.log # release version

For Pipeline Parallelism version in MPI with Tensor Model Parallelism inside a layer

mpirun -np 4 ./bin/debug-ViT -pip -tmp -out Vit_output.bin -micro 32 > logs/debug-ViT.log # debug version
mpirun -np 4 ./bin/release-ViT -pip -tmp -out Vit_output.bin -micro 32 > logs/release-ViT.log # release version

Alternatively, you can consider using the checker.py we provided.

Future Work

  • Implement the Auto Diff using C++ library
  • Implement the CUDA/OpenCL version, enalbing training on GPU

extremeweatherproject's People

Contributors

xyd18 avatar mononokehime14 avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Forkers

mononokehime14

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.