diff --git a/.buildkite/pipeline.yml b/.buildkite/pipeline.yml index 9db467c8..7cd9f046 100644 --- a/.buildkite/pipeline.yml +++ b/.buildkite/pipeline.yml @@ -1,9 +1,16 @@ +# Commit message tags select what to run: `[only X]` runs only the listed steps, `[skip X]` +# skips them, where X is a comma-separated list of: `tests` (all steps), `julia` (released +# Julia versions), `nightly`, `special`. Draft pull requests only test the newest Julia +# release and nightly, unless steps are selected explicitly. See also GPUCompiler.jl's CI, +# which uses the same tags. steps: # Test supported Julia versions - group: ":julia: Julia" key: "julia" steps: - - label: "Julia {{matrix.julia}}" + # the newest release, also tested on draft pull requests + - &julia + label: "Julia {{matrix.julia}}" plugins: - JuliaCI/julia#v1: version: "{{matrix.julia}}" @@ -18,20 +25,37 @@ steps: queue: "oneapi" commands: | julia --project=deps deps/build_ci.jl - if: build.message !~ /\[skip tests\]/ + if: | + build.message !~ /\[skip [^\]]*(tests|julia)/ && + (build.message =~ /\[only [^\]]*(tests|julia)/ || build.message !~ /\[only /) timeout_in_minutes: 120 + matrix: + setup: + julia: + - "1.13" + + # older releases + - <<: *julia + if: | + build.message !~ /\[skip [^\]]*(tests|julia)/ && + (build.message =~ /\[only [^\]]*(tests|julia)/ || + build.message !~ /\[only / && !build.pull_request.draft) matrix: setup: julia: - "1.10" - "1.11" - "1.12" - - "1.13" + + - <<: *julia + if: | + build.message !~ /\[skip [^\]]*(tests|nightly)/ && + (build.message =~ /\[only [^\]]*(tests|nightly)/ || build.message !~ /\[only /) + soft_fail: true + matrix: + setup: + julia: - "nightly" - adjustments: - - with: - julia: "nightly" - soft_fail: true # Special tests - group: ":eyes: Special" @@ -55,14 +79,16 @@ steps: # use debug JLLs, for asserts + better backtraces using oneAPI oneAPI.set_debug!(true)' - if: build.message !~ /\[skip tests\]/ env: ZE_ENABLE_VALIDATION_LAYER: '1' ZE_ENABLE_PARAMETER_VALIDATION: '1' EnableDebugBreak: '0' agents: queue: "oneapi" - if: build.message !~ /\[skip tests\]/ && !build.pull_request.draft + if: | + build.message !~ /\[skip [^\]]*(tests|special)/ && + (build.message =~ /\[only [^\]]*(tests|special)/ || + build.message !~ /\[only / && !build.pull_request.draft) timeout_in_minutes: 60 soft_fail: true diff --git a/src/compiler/execution.jl b/src/compiler/execution.jl index 6c9bf86a..20742c2d 100644 --- a/src/compiler/execution.jl +++ b/src/compiler/execution.jl @@ -156,10 +156,18 @@ Adapt.adapt_structure(to::KernelAdaptor, r::Base.RefValue{<:Union{DataType,Type} oneRefType{r[]}() # case where type is the function being broadcasted +# (on Julia 1.14, the function type parameter is `Core.TypeEgal{T} <: Type{T}`) Adapt.adapt_structure(to::KernelAdaptor, - bc::Broadcast.Broadcasted{Style, <:Any, Type{T}}) where {Style, T} = + bc::Broadcast.Broadcasted{Style, <:Any, <:Type{T}}) where {Style, T} = Broadcast.Broadcasted{Style}((x...) -> T(x...), adapt(to, bc.args), bc.axes) +# functions that capture a type, e.g., `Base.Fix1(convert, T)` as used by LinearAlgebra, +# which isn't a valid kernel argument either +Adapt.adapt_structure(to::KernelAdaptor, f::Base.Fix1{<:Any, <:Type{T}}) where {T} = + let g = adapt(to, f.f); (x...) -> g(T, x...) end +Adapt.adapt_structure(to::KernelAdaptor, f::Base.Fix2{<:Any, <:Type{T}}) where {T} = + let g = adapt(to, f.f); (x...) -> g(x..., T) end + """ kernel_convert(x) diff --git a/src/device/quirks.jl b/src/device/quirks.jl index cbd4c520..942fd1a3 100644 --- a/src/device/quirks.jl +++ b/src/device/quirks.jl @@ -31,6 +31,14 @@ end # abstractarray.jl @device_override @noinline Base.throw_boundserror(A, I) = @gputhrow "BoundsError" "Out-of-bounds array access" +# Julia 1.14 routes indexed bounds errors through `_throw_boundserror_indices` +# rather than `throw_boundserror`, bypassing the override above. +@static if isdefined(Base, :_throw_boundserror_indices) + @device_override @noinline Base._throw_boundserror_indices(A) = + @gputhrow "BoundsError" "Out-of-bounds array access" + @device_override @noinline Base._throw_boundserror_indices(A, i1, I...) = + @gputhrow "BoundsError" "Out-of-bounds array access" +end # trig.jl @device_override @noinline Base.Math.sincos_domain_error(x) =