hls4ml icon indicating copy to clipboard operation
hls4ml copied to clipboard

skip oneapi test if icpx doesn't exist

Open calad0i opened this issue 6 months ago • 3 comments

Description

skip oneapi test if icpx doesn't exist

Type of change

  • [x] Other (Specify)

Tests

Not needed

Checklist

  • [ ] I have read the guidelines for contributing.
  • [ ] I have commented my code, particularly in hard-to-understand areas.
  • [ ] I have made corresponding changes to the documentation.
  • [ ] My changes generate no new warnings.
  • [ ] I have installed and run pre-commit on the files I edited or added.
  • [ ] I have added tests that prove my fix is effective or that my feature works.

calad0i avatar May 28 '25 13:05 calad0i

Although I am in general supportive of this, I do worry about silent failures. We should make sure that the CI makes sure the tests aren't accidentally skipped. The CI should fail if they are skipped.

jmitrevs avatar May 28 '25 13:05 jmitrevs

How does the installation actually work? We check for icpx, but then run cmake. Can we have an environment where one is available but not the other.

BTW it won't be called icpx soon...

Not a fan of skips like these as it has to be done in every test. Can we expose this as a project-scope fixture that can be controlled externally then test's can run or not based on a boolean? as in, if icpx is not available then either fail or skip depending on the config of the test environment

vloncar avatar May 28 '25 13:05 vloncar

Most likely cmake directs the compiler to icpx in this case. Actually the skips are added to the main codebase instead of tests, so every time .compile() is called with oneapi backend, it will try to skip. Outside test, this skip is treated as an exception. Will need to look closer if hooking into a fixture can work this way. A project scope fixture is only called once, and this will need to determine for each test if 'oneapi' is used for any parameter... (and if one test targets oneapi specifically and doesn't use it as a parameter it will be missed).

calad0i avatar May 28 '25 15:05 calad0i