oneapi-src / oneAPI-samples

Samples for Intel® oneAPI Toolkits
https://oneapi-src.github.io/oneAPI-samples/
MIT License
899 stars 675 forks source link

FPGA: Worked around runtime bug with event dependences between invocations of the same kernel #2361

Closed GarveyJoe closed 1 month ago

GarveyJoe commented 1 month ago

Description

This change implements a workaround for a bug affecting FPGA targets. The bug and workaround will be documented in the upcoming 2024.2 release notes. This workaround can be removed when the underlying bug is fixed (presumably in 2025.0).

Specifically, when kernels are explicitly made dependent on other invocations of the same kernel through events, the FPGA runtime can occasionally hang. The hang is rare, but since the gzip_ll code sample attempts to enqueue kernels in this way hundreds of times it has a good chance of hitting it on any given run.

Unfortunately, this code sample seems to be affected by a second, unrelated hang though because while this fix allows the program to complete some of the time, it still hangs periodically. Runtime traces of those remaining hangs indicate that they are a different issue. I still think it's worth submitting this as it reduces the frequency with which the design hangs.

External Dependencies

No new external dependencies

Type of change

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

I tested by compiling the sample for FPGA (make fpga) and running it on a Silicom N6010 Agilex 7 board.