Skip to content

Latest commit

 

History

History

openmp-offload

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 

OpenMP compilations for Wasm offload

Examples of single file OpenMP 'offload' to WebAssembly.

  • This requires a change to Clang to define Wasm as a valid offload target and also disable multi-stage compilations normally used for native host targets (also as a branch for potentially more up-do-date state)
  • Import OpenMP API into the module, wasi-parallel Wasm API does not define device offload functionality

Examples are:

  • copy.c - copy one array into the other on the device
  • dot.c - dot product
  • matmul.c - matrix multiplication
  • saxpy.c - single-precision A * X + Y

To compile, first build modified Clang (apply patch), then run make with Clang on the path.