Giter Site home page Giter Site logo

jacc.jl's Introduction

JACC.jl

CI-CPU CI-GPU-NVIDIA CI-GPU-AMD

CPU/GPU performance portable layer for Julia

JACC.jl follows a function as a argument approach in combination with the power of Julia's ecosystem for multiple dispatch, GPU access via JuliaGPU back ends, and package extensions since Julia v1.9 . Similar to portable layers like Kokkos, users would pass a size and a function including its arguments to a parallel_for or parallel_reduce function. The overall goal is to write a single source code that can be executed on multiple vendor CPU and GPU parallel programming environments. JACC meant to simplify CPU/GPU kernel programming using a simple application programming interface (API).

JuliaCon 2023 presentation video.

  1. Set a back end: "cuda", "amdgpu", or "threads" (default) with JACC.JACCPreferences generating a LocalPreferences.toml file

    julia> import JACC.JACCPreferences
    julia> JACCPreferences.set_backend("cuda")
    
  2. Run a kernel example (see tests directory)

    import JACC
    
    function axpy(i, alpha, x, y)
      if i <= length(x)
        @inbounds x[i] += alpha * y[i]
      end
    end
    
    N = 10
    # Generate random vectors x and y of length N for the interval [0, 100]
    x = round.(rand(Float32, N) * 100)
    y = round.(rand(Float32, N) * 100)
    alpha = 2.5
    
    x_d = JACC.Array(x)
    y_d = JACC.Array(y)
    JACC.parallel_for(N, axpy, alpha, x_d, y_d)
    

We currently have a limited number of configurations. We hope to study and incoorporate more relevant cases and dimensions shapes as needed. For an app integration example see the GrayScott.jl JACC branch and the Simulation.jl for writing kernels with JACC.jl and selecting specific vendor back ends in Julia.

Funded by the US Department of Energy Advanced Scientific Computing Research (ASCR) projects:

  • S4PST and PESO as part of the Next Generation of Scientific Software Technologies (NGSST)
  • Bluestone X-Stack

Past sponsors:

jacc.jl's People

Contributors

williamfgc avatar geekdude avatar pedrovalerolara avatar michel2323 avatar philipfackler 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.