Remove runtime unit test dependency on aoc #368
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Runtime unit tests testing
clBuildProgram
on programs created from source would invoke the aoc compiler when the context compiler mode is notCL_CONTEXT_COMPILER_MODE_OFFLINE_INTELFPGA
. This is not ideal as we would want the unit tests to be standalone from the compiler as much as possible.This change removes this dependency on the aoc compiler by adding precompiled binaries to the repository to be loaded directly by the affected unit tests. The scope of the change is restricted to the unit tests, the runtime functionality related to building from source remains the same as before.
With that being said, based on the OpenCL spec, if the program is created with
clCreateProgramWithSource
andCL_DEVICE_COMPILER_AVAILABLE
is set to false, thenclBuildProgram
should returnCL_COMPILER_NOT_AVAILABLE
. This justifies us to remove the support for compiling source kernel code just-in-time, so we will be able to clean-up the code that involves the aoc compiler even more, and at the time we completely remove the support we can just remove thefrom_source
tests, which should allow us to clean up some of the added precompiled binaries in this change as well.This change also updates the runtime container images to no longer install aoc. Newly built container images, on which aoc is not installed, is verified to be working with the new runtime unit tests in my forked repository. Official containers built starting from this change will no longer contain aoc.