The VEDA project is a "CUDA Driver-API and Runtime-API"-like programming interface, to make it easier to port existing CUDA, OpenCL and HIP applications to the SX-Aurora. It is based on AVEO.
As the SX-Aurora is not CUDA compatible, there are some differences.
- The launch of kernels does not have any Grid/Block or Shared Memory information.
- The usage of streams differs. In CUDA, these allow to overlap computations with memcopy operations. In VEDA we support two modes, either using all cores (through OMP) of the VE in one stream, or to utilize a single stream per core. * This needs to be selected when creating the context for a device.
- VEDA allows allocating/freeing memory without synching the execution via
vedaMemAllocAsync(...) and vedaMemFreeAsync(...) .
- VEDAdeviceptr need to be translated in the device code to C-pointers via
vedaMemPtr(...) prior they can be used!
- Mixing Host + Device code into a single file is not supported yet.
To assist in development, we provide an own CMake module path (/usr/local/ve/veda/cmake) that allows to enable the languages VEDA_C , VEDA_CXX and VEDA_Fortran . To allow CMake to distinguish between device and host code, all device files need to have *.vX file extensions, i.e., *.vc, *.vcpp, *.vc++, *.vf .
The VEDA CMake also allows to port existing CMake CPU applications to SX-Aurora without modifying the CMakeLists.txt or setting paths manually. For this use:
cmake -C /usr/local/ve/veda/cmake/InjectVE.cmake /path/to/src
to create your project.
Posted by NEC admin (administrator) on 24 June 2022 at 02:17. Edited by NEC admin (administrator) on 24 June 2022 at 02:20. |
|