This project is created during my internship at Prof. Kenjiro Taura Laboratory at University of Tokyo. The main focus of this projet is to compare the performance achieved of Chapel to C++, Python in training a transformer model. The Chapel and C++code is implemented from scratch and the python is obtained from GitHub
- Master : contain all versions including the cuda implementation from scratch as well, which is a side project.
- SingleThread : contain the single thread implementation of C++, Chapel, 2 versions of Pytorch.
- MultiThread : contain the multithread thread implementation of C++, Chapel, 2 versions of Pytorch.
C++
cd ./C++
make -jChapel
cd ./Chapel
chpl ./main.chpl --fastcuda
cd ./cuda
make -jpython For Pytorch A (orignal implementation from GitHub)
cd ./python/Transformer-from-Scratch
python ./train.pyFor Pytorch B (orignal implementation from GitHub with transformerBlock replaced by torch.nn.transformer)
cd ./python/Pytorch
python ./train.py