Skip to content

LLVM and SPIRV-LLVM-Translator pulldown (WW36) #6748

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

Merged
merged 3,221 commits into from
Sep 15, 2022

Conversation

dbudanov-cmplr
Copy link
Contributor

MaskRay and others added 30 commits September 3, 2022 14:29
…numbers for vectorization and parallelization options.

The SparseTensor passes currently use opaque numbers for the CLI, despite using an enum internally. This patch exposes the enums instead of numbered items that are matched back to the enum.

Fixes llvm/llvm-project#53389

Differential Revision: https://reviews.llvm.org/D123876

Please also see:
https://reviews.llvm.org/D118379
https://reviews.llvm.org/D117919
GCC from 11 onwards defaults to -std=gnu++17 for C++ source files. We want to do the same
(https://discourse.llvm.org/t/c-objc-switch-to-gnu-17-as-the-default-dialect/64360).
Split RUN lines, adjust `-verify`, or add `__cplusplus < 201703L` or `-Wno-dynamic-exception-spec`,
so that tests will pass regardless of gnu++14/gnu++17 default.

We have a desire to mark a test compatible with multiple language standards.
There are ongoing discussions how to add markers in the long term:

* https://discourse.llvm.org/t/iterating-lit-run-lines/62596
* https://discourse.llvm.org/t/lit-run-a-run-line-multiple-times-with-different-replacements/64932

As a workaround in the short term, add lit substitutions `%std_cxx98-`,
`%std_cxx11-14`, etc. They can be used for tests which work across multiple
language standards. If a range has `n` standards, run lit multiple times, with
`LIT_CLANG_STD_GROUP=0`, `LIT_CLANG_STD_GROUP=1`, etc to cover all `n` standards.

Reviewed By: #clang-language-wg, aaron.ballman

Differential Revision: https://reviews.llvm.org/D131464
Identified with modernize-loop-convert.
This was achieved using the 'cost-tables vs llvm-mca' script D103695

Also fix a missing pmullw v16i16 half-rate throughput as znver1 double-pumps - matches numbers from AMD SoG + Agner
These are handled earlier (and more accurately) in AVX512BWShiftCostTable
llvm/lib/Frontend/OpenMP/OMPIRBuilder.cpp:3397:27: warning: unused variable 'SV' [-Werror]
  for (const llvm::Value *SV : StoreValues)
                            ^
…TblEntry

Begin the refactoring to use CostKindTblEntry and return real latency/codesize/sizelatency costs instead of reusing the throughput numbers
Or else compiler-rt/lib/fuzzer/FuzzerUtilLinux.cpp fails to compile
on FreeBSD.
…etTypeBasedIntrinsicInstrCost - convert to CostKindTblEntry"

Some arm buildbots are complaining about a phase ordering test failure in unsigned-multiply-overflow-check.ll - I guess this test needs making x86 specific first
…TblEntry

Begin the refactoring to use CostKindTblEntry and return real latency/codesize/sizelatency costs instead of reusing the throughput numbers
This was achieved using the 'cost-tables vs llvm-mca' script from D103695

Some of the znver1/znver2 latency/throughput numbers were really weird (some copy+paste afaict) - I've used the numbers from the AMD SoG, which roughly match the 'worst case' range value from Agner
…ruct

This patch adds private/firstprivate support for sections construct. For
a source like the following:

```
!$omp sections private(x) firstprivate(y)
    !$omp section
        <block of code>
    !$omp section
        <block of code>
!$omp end sections
```
...privatization proceeds to privatize `x` and `y` accordingly
inside each of the generated `omp.section` operations.

Reviewed By: peixin

Differential Revision: https://reviews.llvm.org/D131463
This patch introduces a new checker, called NewArraySize checker,
which detects if the expression that yields the element count of
the array in new[], results in an Undefined value.

Differential Revision: https://reviews.llvm.org/D131299
@bader
Copy link
Contributor

bader commented Sep 13, 2022

llvm-spirv/.clang-tidy has a little bit different history due to these issues introduced. We checked that currently it's matching upstream.

I think you mean here is that "it will match the upstream after WW36 pulldown will be merged". Right?

@pvchupin
Copy link
Contributor

@dbudanov-cmplr, I cherry-picked documentation generation fix
There are these issues left:

  • SYCL :: ESIMD/aot_mixed.cpp
  • --shared-libs build with clang

@pvchupin
Copy link
Contributor

@v-klochkov, @kbobrovs, can you take a look into SYCL :: ESIMD/aot_mixed.cpp one?

@dbudanov-cmplr
Copy link
Contributor Author

@v-klochkov, @kbobrovs, can you take a look into SYCL :: ESIMD/aot_mixed.cpp one?

@aelovikov-intel could you check if this is the same issues as in intel/llvm-test-suite#1256?

@aelovikov-intel
Copy link
Contributor

@v-klochkov, @kbobrovs, can you take a look into SYCL :: ESIMD/aot_mixed.cpp one?

@aelovikov-intel could you check if this is the same issues as in intel/llvm-test-suite#1256?

Where is the link to the fail output?

@dbudanov-cmplr
Copy link
Contributor Author

@v-klochkov, @kbobrovs, can you take a look into SYCL :: ESIMD/aot_mixed.cpp one?

@aelovikov-intel could you check if this is the same issues as in intel/llvm-test-suite#1256?

Where is the link to the fail output?

it was https://github.com/intel/llvm/actions/runs/3041366082/jobs/4898814666

@aelovikov-intel
Copy link
Contributor

aelovikov-intel commented Sep 13, 2022

That looks different to what I'm trying to fix in intel/llvm-test-suite#1256

I'm trying to address runtime exception when we try to use gen9 binary on a newer gen device (TGL in our Windows CI).

@dbudanov-cmplr
Copy link
Contributor Author

@v-klochkov, @kbobrovs, can you take a look into SYCL :: ESIMD/aot_mixed.cpp one?
Talked with @v-klochkov, he suggested to create a JIRA and mark the test as XFAIL and continue pulldown.

@dbudanov-cmplr
Copy link
Contributor Author

dbudanov-cmplr commented Sep 13, 2022

Created issue for aot_mixed

Pavel V Chupin added 2 commits September 13, 2022 12:02
This might be an FE bug. Will follow up separately. Workaround should be
fine to unblock pulldown.
Mutex changes could be reverted if/when this change lands:
https://reviews.llvm.org/D133425
@dbudanov-cmplr
Copy link
Contributor Author

@pvchupin do you have an idea who can solve the problem with ESIMD Emu llvm test suite?
It seems like CI/configuration issue.

Error: Unable to find an artifact with the name: sycl_linux_default
Run actions/upload-artifact@v1
Error: Path does not exist /localdisk/github/_work/llvm/llvm/build/results_esimd_emu_default.json
Error: Exit code 1 returned from process: file name '/localdisk/github/bin.2.296.2/Runner.PluginHost', arguments 'action "GitHub.Runner.Plugins.Artifact.PublishArtifact, Runner.Plugins"'.

Do you think we can move forward and merge the PR since this is the only issue which remains.

@pvchupin
Copy link
Contributor

@pvchupin do you have an idea who can solve the problem with ESIMD Emu llvm test suite? It seems like CI/configuration issue.

Error: Unable to find an artifact with the name: sycl_linux_default Run actions/upload-artifact@v1 Error: Path does not exist /localdisk/github/_work/llvm/llvm/build/results_esimd_emu_default.json Error: Exit code 1 returned from process: file name '/localdisk/github/bin.2.296.2/Runner.PluginHost', arguments 'action "GitHub.Runner.Plugins.Artifact.PublishArtifact, Runner.Plugins"'.

Do you think we can move forward and merge the PR since this is the only issue which remains.

@dbudanov-cmplr, yes, looks like network glitch. I've restarted.

@pvchupin
Copy link
Contributor

New fails on ESIMD Emu target:

********************
Failed Tests (5):
  SYCL :: dword_atomic_smoke.cpp
  SYCL :: lsc/lsc_fence.cpp
  SYCL :: lsc/lsc_slm.cpp
  SYCL :: lsc/lsc_surf.cpp
  SYCL :: lsc/lsc_usm.cpp

********************
Unexpectedly Passed Tests (1):
  SYCL :: spec_const/spec_const_double.cpp

@dongkyunahn-intel, @v-klochkov can you address please?

@dongkyunahn-intel
Copy link
Contributor

New fails on ESIMD Emu target:

********************
Failed Tests (5):
  SYCL :: dword_atomic_smoke.cpp
  SYCL :: lsc/lsc_fence.cpp
  SYCL :: lsc/lsc_slm.cpp
  SYCL :: lsc/lsc_surf.cpp
  SYCL :: lsc/lsc_usm.cpp

********************
Unexpectedly Passed Tests (1):
  SYCL :: spec_const/spec_const_double.cpp

@dongkyunahn-intel, @v-klochkov can you address please?

PR is ready : intel/llvm-test-suite#1264

Add deduction guide to kernel_bundle
@pvchupin
Copy link
Contributor

@dongkyunahn-intel, @v-klochkov, this one is not covered by the intel/llvm-test-suite#1264

Unexpectedly Passed Tests (1):
  SYCL :: spec_const/spec_const_double.cpp

Can you take a look?

@pvchupin
Copy link
Contributor

Remaining fails are unrelated.

@pvchupin
Copy link
Contributor

/merge

@bb-sycl
Copy link
Contributor

bb-sycl commented Sep 15, 2022

Thu 15 Sep 2022 02:32:17 PM UTC --- Start to merge the commit into sycl branch. It will take several minutes.

@bb-sycl
Copy link
Contributor

bb-sycl commented Sep 15, 2022

Thu 15 Sep 2022 02:36:16 PM UTC --- Merge the branch in this PR to base automatically. Will close the PR later.

@bb-sycl bb-sycl merged commit 295b4fa into intel:sycl Sep 15, 2022
@dongkyunahn-intel
Copy link
Contributor

@dongkyunahn-intel, @v-klochkov, this one is not covered by the intel/llvm-test-suite#1264

Unexpectedly Passed Tests (1):
  SYCL :: spec_const/spec_const_double.cpp

Can you take a look?

The unexpected pass was because the test returns '0' for backends that do not support FP64/double type. While ESIMD_EMULATOR can support FP64 type as native double type, the emulator Plug-in implementation answers request for extension info as if it does not support FP64 type. I fixed the problem in following PR.

#6796

With this PR, the test will fail as expected.

@yanfeng3721
Copy link
Contributor

Pre-ci RHEL Build fail(http://icl-jenkins.sc.intel.com:8080/blue/organizations/jenkins/SYCL_CI%2Fintel%2FPrecommit_Check_User/detail/Precommit_Check_User/12893/pipeline/89/), impact Linux nightly build.
The related error log is as below:

[2022-09-15T14:53:12.539Z] [868/2957] Building CXX object lib/CodeGen/AsmPrinter/CMakeFiles/LLVMAsmPrinter.dir/DebugLocStream.cpp.o

[2022-09-15T14:53:12.539Z] FAILED: lib/CodeGen/AsmPrinter/CMakeFiles/LLVMAsmPrinter.dir/DebugLocStream.cpp.o 

@pvchupin
Copy link
Contributor

pvchupin commented Sep 16, 2022

@yanfeng3721, thanks! I also noticed that. 01ffe31 is the reason.
It looks like llorg build is broken right now with gcc7.3. I've asked for revert at https://reviews.llvm.org/D132311

@pvchupin
Copy link
Contributor

It seems gcc7.5 works fine. Should we migrate?

@pvchupin
Copy link
Contributor

@yanfeng3721, community kindly reverted the change at llvm/llvm-project@29c841c
It should be pulled in with the next pulldown.
My question on 7.5 migration stays though...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
disable-lint Skip linter check step and proceed with build jobs
Projects
None yet
Development

Successfully merging this pull request may close these issues.