Conversation
validate_module() created an spv_context for spvValidateBinary() but never released it, leaking it on every translation. LeakSanitizer reports this for every test in the lit suite.
Replace the presubmit workflow inherited from upstream, which only built the project (and never ran here), with one that tests the translator the way it is used: - lit suite built with GCC 10, the compiler Yggdrasil builds the spirv2clc_jll binaries with; - lit suite under ASan and UBSan; - a macOS build (AppleClang/libc++) that runs the tool over every test input, since the lit suite needs an x86-64 clang; - OpenCL.jl's `poclc` tests, which run its test suite and the GPUArrays one on PoCL through the OpenCL C source path, with spirv2clc_jll overridden to use the binary built from this checkout; - a clang-format check of the lines a pull request changes. The lit suite and format check use LLVM 22 from apt.llvm.org: the tests rely on clang 22 declaring the cl_khr_subgroup_shuffle builtins by default. Also let check-format.sh take the base revision and check headers, and point the README badge at the new workflow.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Replaces the presubmit workflow inherited from upstream. That workflow only built the project and has never run on this fork. The new one tests spirv2clc the way it is actually used.
spirv2clc_jllpoclc/tests (its own tests plus the GPUArrays suite) on PoCL through the OpenCL C source path, with aspirv2clc_pathpreference pointingspirv2clc_jllat this checkout's binary, and a check that fails if the preference isn't in effect. Once JuliaGPU/OpenCL.jl#507 is merged, theversioninfoat the top of the test log also shows the override. PoCL reports OpenCL C 3.0, so this covers the--spirv-version=1.4 --cl-std=CL3.0translation OpenCL.jl does on modern devices, with the output compiled and run by a real OpenCL implementation.git clang-format-22on the changed linesNotes:
subgroup_shuffle_barrier.sptfails on clang 18–21 because they don't declaresub_group_shuffle*by default; that changed in [OpenCL] Add missing OpenCL 3.0 features to OpenCLExtensions.def; revert header-only macros llvm/llvm-project#168016. LLVM 22 comes from apt.llvm.org, the same setup as llvm-downgrade.llvm-22-toolsalso provideslitandFileCheck.spv_contextleak on every translation, found by the ASan job.tests/check-format.shnow takes a base revision and checks.hfiles.Found while checking OpenCL C versions, not addressed here: at
--cl-std=CL3.0, OpenCL C atomics are emitted asatomic_loadetc. Those need optional 3.0 features (__opencl_c_atomic_order_seq_cst/_scope_device) that a minimal 3.0 device like NVIDIA's may not have.