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

[SYCL][ESIMD] Ignore warning messages from CM_EMU for esimd_emulator #626

Conversation

dongkyunahn-intel
Copy link

  • Warning messages from CM_EMU library for esimd_emulator cause
    failures for 'CHECK' and 'diff' commands

  • 'XFAIL:esimd_emulator' is marked for tests using 'CHECK' command

  • 'grep' command is inserted in pipeline for 'sycl-ls.cpp' test in
    order to filter out those warning messages

- Warning messages from CM_EMU library for esimd_emulator cause
failures for 'CHECK' and 'diff' commands

- 'XFAIL:esimd_emulator' is marked for tests using 'CHECK' command

- 'grep' command is inserted in pipeline for 'sycl-ls.cpp' test in
order to filter out those warning messages
@@ -1,5 +1,11 @@
// UNSUPPORTED: cuda || hip
// CUDA and HIP don't support printf.

// esimd_emulator : Warning messages from CM_EMU library for emulation

Choose a reason for hiding this comment

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

@kbobrovs do you think these comments need to be guarded with the ESIMD Intel feature?

Choose a reason for hiding this comment

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

@vzakhari - no, I don't think it needs to, as this is public feature. But all non-ESIMD tests should be guarded with // UNSUPPORTED: esimd_emulator, as this BE can only run ESIMD tests.

Choose a reason for hiding this comment

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

So, @dongkyunahn-intel, why bother adding // XFAIL: esimd_emulator rather than // UNSUPPORTED: esimd_emulator? Do you expect this test to pass in future?

Copy link
Author

Choose a reason for hiding this comment

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

'XFAIL' is already added below - line 7.

Choose a reason for hiding this comment

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

Please re-read my question. XFAIL should not be there.

smaslov-intel
smaslov-intel previously approved these changes Dec 16, 2021
Copy link

@smaslov-intel smaslov-intel left a comment

Choose a reason for hiding this comment

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

LGTM

@vladimirlaz vladimirlaz requested a review from vzakhari December 21, 2021 05:34
vladimirlaz
vladimirlaz previously approved these changes Dec 21, 2021
vzakhari
vzakhari previously approved these changes Dec 21, 2021
Copy link

@vzakhari vzakhari left a comment

Choose a reason for hiding this comment

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

DeviceLib LGTM

Copy link

@bader bader left a comment

Choose a reason for hiding this comment

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

Warning messages from CM_EMU library for esimd_emulator cause
failures for 'CHECK' and 'diff' commands

@dongkyunahn-intel, could you elaborate on the problem, please?
I'm not sure what scenarios are impacted. It looks like warnings appears for the test not using ESIMD feature, which means that it might impact any new test we add. If so, I don't think that adding "UNSUPPORTED: esimd_emulator" is the solution we want here.

@dongkyunahn-intel
Copy link
Author

Warning messages from CM_EMU library for esimd_emulator cause
failures for 'CHECK' and 'diff' commands

@dongkyunahn-intel, could you elaborate on the problem, please? I'm not sure what scenarios are impacted. It looks like warnings appears for the test not using ESIMD feature, which means that it might impact any new test we add. If so, I don't think that adding "UNSUPPORTED: esimd_emulator" is the solution we want here.

Failure caused warning message is discussed here - #582 (comment).

'UNSUPPORTED' marking was applied for other non-ESIMD tests failing with 'esimd_emulator' per Konst's suggestion - 4ab7155.

@bader
Copy link

bader commented Dec 23, 2021

Failure caused warning message is discussed here - #582 (comment).

From the comment: "CM_EMU library supporting ESIMD_EMULATOR could print out extra info for debugging - like first three lines of above."
What does "could print" mean?
It looks like this PR updates half of all existing tests in the suite.
Imagine I'm adding a new test. How do I know if this message is printed and I need put an extra line to disable the test?
This sounds very inconvenient for test developers.

I suggest we treat cm emulator the same way to treat other external dependencies (e.g. OpenCL drivers). We have documented versions of these dependencies, which we tested and know won't cause too much troubles to our users (see https://github.com/intel/llvm/blob/sycl/buildbot/dependency.conf). We regularly test new versions and update this document if new versions pass testing and block updates if new version regress testing.
This issue sound like to be critical enough to block the update of cm emulator and wait for a fixed version.
Can we do that?

