Skip to content

skip oneapi test if icpx doesn't exist #1302

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

calad0i
Copy link
Contributor

@calad0i calad0i commented May 28, 2025

Description

skip oneapi test if icpx doesn't exist

Type of change

  • 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.

@jmitrevs
Copy link
Contributor

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.

@vloncar
Copy link
Contributor

vloncar commented May 28, 2025

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

@calad0i
Copy link
Contributor Author

calad0i commented May 28, 2025

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).

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.

3 participants