Code Monkey home page Code Monkey logo

pasif's Introduction

PASIf

1. Compilation

To compile the code using the Makefile you'll need to fulfill the following requirments:

  • build-essential package with a gcc version <= 11.x

  • python-dev package, make sure to match the dev package version with your python version. (3.10 have been used during the development)

  • PASIf use pybind11 (https://github.com/pybind/pybind11) to link the C++/CUDA code as a python module. Make sure after cloning the project that the submodule have been downloaded as well:

      git submodule init
      git submodule update
    

    Make sure in the Makefile to make the PYBIND11 macro to match you'r installed version.

  • To compile the CUDA code you'll need the Nvidia compiler nvcc. This come in the NVIDIA HPC SDK: https://developer.nvidia.com/hpc-sdk
    This is installed by default in /opt/nvidia/, make sure to add the path to the compiler in your Linux Path:

      export PATH=/opt/nvidia/hpc_sdk/Linux_x86_64/*version*/compilers/bin:$PATH
    

    Then make sure to match the NVCCINCLUDE macro in the Makefile with your installed version of the HPC SDK.

  • To compile, just run:

      mkdir build
      make
    

Single vs Double precision

To switch the precision, change float to double in /src/helpers.cuh

Other comments on the Makefile

Depending on the hardware targeted during the compilation make sure that the -arch flag match the architecture of your hardware. This to get the best performances.

The compilation process will generate a .so python module in the ./build folder.

2. Benchmarking

The tools to benchmark Nvidia GPU kernels are Nsight Compute and Nsight systems. They come with the NVIDIA HPC SDK but you can also directly donwload the more recent version here: https://developer.nvidia.com/gameworksdownload#?dn=nsight-systems-2023-2

Command line tools

    # Run the code with NSYS event capture
    > nsys profile python3 FullInterfaceTesting.py

    # You can open the .nsys-rep output using the graphical interface (nsys-ui) or export it in a .sqlite format and open the result directly in the terminal
    > nsys export --output=rep_name.sqlite -t sqlite report.nsys-rep

    # Open the benchmark in the terminal
    > nsys stats *.sqlite

pasif's People

Contributors

vincent-maillou avatar

Stargazers

 avatar

Watchers

 avatar

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.