No description
Find a file
github-actions[bot] 0d381a5a6c
Some checks failed
add-git-trailers.yml / docs(coverage): Update coverage report (push) Failing after 0s
coverage-report.yml / docs(coverage): Update coverage report (push) Failing after 0s
Build and Upload / Build and Upload (push) Waiting to run
test-build.yml / docs(coverage): Update coverage report (push) Failing after 0s
validate-code.yml / docs(coverage): Update coverage report (push) Failing after 0s
validate-files-and-commits.yml / docs(coverage): Update coverage report (push) Failing after 0s
verify-build.yml / docs(coverage): Update coverage report (push) Failing after 0s
docs(coverage): Update coverage report
PR: https://github.com/nubificus/vaccel/pull/203
Signed-off-by: github-actions[bot] <support@github.com>
Reviewed-by: Anastassios Nanos <ananos@nubificus.co.uk>
Approved-by: Anastassios Nanos <ananos@nubificus.co.uk>
2025-11-28 20:40:56 +02:00
.github ci: Add amallikopoulou to contributors 2025-11-28 20:40:56 +02:00
docs docs(coverage): Update coverage report 2025-11-28 20:40:56 +02:00
examples refactor(arg)!: Introduce new arg array API 2025-10-18 23:27:49 +03:00
plugins feat(plugins/exec): Try both dlopen modes for libs with dependencies 2025-11-06 22:18:11 +02:00
python feat(libvaccel): Enable explicit bootstrap and cleanup 2025-02-04 17:11:00 +02:00
scripts refactor(arg)!: Introduce new arg array API 2025-10-18 23:27:49 +03:00
src refactor: Add missing deprecated attributes 2025-11-12 12:20:16 +02:00
subprojects build(test): Remove third-party headers from the repo 2025-11-08 01:27:01 +02:00
test refactor: Add missing deprecated attributes 2025-11-12 12:20:16 +02:00
.clang-format ci: Refactor workflows/actions to simplify reuse 2024-07-16 16:20:50 +03:00
.clang-tidy feat(examples): Cleanup/Fix and add profiling 2025-03-13 23:15:30 +02:00
.gitignore ci(cpp-linter): Do not ignore 'subprojects' dir 2024-09-23 00:55:54 +03:00
.gitmodules build: Remove CMake 2024-11-06 21:27:39 +02:00
CONTRIBUTING.md ci(deps): Bump super-linter/super-linter from 7 to 8 2025-08-03 00:27:34 +03:00
LICENSE Add Apache License 2.0 to project 2021-08-23 14:42:23 +02:00
meson.build build(test): Remove third-party headers from the repo 2025-11-08 01:27:01 +02:00
meson.options build(meson): Change tests feature to auto 2024-07-02 07:19:23 +02:00
NOTICE chore: Update NOTICE year and project name 2025-05-09 18:37:08 +01:00
README.md feat(libvaccel)!: Implement unified config object 2025-02-04 17:11:00 +02:00

vAccel

Build and upload

vAccel is a runtime library for hardware acceleration. vAccel provides an API with a set of functions that the library is able to offload to hardware acceleration devices. The design of the runtime library is modular, it consists of a front-end library which exposes the API to the user application and a set of backend plugins that are responsible to offload computations to the accelerator.

This design decouples the user application from the actual accelerator specific code. The advantage of this choice is that the application can make use of different hardware accelerators without extra development cost or re-compiling.

This repo includes the core runtime library, and a backend plugin for the EXEC operation. For debugging and demonstration purposes we include a NOOP plugin which just prints out debug parameters (input and output) for each API call. You can also find a MBENCH micro-benchmark plugin that emulates a cpu-intensive workload to measure vAccel overhead.

There is a splash page for vAccel, along with more elaborate documentation.

For step-by-step tutorials, you can have a look at our lab repo.

Build & Installation

1. Install dependencies and clone repo

apt-get install build-essential ninja-build pkg-config python3-pip 
pip install meson
git clone https://github.com/nubificus/vaccel --recursive

2. Configure, build and install the core runtime library

cd vaccel

# Configure the build directory with the default options and set build
# type to 'release'.
meson setup --buildtype=release build

# Compile the project
meson compile -C build

# Install the project
meson install -C build

3. Build the plugins

Building the plugins is disabled by default. You can enable building one or more plugins at configuration time by setting the corresponding options.

For example, replacing:

meson setup --buildtype=release build

with:

meson setup --buildtype=release -Dplugin-noop=enabled build

in the previous code snippet, will build and install both the core library and the noop backend plugin.

To view all available options and values, you can use:

meson setup --buildtype=release build
meson configure build

vAccel specific options can be found in the Project Options section.

You can find more meson command examples in Configuring and building vAccel with meson.

Building a vAccel application

We will use an image classification example which can be found under the examples folder of this project.

To enable build of this and all other examples, enable the examples option at configuration time:

meson setup --reconfigure -Dexamples=enabled build

Alternatively, to build an application manually you can use the provided pkg-config specification - make sure vAccel is installed globally or set the PKG_CONFIG_PATH environment variable.

For example:

cd ../examples
gcc classify.c -o classify -Wall -Wextra $(pkg-config --cflags --libs vaccel)

Running a vAccel application

Having built our classify example, we need to prepare the vAccel environment for it to run:

  1. Define the path to libvaccel.so (if not in the default search path):

    export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH
    
  2. Define the plugin implementing the operations we use in our application.

    In this example, we will use the noop plugin:

    export VACCEL_PLUGINS=/usr/local/lib/libvaccel-noop.so
    
  3. Finally, run the application:

    ./classify /usr/local/share/vaccel/images/example.jpg 1
    

    Or, alternatively, from the build directory:

    ./build/examples/classify examples/images/example.jpg 1
    

    which should dump the following output:

    Initialized session with id: 1
    Image size: 79281B
    [noop] Calling Image classification for session 1
    [noop] Dumping arguments for Image classification:
    [noop] len_img: 79281
    [noop] will return a dummy result
    classification tags: This is a dummy classification tag!
    

You can get verbose output from the vAccel library by setting the VACCEL_LOG_LEVEL environment variable.

For example, to use debug level logging:

export VACCEL_LOG_LEVEL=4

License

Apache License 2.0