0

I'm trying to get github actions to work with Intel FPGAs in a self hosted runner. Any time communication from the host to the FGPA is attempted there are errors like these ones:

Error initializing DMA: invalid parameter
Error initializing DMA: invalid parameter
Error closing DMA
Error closing DMA
...
aocl mmd alloc failed: Resource temporarily unavailable
aocl mmd alloc failed: Resource temporarily unavailable
aocl mmd alloc failed: Resource temporarily unavailable

If I run any aocl command or run any application that uses the OpenCL runtime environment normally in the system it works fine. It is only when it's running through github actions that it fails.

tgonzalez89
  • 621
  • 1
  • 6
  • 26

1 Answers1

0

The problem is the memlock limit. The default value of a systemd service is 64k. It needs to be a large number. Add LimitMEMLOCK=infinity to the service file as shown below.

[username@mysystem ~]$ cat /etc/systemd/system/actions.runner.runner-name.mysystem.service
[Unit]
Description=GitHub Actions Runner (runner-name.mysystem)
After=network.target

[Service]
ExecStart=/home/username/.local/bin/myrunner/001/runsvc.sh
User=username
LimitMEMLOCK=infinity
WorkingDirectory=/home/username/.local/bin/myrunner/001
KillMode=process
KillSignal=SIGTERM
TimeoutStopSec=5min

[Install]
WantedBy=multi-user.target

Then reboot the service.

tgonzalez89
  • 621
  • 1
  • 6
  • 26