Skip to content
This repository was archived by the owner on Mar 28, 2023. It is now read-only.

[SYCL-MLIR] Run all tests in Basic and XFAIL the failed test cases #1519

Merged
merged 2 commits into from
Jan 16, 2023

Conversation

whitneywhtsang
Copy link

If this is good, then will extend to test cases in other folders.

Signed-off-by: Tsang, Whitney [email protected]

@whitneywhtsang whitneywhtsang added the sycl-mlir Pull requests or issues for sycl-mlir branch label Jan 15, 2023
@whitneywhtsang whitneywhtsang changed the title [SYCL-MLIR] Run all tests in Basic and XFAIL to failed test cases [SYCL-MLIR] Run all tests in Basic and XFAIL the failed test cases Jan 15, 2023
Copy link

@sommerlukas sommerlukas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's a good idea to enable more of the tests in the test-suite, so we get an overview of potential regressions through CI.

However, I think there might be a more elegant solution to marking tests that we currently do not yet support as such:
LLVM's lit accepts an --xfail=LIST option, to which you can pass a list of tests that should be considered expected failures.
So instead of modifying 50+ files to add the XFAIL line to each of them, we could have a list of unsupported tests in single location (e.g., CMakeLists.txt) and pass that list to the xfail option of lit.

What do you think?

@etiotto
Copy link

etiotto commented Jan 16, 2023

I think it's a good idea to enable more of the tests in the test-suite, so we get an overview of potential regressions through CI.

However, I think there might be a more elegant solution to marking tests that we currently do not yet support as such: LLVM's lit accepts an --xfail=LIST option, to which you can pass a list of tests that should be considered expected failures. So instead of modifying 50+ files to add the XFAIL line to each of them, we could have a list of unsupported tests in single location (e.g., CMakeLists.txt) and pass that list to the xfail option of lit.

What do you think?

Personally I think using the --xfail opt is preferable ** only if** we can pass a text file containing the list of tests that do not yet pass, Listing them directly seems cumbersome, given that we have many failing tests currently.

@sommerlukas
Copy link

I think it's a good idea to enable more of the tests in the test-suite, so we get an overview of potential regressions through CI.
However, I think there might be a more elegant solution to marking tests that we currently do not yet support as such: LLVM's lit accepts an --xfail=LIST option, to which you can pass a list of tests that should be considered expected failures. So instead of modifying 50+ files to add the XFAIL line to each of them, we could have a list of unsupported tests in single location (e.g., CMakeLists.txt) and pass that list to the xfail option of lit.
What do you think?

Personally I think using the --xfail opt is preferable ** only if** we can pass a text file containing the list of tests that do not yet pass, Listing them directly seems cumbersome, given that we have many failing tests currently.

Agreed. I think it should be possible to initially generate the list/file from the list of failed tests during a run and store it in a separate file.

This file could be included using CMake's include, and the content of that file could be a single variable.

@whitneywhtsang
Copy link
Author

whitneywhtsang commented Jan 16, 2023

LLVM's lit accepts an --xfail=LIST option, to which you can pass a list of tests that should be considered expected failures.

That's what I tried to do first, but the --xfail option doesn't work as expected with more than one test case listed. For example, I tried --xfail='Basic/access_to_subset.cpp;Basic/accessor/accessor.cpp' and --xfail 'Basic/access_to_subset.cpp;Basic/accessor/accessor.cpp'. (The environment variable LIT_XFAIL works as expected.)

That's why I simply use a quick script to add XFAIL to have the failing test.

Debugged the --xfail option to see why it is not working. It works if I invoke the lit command directly, but doesn't work as a cmake command. If using in cmake, need to escape the semicolon.

Copy link

@sommerlukas sommerlukas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks for changing the implementation to use a list.

Would it be possible to list one file per line, to avoid merge conflicts when two people edit the list?

Signed-off-by: Tsang, Whitney <[email protected]>
@whitneywhtsang
Copy link
Author

Would it be possible to list one file per line, to avoid merge conflicts when two people edit the list?

Yes, done.

@whitneywhtsang whitneywhtsang merged this pull request into sycl-mlir Jan 16, 2023
@whitneywhtsang whitneywhtsang deleted the basic branch January 16, 2023 16:57
@etiotto
Copy link

etiotto commented Jan 17, 2023

Thanks @whitneywhtsang

whitneywhtsang added a commit that referenced this pull request Jan 18, 2023
whitneywhtsang added a commit that referenced this pull request Jan 25, 2023
whitneywhtsang added a commit that referenced this pull request Jan 27, 2023
whitneywhtsang added a commit that referenced this pull request Feb 17, 2023
whitneywhtsang added a commit that referenced this pull request Mar 1, 2023
whitneywhtsang added a commit that referenced this pull request Mar 27, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
sycl-mlir Pull requests or issues for sycl-mlir branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants