intel / intel/llvm

Track all customizations that are made in llvm-spirv in intel/llvm

Open
#7,592 14 comments 0 reactions 2 assignees Claimed by @asudarsa View on GitHub
confirmed enhancement SPIR-V
Dominant language
LLVM
Stars
1.5k
Forks
854
Avg merge
3d 17h
Merged PRs (30d)
137

Description

The goal is to keep intel/llvm's llvm-spirv on par with https://github.com/KhronosGroup/SPIRV-LLVM-Translator as much as possible. I'm not expecting it to be always on par, since some patches in https://github.com/KhronosGroup/SPIRV-LLVM-Translator requires appropriate update on devices' drivers in CI here, so the list should be updated.

**Following patches are missing** in this repository in comparison to https://github.com/KhronosGroup/SPIRV-LLVM-Translator :
- [x] 1. [Add SPIR-V 1.4 checks](https://github.com/KhronosGroup/SPIRV-LLVM-Translator/commit/c5b3c8e3283b ). It's going to be resolved by https://github.com/intel/llvm/pull/7493 , but it's blocked by GPU driver updates on windows.
- [x] 2. [Add an entry point wrapper around functions (llvm pass)](https://github.com/KhronosGroup/SPIRV-LLVM-Translator/commit/85815e725ce5bdc970b812b4bbff73d4b2a44046) . It depends on a patch 1.
- [x] 3. [Translate function attributes (incl. parameter attrs) for entry point kernels](https://github.com/KhronosGroup/SPIRV-LLVM-Translator/commit/aded5afb04f02b1b057db96cd9a8a5e9d1ff47fc) . It depends on a patch 2.
- [x] 4. [Fix the collection of entry point interfaces](https://github.com/KhronosGroup/SPIRV-LLVM-Translator/pull/1334) It depends on a patch 2.
- [ ] 5. [Align translation of OpCooperativeMatrixLengthKHR to match the spec](https://github.com/KhronosGroup/SPIRV-LLVM-Translator/commit/197a800558787c9) reverted in #17192
- [ ] 6. [Translate icmp eq and icmp ne to PtrEqual and PtrNotEqual respectively](https://github.com/KhronosGroup/SPIRV-LLVM-Translator/commit/5e0f14b5a09d961) reverted by c4be8858f391563a63f18ba55dc73ca13c680fcb
- [ ] 7. [Fix DebugFunction Parent when DISubprogram is scoped in DIModule](https://github.com/KhronosGroup/SPIRV-LLVM-Translator/commit/ce41b712b88b468044d5e6f2e48a898eb8a2a660) reverted in #22876

**This repository adds extra code:**
- [x] 1. [In SPIRVRegularizeLLVM.cpp](https://github.com/intel/llvm/blob/sycl/llvm-spirv/lib/SPIRV/SPIRVRegularizeLLVM.cpp#L415) we have a 'handling' of freeze instruction. We should either upstream W/A or implement a proper handling of the instruction in Khronos. See https://github.com/KhronosGroup/SPIRV-LLVM-Translator/issues/1140 for reference.
- [x] 2. [This PR](https://github.com/intel/llvm/pull/7632) adds a W/A to replace GEP on ID-related builtin GVs with `extractelement` instruction. Need to remove it, when we have a fix in SPIR-V consumer propagated to intel/llvm's CI as part of driver updates.
- [ ] 3. Added disable-spirv-tools LIT parameter to llvm-spirv tests to explicitly disable using spirv-tools in intel/llvm CI (https://github.com/intel/llvm/pull/16743). These changes will be reverted once the test failures are fixed.
- [ ] 4. Workaround for lifetime intrinsics translation (last time added in #22876)

**This repository removes some code:**
- [x] 1. [This PR](https://github.com/intel/llvm/pull/7669) adds W/A that removes `FunctionParameterAttributeNoReadWrite`, need to return it.
- [ ] 2. [This PR](https://github.com/intel/llvm/pull/12923) Removes binding between FPFastMathModeINTEL capability and SPV_INTEL_fp_fast_math_mode extension.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.