Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove runtime unit test dependency on aoc #368

Merged
merged 5 commits into from
Jun 26, 2024
Merged

Conversation

sophimao
Copy link
Contributor

@sophimao sophimao commented Jun 21, 2024

Runtime unit tests testing clBuildProgram on programs created from source would invoke the aoc compiler when the context compiler mode is not CL_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 and CL_DEVICE_COMPILER_AVAILABLE is set to false, then clBuildProgram should return CL_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 the from_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.

@sophimao sophimao force-pushed the no-aoc branch 2 times, most recently from 3512334 to 2b2db5d Compare June 25, 2024 14:08
@sophimao sophimao marked this pull request as ready for review June 25, 2024 19:59
mendell27
mendell27 previously approved these changes Jun 26, 2024
@sophimao
Copy link
Contributor Author

Did a rebase to clean up commits

@sophimao sophimao merged commit 0ae3326 into intel:main Jun 26, 2024
27 checks passed
@sophimao sophimao deleted the no-aoc branch June 26, 2024 17:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants