This is the code used to write the paper "An investigation into parallelizing the RNEA Algorithm using PyTorch and CUDA.jl"
The base code for the RNEA algorithm is from the A2R Lab's GRiD repository.
The batched RNEA algorithm was also based on work done by the A2R Lab
The code in this repository uses several external packages: beautifulsoup4, lxml, numpy, sympy, pytorch which can be automatically installed by running:
pip3 install -r requirements.txtIf Julia isn't installed, it can be installed by running (on a UNIX system):
curl -fsSL https://install.julialang.org | shThen install CUDA.jl by running:
cd Julia
julia Install_CUDA.jlsudo apt-get update
sudo apt-get -y install xorg xorg-dev linux-headers-$(uname -r) apt-transport-https
Note: for Ubuntu 20.04 see https://developer.nvidia.com/cuda-downloads for other distros
wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/cuda-ubuntu2004.pin
sudo mv cuda-ubuntu2004.pin /etc/apt/preferences.d/cuda-repository-pin-600
sudo apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/7fa2af80.pub
sudo add-apt-repository "deb https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/ /"
sudo apt-get update
sudo apt-get -y install cuda
export PATH="/usr/local/cuda/bin:$PATH"
export LD_LIBRARY_PATH="/usr/local/cuda/lib64:$LD_LIBRARY_PATH"
export PATH="opt/nvidia/nsight-compute/:$PATH"
The Python code, both the unparallelized versions, and the parallelized PyTorch versions, is in the folder Python. These are .ipynb notebooks.
The Julia code, both unparallelized, and the parallelized CUDA.jl code, is in the folder Julia. To run any of the files in this folder run:
julia file_name.jl
The graphs from the results of the benchmarking can be found in the folder Graphs
- Eden Chung
- Annie Wang
- Siying Ding
- Neasha Mittal