-
Notifications
You must be signed in to change notification settings - Fork 754
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
[CI] Add clang-format checker to pre-commit checks #1163
Conversation
Signed-off-by: Alexey Bader <alexey.bader@intel.com>
Signed-off-by: Alexey Bader <alexey.bader@intel.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Otherwise, perfect
Signed-off-by: Alexey Bader alexey.bader@intel.com Co-Authored-By: Alexander Batashev <alexbatashev@outlook.com>
# Add patch with formatting fixes to CI job artifacts | ||
- uses: actions/upload-artifact@v1 | ||
with: | ||
name: clang-format-patch | ||
path: ./clang-format.patch |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is the purpose if this step? Would it be possible to download this patch-file somehow?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes. You will be able to download the patch and apply it to your PR to fix formatting issues.
This feature was inspired by similar functionality of LLVM project pre-commit check.
…ages_docs * origin/sycl: (1092 commits) [CI] Add clang-format checker to pre-commit checks (intel#1163) [SYCL][CUDA] Initial CUDA backend support (intel#1091) [USM] Align OpenCL USM extension header with the specification (intel#1162) [SYCL][NFC] Fix unreferenced variable warning (intel#1158) [SYCL] Fix __spirv_GroupBroadcast overloads (intel#1152) [SYCL] Add llvm/Demangle link dependency for llvm-no-spir-kernel (intel#1156) [SYCL] LowerWGScope pass should not be skipped when -O0 is used [SYCL][Doc][USM] Add refactored pointer and device queries to USM spec (intel#1118) [SYCL] Update the kernel parameter rule to is-trivially-copy-construc… (intel#1144) [SYCL] Move internal headers to source dir (intel#1136) [SYCL] Forbid declaration of non-const static variables inside kernels (intel#1141) [SYCL][NFC] Remove idle space (intel#1148) [SYCL] Improve the error mechanism of llvm-no-spir-kernel (intel#1068) [SYCL] Added CTS test config (intel#1063) [SYCL] Implement check-sycl-deploy target (intel#1142) [SYCL] Preserve original message and code of kernel/program build result (intel#1108) [SYCL] Fix LIT after LLVM change in community Translate LLVM's cmpxchg instruction to SPIR-V Add volatile qualifier for atom_ builtins Fix -Wunused-variable warnings ...
In LLVM it is valid if addrspace cast result pointer has not only other address space, but also other element type. However spec states that for Storage Class changing instructions Result Type and Pointer must point to the same type. So, this patch adds a regularization step that adds an additional bitcast in case address space cast changes pointer element type as well and then everything can be easily translated to valid SPIR-V that is accepted by spirv-val. Original commit: KhronosGroup/SPIRV-LLVM-Translator@0161b32
Signed-off-by: Alexey Bader alexey.bader@intel.com