Accelerator CLI

On its host, accelerator uses a the accelerator CLI to communicate with FPGA.

Accelerator CLI do not provides as features as Apyfal CLI, but it can help to reduce latency in some cases.

A configured host is required to use this command. Apyfal can be used to configure an instance and access it with SSH. See Getting Started for more information.

The accelerator command

The accelerator command path is: /opt/accelize/accelerator/accelerator.

It needs to be run as root (or with sudo)

It support following arguments:

  • -m: Accelerator mode. Possibles values are: 0 for configuration/start mode, 1 for process mode, 2 for stop mode. This is equivalent to apyfal.Accelerator start, process and stop methods.
  • -i: Input local file path, used to pass src in configuration mode and src in process mode.
  • -o: Output local file path, used to pass dst in process mode.
  • -j: JSON parameter local file path, used to pass a JSON parameters files like described in Advanced use.
  • -p: JSON output local file path, used to get some results in JSON format.
  • -v: Verbosity level. Possible values: from 0 (Full verbosity) to 4 (Less verbosity).
# Configures accelerator with src and JSON parameters
sudo /opt/accelize/accelerator/accelerator -m 0 -i ${src} -j ${parameters}

# Processes src and save result to dst
sudo /opt/accelize/accelerator/accelerator -m 1 -i ${src} -o ${dst}

Metering services

For use accelerator command, metering services needs to be started. This should be the case by default.

Theses commands starts services:

sudo systemctl start meteringsession
sudo systemctl start meteringclient

Theses commands stops services:

sudo systemctl stop meteringclient
sudo systemctl stop meteringsession

In two cases, run order of commands is important.