@dongkyunahn-intel
Copy link
Author

From the comment: "CM_EMU library supporting ESIMD_EMULATOR could print out extra info for debugging - like first three lines of above." What does "could print" mean?

CM_EMU prints out various messages depending on environment variable setup like CM_RT_PLATFORM. What I tried to do with this PR was to ignore failures from those messages. There is on-going work for this log message suppression in CM_EMU side. Until CM_EMU is updated for this suppression, we need to ignore failures cause by those messages.

It looks like this PR updates half of all existing tests in the suite. Imagine I'm adding a new test. How do I know if this message is printed and I need put an extra line to disable the test? This sounds very inconvenient for test developers.

I think what you mean by 'half of all existing tests' is UNSUPPORTED marking. ESIMD_EMULATOR backend is supposed to be used only for kernels written for ESIMD. Because of this intention, other tests written for Non-ESIMD could fail because of features unsupported from ESIMD - like group. In order to filter out failures like this while merging some changes in intel/llvm, UNSUPPORTED marking needs to be inserted to many failing ones. My plan was to create another PR for this marking after this PR in order to clarify intention of each PR. However, Konst suggested applying this marking like my mention above.

@bader
Copy link

bader commented Jan 11, 2022

Maybe it would be better to add specific run command to run the test on ESIMD device (HW or emulator) like it's done for FPGA.
For example:

// RUN: %ESIMD_RUN_PLACEHOLDER %t.out &> %t.txt || true

This allows us to explicitly opt-in tests.
BTW, IIRC, all ESIMD tests are located in separate directory, so another option is configure LIT runner to use ESIMD emulator only for the tests in this directory.

@dongkyunahn-intel
Copy link
Author

// RUN: %ESIMD_RUN_PLACEHOLDER %t.out &> %t.txt || true

Should the line above be added to all tests? Or only ESIMD tests?

@kbobrovs , what do you think of @bader 's suggestion?

@kbobrovs
Copy link

@bader, yes, we thought of such way of running tests. But I think this discords with overall lit testing approach, where device to run on is selected at the time of running the tests. All ESIMD test should run on both GPU and host emulation, and it is quite convenient to be able to run on host emulation only when Intel GPU device is not available. On the other hand, only ESIMD tests can run on host emulation, and we have to mark all other ones as UNSUPPORTED on non-emulator devices (or REQUIRE emulator device). Not sure what's best solution here.
Adding @vladimirlaz for possible comments.

@bader
Copy link

bader commented Jan 12, 2022

I'm strongly against forcing additional markings for non-ESIMD tests. These must be applied by default implicitly.

@dongkyunahn-intel
Copy link
Author

dongkyunahn-intel commented Jan 12, 2022

@kbobrovs , can I merge this PR only for ignoring failures from CM_EMU warning logs after reverting changes for 'UNSUPPORTED' marking? My intel/llvm PR (intel/llvm#5058) is blocked because of warning messages - not because of lack of 'UNSUPPORTED' marking.

I would like to have discussion on this marking in another PR.

@lsatanov
Copy link

lsatanov commented Jan 13, 2022

@kbobrovs , can I merge this PR only for ignoring failures from CM_EMU warning logs after reverting changes for 'UNSUPPORTED' marking? My intel/llvm PR (intel/llvm#5058) is blocked because of warning messages - not because of lack of 'UNSUPPORTED' marking.

I would like to have discussion on this marking in another PR.

Hi. As of recent, warnings are not displayed by default in EMU, this should not be a problem anymore.

@dongkyunahn-intel
Copy link
Author

Hi. As of recent, warnings are not displayed by default in EMU, this should not be a problem anymore.

This change has not been propagated to open-source CM_EMU git repo where ESIMD_EMULATOR building process downloads source file from (https://github.com/intel/cm-cpu-emulation). I'm waiting for it.

@kbobrovs
Copy link

@kbobrovs , can I merge this PR

@dongkyunahn-intel, no, I don't think so, as @bader objects. We need some other solution

I would like to have discussion on this marking in another PR.

Are you going to close this one then? I'm little lost WRT to plans on this and other ESIMD emulator PRs.

@dongkyunahn-intel
Copy link
Author

Closing this PR as warning message suppression from CM_EMU is applied in intel/llvm#5058.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants