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

[SYCL][ESIMD][EMU] Enabling ESIMD_EMULATOR #582

Closed

Conversation

dongkyunahn-intel
Copy link

  • Disabling esimd_emulator for host_apis.cpp
  • Filtering out extra-printouts from CM_EMU library supporting ESIMD_EMULATOR

- Disabling esimd_emulator for host_apis.cpp
- Filtering out extra-printouts from CM_EMU library supporting ESIMD_EMULATOR
@@ -1,5 +1,5 @@
// RUN: sycl-ls --verbose | grep "Device \[" | wc -l >%t.verbose.out
// RUN: sycl-ls | wc -l >%t.concise.out
// RUN: sycl-ls | grep "^\[[a-z0-9_]*:[a-z]*:[0-9]*\]\ " | wc -l >%t.concise.out

Choose a reason for hiding this comment

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

what is the weird filter doing and can we please avoid it?

Copy link
Author

Choose a reason for hiding this comment

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

With the ESIMD_EMULATOR support, sycl-ls application prints out like below.

EMU: *** Warning no kernel information query method is supported in current build.
EMU: [kernel support,critical] kernel data query via debug data is not supported in current build.
EMU: [kernel support] *** Warning kernel  arguments data is not found.
[ext_intel_esimd_emulator:gpu:0] Intel(R) ESIMD_EMULATOR/GPU, ESIMD_EMULATOR 1.0.7-CM_EMU [0.1.0]
[host:host:0] SYCL host platform, SYCL host device 1.2 [1.2]

CM_EMU library supporting ESIMD_EMULATOR could print out extra info for debugging - like first three lines of above. It cannot be controlled from SYCL as it is from CM_EMU and CM_EMU prints out them by default. This change is to filter out such extra info for comparison between outputs from 'verbose' output and 'concise' output.

There is ongoing internal discussion for controlling printouts from CM_EMU. As soon as it is decided how these printouts are controlled and applied in CM_EMU, I'm going to remove this filtering.

Copy link

@vladimirlaz vladimirlaz left a comment

Choose a reason for hiding this comment

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

It is unclear how ESIMD_EMU should be treated.
Physically it is a separate backend so LIT infra should be aware of it so we can filter tests for this BE. I think we need to enable esimd_emu (or any other wording) feature which can be used in UNSUPPORTED:REQUIRES:XFAIL rules.

For now it is not enabling but fixing single test

@dongkyunahn-intel
Copy link
Author

@vladimirlaz,

It is unclear how ESIMD_EMU should be treated. Physically it is a separate backend so LIT infra should be aware of it so we can filter tests for this BE. I think we need to enable esimd_emu (or any other wording) feature which can be used in UNSUPPORTED:REQUIRES:XFAIL rules.

For now it is not enabling but fixing single test

"Physically it is a separate backend so LIT infra should be aware of it so we can filter tests for this BE"
-> How can I do this? What file should I modify?

@vladimirlaz
Copy link

You can use #348 as example. There ROCm BE was added (recently renamed to HIP)

@kbobrovs
Copy link

@vladimirlaz, @dongkyunahn-intel - ESIMD EMU plugin/backend can't run non-ESIMD kernels by definition. See this comment.

So in the test suite we probably need to mark all generic (non-ESIMD) SYCL tests as unsupported for esimd_emulator device.
Another solution would be not to run tests for esimd_emulator at all, and have additional RUN: command in each ESIMD test which would run the test with esimd_emulator. But that would hinder test case analysis and quality estimation (test can now fail either because of GPU driver problems or esimd emulator problems).

@vladimirlaz
Copy link

@vladimirlaz, @dongkyunahn-intel - ESIMD EMU plugin/backend can't run non-ESIMD kernels by definition.

I prefer to follow the semantic of esimd_emulator: "it is a separate backend with a single device of the "GPU" type."
We need to:

  • add esimd_emulator backend/feature in SYCL LIt infrastructure;
  • mark generic tests which cannot be executed on esimd_emulator RT as // UNSUPPORTED: esimd_emulator.

@dongkyunahn-intel
Copy link
Author

I prefer to follow the semantic of esimd_emulator: "it is a separate backend with a single device of the "GPU" type." We need to:

  • add esimd_emulator backend/feature in SYCL LIt infrastructure;
  • mark generic tests which cannot be executed on esimd_emulator RT as // UNSUPPORTED: esimd_emulator.

I'm working on these items - adding either 'UNSUPPORTED' or 'XFAIL' for ESIMD kernels with details like 'missing implementation'.

With TODO details for
- Missing '__esimd_*' memory intrinsics
- Missing '()' operator
- 'single_task()' support
- 'online compiler' support
- Timeout
- 'vadd_1d' and 'sycl_esimd_mix' are duplicated to
'esimd_check_vc_codegen.cpp' and 'sycl_esimd_mix_check_build_opts.cpp'
so that original kernels can run with esimd_emulator without 'CHECK'
commands and duplicated kernels can run with opencl/level_zero
backends with 'CHECK'
@dongkyunahn-intel dongkyunahn-intel requested a review from a team as a code owner December 13, 2021 23:31
@dongkyunahn-intel
Copy link
Author

@vladimirlaz , how can I disable (or exclude) tests failing due to timeout? Can I put 'XFAIL' for them?

@vladimirlaz
Copy link

how can I disable (or exclude) tests failing due to timeout? Can I put 'XFAIL' for them?
@dongkyunahn-intel, For the tests that failed due to timeout but are expected to be passed we follow the following process:

  • create an issue for the problem;
  • we disable them by adding lines below with reference to the issue.
// TODO: Disable due to timeout: intel/llvm#issuenumber
// REQUIRE: TEMPORARY_DISABLED```

@dongkyunahn-intel
Copy link
Author

@vladimirlaz , I resolved two timeouts with esimd_emulator backend without adding TEMPORARY_DISABLED.

One was because of oversized matrix. The kernel (matrix_tranpose_glb.cpp) passes without timeout - it took about 1 hour to complete locally. I set matrix size upper limit for the kernel if backend is esimd_emulator.

The other was because unsupported feature. esimd_emulator is only for ESIMD kernels - i.e. esimd_emulator is not supposed to support generic SYCL kernels. The failing sycl_esimd_mix.cpp is mixture of ESIMD and SYCL kernels. I marked UNSUPPORTED: esimd_emulator` for the kernel .

@@ -6,6 +6,7 @@
//
// Failing on HIP AMD
// XFAIL: hip_amd
// UNSUPPORTED: esimd_emulator
Copy link

@ghost ghost Jan 11, 2022

Choose a reason for hiding this comment

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

If I right understand, the test just checks the device parameters and doesn't run any kernels. Should we disable the test for esimd_emulator?

@dongkyunahn-intel
Copy link
Author

Closing as this PR is no longer valid.

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.

4 participants