Skip to content

DanieleVeri/MLP_CUDA_OMP

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Architectures and platforms for AI -- Module 2

OpenMP and CUDA implementations of a locally connected MLP (2020/2021)

by Daniele Verì


Requirements

  • gcc and make (both found in build-essential)
  • nvcc

Build

command description
make build all
make openmp build openMP implementation
make openmp_release build openMP release
make openmp_dbg build openMP debug
make cuda build CUDA implementation
make cuda_release build CUDA release
make cuda_dbg build CUDA debug
make cuda_legacy build CUDA for arch compute_20 (cuda version < 9)
make doc create documentation with doxygen
make clean clean objects

Run

Once builded the source you can just launch the executables passing the mandatory arguments N and K:

  • ./mlp_omp N K
  • ./mlp_cuda N K

Profile

In order to profile the programs on the local machine just run:

profile/local_profile.sh

To profile the OMP implementation on a remote machine with ssh server enabled just run:

profile/gcp_profile.sh USER HOST CERTIFICATE

To profile the CUDA implementation on a Google Colab instance with GPU:

  • open the profile/colab_norebook.ipynb on a Colab instance
  • set up a machine with public ip and ssh server enabled that accept a certificate as credential
  • upload on the colab instance BOTH public key and the certificate
  • run the first two cells, setting the actual server ip
  • on the local machine, just run profile/colab_profile.sh SERVER_USER SERVER_HOST CERTIFICATE

About

OpenMP and CUDA implementation of a MLP

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published