From 7fab1eaa183b245c56ad24bb3b3e8581ff9af330 Mon Sep 17 00:00:00 2001 From: Valentin Churavy Date: Thu, 7 Jan 2021 12:42:55 -0500 Subject: [PATCH 1/5] Split out CUDA backend Added new package CUDAKernels.jl Co-authored-by: Julian P Samaroo --- Project.toml | 4 +- examples/matmul.jl | 2 +- examples/memcopy.jl | 1 + examples/memcopy_static.jl | 1 + examples/mpi.jl | 3 +- examples/naive_transpose.jl | 2 +- examples/performance.jl | 4 +- lib/CUDAKernels/Project.toml | 20 ++++++++++ .../CUDAKernels/src/CUDAKernels.jl | 39 ++++++++++++++++--- src/KernelAbstractions.jl | 17 +++----- src/compiler.jl | 4 +- src/{backends => }/cpu.jl | 5 ++- src/reflection.jl | 16 ++++---- test/Project.toml | 1 + test/runtests.jl | 1 + 15 files changed, 85 insertions(+), 35 deletions(-) create mode 100644 lib/CUDAKernels/Project.toml rename src/backends/cuda.jl => lib/CUDAKernels/src/CUDAKernels.jl (88%) rename src/{backends => }/cpu.jl (98%) diff --git a/Project.toml b/Project.toml index 599481811..544e791a4 100644 --- a/Project.toml +++ b/Project.toml @@ -1,11 +1,10 @@ name = "KernelAbstractions" uuid = "63c18a36-062a-441e-b654-da1e3ab1ce7c" authors = ["Valentin Churavy "] -version = "0.5.3" +version = "0.6.0" [deps] Adapt = "79e6a3ab-5dfb-504d-930d-738a2a938a0e" -CUDA = "052768ef-5323-5732-b1bb-66c8b64840ba" Cassette = "7057c7e9-c182-5462-911a-8362d720325c" InteractiveUtils = "b77e0a4c-d291-57a0-90e8-8db25a27a240" MacroTools = "1914dd2f-81c6-5fcd-8719-6d5c9610ff09" @@ -15,7 +14,6 @@ UUIDs = "cf7118a7-6976-5b1a-9a39-7adc72f591a4" [compat] Adapt = "0.4, 1.0, 2.0, 3.0" -CUDA = "~1.0, ~1.1, ~1.2, 1.3, 2" Cassette = "0.3.3" MacroTools = "0.5" SpecialFunctions = "0.10, 1.0" diff --git a/examples/matmul.jl b/examples/matmul.jl index 2cf49a088..bca32163b 100644 --- a/examples/matmul.jl +++ b/examples/matmul.jl @@ -1,4 +1,4 @@ -using KernelAbstractions, Test, CUDA +using KernelAbstractions, CUDAKernels, Test, CUDA if has_cuda_gpu() CUDA.allowscalar(false) diff --git a/examples/memcopy.jl b/examples/memcopy.jl index 033ad1090..b6343e85a 100644 --- a/examples/memcopy.jl +++ b/examples/memcopy.jl @@ -1,4 +1,5 @@ using KernelAbstractions +using CUDAKernels using CUDA using Test diff --git a/examples/memcopy_static.jl b/examples/memcopy_static.jl index d11ddc98b..b9b19d338 100644 --- a/examples/memcopy_static.jl +++ b/examples/memcopy_static.jl @@ -1,4 +1,5 @@ using KernelAbstractions +using CUDAKernels using CUDA using Test diff --git a/examples/mpi.jl b/examples/mpi.jl index 2ae423266..369666df8 100644 --- a/examples/mpi.jl +++ b/examples/mpi.jl @@ -1,6 +1,7 @@ # EXCLUDE FROM TESTING using KernelAbstractions -using CUDA +using CUDAKernels +using CUDA if has_cuda_gpu() CUDA.allowscalar(false) diff --git a/examples/naive_transpose.jl b/examples/naive_transpose.jl index 943d3fbd4..82144a958 100644 --- a/examples/naive_transpose.jl +++ b/examples/naive_transpose.jl @@ -1,4 +1,4 @@ -using KernelAbstractions, Test, CUDA +using KernelAbstractions, CUDAKernels, Test, CUDA if has_cuda_gpu() CUDA.allowscalar(false) diff --git a/examples/performance.jl b/examples/performance.jl index a4554e137..537f0c1a7 100644 --- a/examples/performance.jl +++ b/examples/performance.jl @@ -1,4 +1,4 @@ -using KernelAbstractions, CUDA, Test +using KernelAbstractions, CUDAKernels, CUDA, Test using KernelAbstractions.Extras: @unroll has_cuda_gpu() || exit() @@ -199,4 +199,4 @@ for (name, kernel) in ( end end end -end \ No newline at end of file +end diff --git a/lib/CUDAKernels/Project.toml b/lib/CUDAKernels/Project.toml new file mode 100644 index 000000000..6fcfd8e1a --- /dev/null +++ b/lib/CUDAKernels/Project.toml @@ -0,0 +1,20 @@ +name = "CUDAKernels" +uuid = "72cfdca4-0801-4ab0-bf6a-d52aa10adc57" +authors = ["Valentin Churavy "] +version = "0.1.0" + +[deps] +Adapt = "79e6a3ab-5dfb-504d-930d-738a2a938a0e" +CUDA = "052768ef-5323-5732-b1bb-66c8b64840ba" +Cassette = "7057c7e9-c182-5462-911a-8362d720325c" +KernelAbstractions = "63c18a36-062a-441e-b654-da1e3ab1ce7c" +SpecialFunctions = "276daf66-3868-5448-9aa4-cd146d93841b" +StaticArrays = "90137ffa-7385-5640-81b9-e52037218182" + +[compat] +Adapt = "0.4, 1.0, 2.0, 3.0" +CUDA = "~1.0, ~1.1, ~1.2, 1.3, 2" +Cassette = "0.3.3" +KernelAbstractions = "0.6" +SpecialFunctions = "0.10, 1.0" +StaticArrays = "0.12, 1.0" diff --git a/src/backends/cuda.jl b/lib/CUDAKernels/src/CUDAKernels.jl similarity index 88% rename from src/backends/cuda.jl rename to lib/CUDAKernels/src/CUDAKernels.jl index 84ac884c7..6e36fe4a9 100644 --- a/src/backends/cuda.jl +++ b/lib/CUDAKernels/src/CUDAKernels.jl @@ -1,5 +1,14 @@ +module CUDAKernels + import CUDA import SpecialFunctions +import StaticArrays +import StaticArrays: MArray +import Cassette +import Adapt +import KernelAbstractions + +export CUDADevice const FREE_STREAMS = CUDA.CuStream[] const STREAMS = CUDA.CuStream[] @@ -44,6 +53,10 @@ function next_stream() end end +import KernelAbstractions: Event, CPUEvent, NoneEvent, MultiEvent, CPU, GPU, isdone, failed + +struct CUDADevice <: GPU end + struct CudaEvent <: Event event::CUDA.CuEvent end @@ -58,6 +71,8 @@ function Event(::CUDADevice) CudaEvent(event) end +import Base: wait + wait(ev::CudaEvent, progress=yield) = wait(CPU(), ev, progress) function wait(::CPU, ev::CudaEvent, progress=yield) @@ -113,7 +128,7 @@ function __pin!(a) return nothing end -function async_copy!(::CUDADevice, A, B; dependencies=nothing, progress=yield) +function KernelAbstractions.async_copy!(::CUDADevice, A, B; dependencies=nothing, progress=yield) A isa Array && __pin!(A) B isa Array && __pin!(B) @@ -131,7 +146,7 @@ function async_copy!(::CUDADevice, A, B; dependencies=nothing, progress=yield) return CudaEvent(event) end - +import KernelAbstractions: Kernel, StaticSize, DynamicSize, partition, blocks, workitems, launch_config ### # Kernel launch @@ -186,7 +201,7 @@ function (obj::Kernel{CUDADevice})(args...; ndrange=nothing, dependencies=nothin # If the kernel is statically sized we can tell the compiler about that if KernelAbstractions.workgroupsize(obj) <: StaticSize - maxthreads = prod(get(KernelAbstractions.workgroupsize(obj))) + maxthreads = prod(KernelAbstractions.get(KernelAbstractions.workgroupsize(obj))) else maxthreads = nothing end @@ -211,8 +226,12 @@ end Cassette.@context CUDACtx +import KernelAbstractions: CompilerMetadata, CompilerPass, DynamicCheck, LinearIndices +import KernelAbstractions: __index_Local_Linear, __index_Group_Linear, __index_Global_Linear, __index_Local_Cartesian, __index_Group_Cartesian, __index_Global_Cartesian, __validindex, __print +import KernelAbstractions: mkcontext, expand, __iterspace, __ndrange, __dynamic_checkbounds + function mkcontext(kernel::Kernel{CUDADevice}, _ndrange, iterspace) - metadata = CompilerMetadata{ndrange(kernel), DynamicCheck}(_ndrange, iterspace) + metadata = CompilerMetadata{KernelAbstractions.ndrange(kernel), DynamicCheck}(_ndrange, iterspace) Cassette.disablehooks(CUDACtx(pass = CompilerPass, metadata=metadata)) end @@ -251,7 +270,9 @@ end end end -generate_overdubs(CUDACtx) +import KernelAbstractions: groupsize, __groupsize, __workitems_iterspace, add_float_contract, sub_float_contract, mul_float_contract + +KernelAbstractions.generate_overdubs(@__MODULE__, CUDACtx) ### # CUDA specific method rewrites @@ -311,9 +332,12 @@ else const emit_shmem = CUDA._shmem end +import KernelAbstractions: ConstAdaptor, SharedMemory, Scratchpad, __synchronize, __size + ### # GPU implementation of shared memory ### + @inline function Cassette.overdub(ctx::CUDACtx, ::typeof(SharedMemory), ::Type{T}, ::Val{Dims}, ::Val{Id}) where {T, Dims, Id} ptr = emit_shmem(Val(Id), T, Val(prod(Dims))) CUDA.CuDeviceArray(Dims, ptr) @@ -341,3 +365,8 @@ end ### Adapt.adapt_storage(to::ConstAdaptor, a::CUDA.CuDeviceArray) = Base.Experimental.Const(a) + +# Argument conversion +KernelAbstractions.argconvert(k::Kernel{CUDADevice}, arg) = CUDA.cudaconvert(arg) + +end diff --git a/src/KernelAbstractions.jl b/src/KernelAbstractions.jl index f597cff31..4d1d09eaf 100644 --- a/src/KernelAbstractions.jl +++ b/src/KernelAbstractions.jl @@ -2,7 +2,7 @@ module KernelAbstractions export @kernel export @Const, @localmem, @private, @uniform, @synchronize, @index, groupsize, @print -export Device, GPU, CPU, CUDADevice, Event, MultiEvent, NoneEvent +export Device, GPU, CPU, Event, MultiEvent, NoneEvent export async_copy! @@ -330,9 +330,6 @@ abstract type Device end abstract type GPU <: Device end struct CPU <: Device end -struct CUDADevice <: GPU end -# struct AMD <: GPU end -# struct Intel <: GPU end include("nditeration.jl") using .NDIteration @@ -462,17 +459,10 @@ end end end -### -# Backends/Implementation -### - # Utils __size(args::Tuple) = Tuple{args...} __size(i::Int) = Tuple{i} -include("backends/cpu.jl") -include("backends/cuda.jl") - ### # Extras # - LoopInfo @@ -481,4 +471,9 @@ include("backends/cuda.jl") include("extras/extras.jl") include("reflection.jl") + +# CPU backend + +include("cpu.jl") + end #module diff --git a/src/compiler.jl b/src/compiler.jl index 14e6dd70a..e613d83a4 100644 --- a/src/compiler.jl +++ b/src/compiler.jl @@ -30,8 +30,8 @@ end include("compiler/contract.jl") include("compiler/pass.jl") -function generate_overdubs(Ctx) - @eval begin +function generate_overdubs(mod, Ctx) + @eval mod begin @inline Cassette.overdub(ctx::$Ctx, ::typeof(groupsize)) = __groupsize(ctx.metadata) @inline Cassette.overdub(ctx::$Ctx, ::typeof(__workitems_iterspace)) = workitems(__iterspace(ctx.metadata)) diff --git a/src/backends/cpu.jl b/src/cpu.jl similarity index 98% rename from src/backends/cpu.jl rename to src/cpu.jl index 821ae6495..3a8afb971 100644 --- a/src/backends/cpu.jl +++ b/src/cpu.jl @@ -208,7 +208,7 @@ end __print(items...) end -generate_overdubs(CPUCtx) +generate_overdubs(@__MODULE__, CPUCtx) # Don't recurse into these functions const cpufuns = (:cos, :cospi, :sin, :sinpi, :tan, @@ -263,3 +263,6 @@ end @inline function Cassette.overdub(ctx::CPUCtx, ::typeof(Base.getindex), A::ScratchArray{N}, idx) where N return @inbounds aview(A.data, ntuple(_->:, Val(N))..., idx) end + +# Argument conversion +KernelAbstractions.argconvert(k::Kernel{CPU}, arg) = arg diff --git a/src/reflection.jl b/src/reflection.jl index 27cd67fc2..5de480682 100644 --- a/src/reflection.jl +++ b/src/reflection.jl @@ -1,6 +1,8 @@ import InteractiveUtils export @ka_code_typed, @ka_code_llvm -using CUDA + +argconvert(k::Kernel{T}, arg) where T = + error("Don't know how to convert arguments for Kernel{$T}") using UUIDs const Cthulhu = Base.PkgId(UUID("f68482b8-f384-11e8-15f7-abe071a5a75f"), "Cthulhu") @@ -121,10 +123,8 @@ macro ka_code_typed(ex0...) quote local $(esc(args)) = $(old_args) - if isa($kern, Kernel{CUDADevice}) - # translate CuArray to CuDeviceArray - $(esc(args)) = map(CUDA.cudaconvert, $(esc(args))) - end + # e.g. translate CuArray to CuDeviceArray + $(esc(args)) = map(x->argconvert($kern, x), $(esc(args))) local results = $thecall if results !== nothing @@ -157,9 +157,9 @@ macro ka_code_llvm(ex0...) quote local $(esc(args)) = $(old_args) - if isa($kern, Kernel{CUDADevice}) - # does not support CUDA kernels - error("@ka_code_llvm does not support CUDA kernels") + if isa($kern, Kernel{G} where {G<:GPU}) + # does not support GPU kernels + error("@ka_code_llvm does not support GPU kernels") end local results = $thecall diff --git a/test/Project.toml b/test/Project.toml index de0c813bd..342addb31 100644 --- a/test/Project.toml +++ b/test/Project.toml @@ -1,5 +1,6 @@ [deps] CUDA = "052768ef-5323-5732-b1bb-66c8b64840ba" +CUDAKernels = "72cfdca4-0801-4ab0-bf6a-d52aa10adc57" KernelAbstractions = "63c18a36-062a-441e-b654-da1e3ab1ce7c" MPI = "da04e1cc-30fd-572f-bb4f-1f8673147195" SpecialFunctions = "276daf66-3868-5448-9aa4-cd146d93841b" diff --git a/test/runtests.jl b/test/runtests.jl index 4d190e0ca..384f15436 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -1,4 +1,5 @@ using KernelAbstractions +using CUDAKernels using Test @testset "Unittests" begin From 348efc7bd063dcab7a1916ccc24f1aa3503235e7 Mon Sep 17 00:00:00 2001 From: Valentin Churavy Date: Thu, 11 Feb 2021 14:44:27 -0500 Subject: [PATCH 2/5] attempt to fix CI --- .buildkite/pipeline.yml | 21 ++++++++++++++++++--- .github/workflows/ci-julia-1.6-nightly.yml | 7 +++++-- .github/workflows/ci-julia-nightly.yml | 7 +++++-- .github/workflows/ci.yml | 9 +++++++-- 4 files changed, 35 insertions(+), 9 deletions(-) diff --git a/.buildkite/pipeline.yml b/.buildkite/pipeline.yml index 67d7248ba..c596f483d 100644 --- a/.buildkite/pipeline.yml +++ b/.buildkite/pipeline.yml @@ -3,9 +3,14 @@ steps: plugins: - JuliaCI/julia#v1: version: "1" - - JuliaCI/julia-test#v1: - JuliaCI/julia-coverage#v1: codecov: true + commands: + - julia --project=test -e 'Pkg.develop(PackageSpec(path=pwd()))' + - julia --project=test -e 'Pkg.develop(PackageSpec(path=joinpath(pwd(),"lib","CUDAKernels")))' + - julia -e 'using Pkg; Pkg.add(name="Run", version="0.1")' + - julia -e 'using Run; Run.prepare_test()' + - julia -e 'using Run; Run.test()' agents: queue: "juliagpu" cuda: "*" @@ -15,9 +20,14 @@ steps: plugins: - JuliaCI/julia#v1: version: "1.6-nightly" - - JuliaCI/julia-test#v1: - JuliaCI/julia-coverage#v1: codecov: true + commands: + - julia --project=test -e 'Pkg.develop(PackageSpec(path=pwd()))' + - julia --project=test -e 'Pkg.develop(PackageSpec(path=joinpath(pwd(),"lib","CUDAKernels")))' + - julia -e 'using Pkg; Pkg.add(name="Run", version="0.1")' + - julia -e 'using Run; Run.prepare_test()' + - julia -e 'using Run; Run.test()' agents: queue: "juliagpu" cuda: "*" @@ -27,8 +37,13 @@ steps: plugins: - JuliaCI/julia#v1: version: "nightly" - - JuliaCI/julia-test#v1: - JuliaCI/julia-coverage#v1: + commands: + - julia --project=test -e 'Pkg.develop(PackageSpec(path=pwd()))' + - julia --project=test -e 'Pkg.develop(PackageSpec(path=joinpath(pwd(),"lib","CUDAKernels")))' + - julia -e 'using Pkg; Pkg.add(name="Run", version="0.1")' + - julia -e 'using Run; Run.prepare_test()' + - julia -e 'using Run; Run.test()' codecov: true agents: queue: "juliagpu" diff --git a/.github/workflows/ci-julia-1.6-nightly.yml b/.github/workflows/ci-julia-1.6-nightly.yml index 930349725..e324d39ed 100644 --- a/.github/workflows/ci-julia-1.6-nightly.yml +++ b/.github/workflows/ci-julia-1.6-nightly.yml @@ -37,8 +37,11 @@ jobs: ${{ runner.os }}-test-${{ env.cache-name }}- ${{ runner.os }}-test- ${{ runner.os }}- - - uses: julia-actions/julia-buildpkg@v1 - - uses: julia-actions/julia-runtest@v1 + - run: julia --project=test -e 'Pkg.develop(PackageSpec(path=pwd()))' + - run: julia --project=test -e 'Pkg.develop(PackageSpec(path=joinpath(pwd(),"lib","CUDAKernels")))' + - run: julia -e 'using Pkg; pkg"add Run@0.1"' + - run: julia -e 'using Run; Run.prepare_test()' + - run: julia -e 'using Run; Run.test()' - uses: julia-actions/julia-processcoverage@v1 - uses: codecov/codecov-action@v1 with: diff --git a/.github/workflows/ci-julia-nightly.yml b/.github/workflows/ci-julia-nightly.yml index d7fdf7585..66711bed5 100644 --- a/.github/workflows/ci-julia-nightly.yml +++ b/.github/workflows/ci-julia-nightly.yml @@ -37,8 +37,11 @@ jobs: ${{ runner.os }}-test-${{ env.cache-name }}- ${{ runner.os }}-test- ${{ runner.os }}- - - uses: julia-actions/julia-buildpkg@v1 - - uses: julia-actions/julia-runtest@v1 + - run: julia --project=test -e 'Pkg.develop(PackageSpec(path=pwd()))' + - run: julia --project=test -e 'Pkg.develop(PackageSpec(path=joinpath(pwd(),"lib","CUDAKernels")))' + - run: julia -e 'using Pkg; pkg"add Run@0.1"' + - run: julia -e 'using Run; Run.prepare_test()' + - run: julia -e 'using Run; Run.test()' - uses: julia-actions/julia-processcoverage@v1 - uses: codecov/codecov-action@v1 with: diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 929d94c38..e087c7502 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -40,8 +40,11 @@ jobs: ${{ runner.os }}-test-${{ env.cache-name }}- ${{ runner.os }}-test- ${{ runner.os }}- - - uses: julia-actions/julia-buildpkg@v1 - - uses: julia-actions/julia-runtest@v1 + - run: julia --project=test -e 'Pkg.develop(PackageSpec(path=pwd()))' + - run: julia --project=test -e 'Pkg.develop(PackageSpec(path=joinpath(pwd(),"lib","CUDAKernels")))' + - run: julia -e 'using Pkg; pkg"add Run@0.1"' + - run: julia -e 'using Run; Run.prepare_test()' + - run: julia -e 'using Run; Run.test()' - uses: julia-actions/julia-processcoverage@v1 - uses: codecov/codecov-action@v1 with: @@ -62,6 +65,7 @@ jobs: julia --project=docs -e ' using Pkg Pkg.develop(PackageSpec(path=pwd())) + Pkg.develop(PackageSpec(path=joinpath(pwd(),"lib","CUDAKernels"))) Pkg.instantiate()' - run: julia --project=docs docs/make.jl env: @@ -83,6 +87,7 @@ jobs: julia --project=docs -e ' using Pkg Pkg.develop(PackageSpec(path=pwd())) + Pkg.develop(PackageSpec(path=joinpath(pwd(),"lib","CUDAKernels"))) Pkg.instantiate()' - run: | julia --project=docs -e ' From 81c2560eaa081ffcb08b96f5905224a989ffd070 Mon Sep 17 00:00:00 2001 From: Valentin Churavy Date: Thu, 11 Feb 2021 14:46:16 -0500 Subject: [PATCH 3/5] fixup! attempt to fix CI --- .buildkite/pipeline.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.buildkite/pipeline.yml b/.buildkite/pipeline.yml index c596f483d..fa3f93773 100644 --- a/.buildkite/pipeline.yml +++ b/.buildkite/pipeline.yml @@ -38,13 +38,13 @@ steps: - JuliaCI/julia#v1: version: "nightly" - JuliaCI/julia-coverage#v1: + codecov: true commands: - julia --project=test -e 'Pkg.develop(PackageSpec(path=pwd()))' - julia --project=test -e 'Pkg.develop(PackageSpec(path=joinpath(pwd(),"lib","CUDAKernels")))' - julia -e 'using Pkg; Pkg.add(name="Run", version="0.1")' - julia -e 'using Run; Run.prepare_test()' - julia -e 'using Run; Run.test()' - codecov: true agents: queue: "juliagpu" cuda: "*" From 33eab30515c4bd32d667845f474768e6c671c4eb Mon Sep 17 00:00:00 2001 From: Valentin Churavy Date: Thu, 11 Feb 2021 14:48:00 -0500 Subject: [PATCH 4/5] fixup! attempt to fix CI --- .buildkite/pipeline.yml | 12 ++++++------ .github/workflows/ci-julia-1.6-nightly.yml | 4 ++-- .github/workflows/ci-julia-nightly.yml | 4 ++-- .github/workflows/ci.yml | 4 ++-- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/.buildkite/pipeline.yml b/.buildkite/pipeline.yml index fa3f93773..e1891a833 100644 --- a/.buildkite/pipeline.yml +++ b/.buildkite/pipeline.yml @@ -6,8 +6,8 @@ steps: - JuliaCI/julia-coverage#v1: codecov: true commands: - - julia --project=test -e 'Pkg.develop(PackageSpec(path=pwd()))' - - julia --project=test -e 'Pkg.develop(PackageSpec(path=joinpath(pwd(),"lib","CUDAKernels")))' + - julia --project=test -e 'using Pkg; Pkg.develop(PackageSpec(path=pwd()))' + - julia --project=test -e 'using Pkg; Pkg.develop(PackageSpec(path=joinpath(pwd(),"lib","CUDAKernels")))' - julia -e 'using Pkg; Pkg.add(name="Run", version="0.1")' - julia -e 'using Run; Run.prepare_test()' - julia -e 'using Run; Run.test()' @@ -23,8 +23,8 @@ steps: - JuliaCI/julia-coverage#v1: codecov: true commands: - - julia --project=test -e 'Pkg.develop(PackageSpec(path=pwd()))' - - julia --project=test -e 'Pkg.develop(PackageSpec(path=joinpath(pwd(),"lib","CUDAKernels")))' + - julia --project=test -e 'using Pkg; Pkg.develop(PackageSpec(path=pwd()))' + - julia --project=test -e 'using Pkg; Pkg.develop(PackageSpec(path=joinpath(pwd(),"lib","CUDAKernels")))' - julia -e 'using Pkg; Pkg.add(name="Run", version="0.1")' - julia -e 'using Run; Run.prepare_test()' - julia -e 'using Run; Run.test()' @@ -40,8 +40,8 @@ steps: - JuliaCI/julia-coverage#v1: codecov: true commands: - - julia --project=test -e 'Pkg.develop(PackageSpec(path=pwd()))' - - julia --project=test -e 'Pkg.develop(PackageSpec(path=joinpath(pwd(),"lib","CUDAKernels")))' + - julia --project=test -e 'using Pkg; Pkg.develop(PackageSpec(path=pwd()))' + - julia --project=test -e 'using Pkg; Pkg.develop(PackageSpec(path=joinpath(pwd(),"lib","CUDAKernels")))' - julia -e 'using Pkg; Pkg.add(name="Run", version="0.1")' - julia -e 'using Run; Run.prepare_test()' - julia -e 'using Run; Run.test()' diff --git a/.github/workflows/ci-julia-1.6-nightly.yml b/.github/workflows/ci-julia-1.6-nightly.yml index e324d39ed..2424d3abf 100644 --- a/.github/workflows/ci-julia-1.6-nightly.yml +++ b/.github/workflows/ci-julia-1.6-nightly.yml @@ -37,8 +37,8 @@ jobs: ${{ runner.os }}-test-${{ env.cache-name }}- ${{ runner.os }}-test- ${{ runner.os }}- - - run: julia --project=test -e 'Pkg.develop(PackageSpec(path=pwd()))' - - run: julia --project=test -e 'Pkg.develop(PackageSpec(path=joinpath(pwd(),"lib","CUDAKernels")))' + - run: julia --project=test -e 'using Pkg; Pkg.develop(PackageSpec(path=pwd()))' + - run: julia --project=test -e 'using Pkg; Pkg.develop(PackageSpec(path=joinpath(pwd(),"lib","CUDAKernels")))' - run: julia -e 'using Pkg; pkg"add Run@0.1"' - run: julia -e 'using Run; Run.prepare_test()' - run: julia -e 'using Run; Run.test()' diff --git a/.github/workflows/ci-julia-nightly.yml b/.github/workflows/ci-julia-nightly.yml index 66711bed5..f05c981a9 100644 --- a/.github/workflows/ci-julia-nightly.yml +++ b/.github/workflows/ci-julia-nightly.yml @@ -37,8 +37,8 @@ jobs: ${{ runner.os }}-test-${{ env.cache-name }}- ${{ runner.os }}-test- ${{ runner.os }}- - - run: julia --project=test -e 'Pkg.develop(PackageSpec(path=pwd()))' - - run: julia --project=test -e 'Pkg.develop(PackageSpec(path=joinpath(pwd(),"lib","CUDAKernels")))' + - run: julia --project=test -e 'using Pkg; Pkg.develop(PackageSpec(path=pwd()))' + - run: julia --project=test -e 'using Pkg; Pkg.develop(PackageSpec(path=joinpath(pwd(),"lib","CUDAKernels")))' - run: julia -e 'using Pkg; pkg"add Run@0.1"' - run: julia -e 'using Run; Run.prepare_test()' - run: julia -e 'using Run; Run.test()' diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e087c7502..fe4b4166d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -40,8 +40,8 @@ jobs: ${{ runner.os }}-test-${{ env.cache-name }}- ${{ runner.os }}-test- ${{ runner.os }}- - - run: julia --project=test -e 'Pkg.develop(PackageSpec(path=pwd()))' - - run: julia --project=test -e 'Pkg.develop(PackageSpec(path=joinpath(pwd(),"lib","CUDAKernels")))' + - run: julia --project=test -e 'using Pkg; Pkg.develop(PackageSpec(path=pwd()))' + - run: julia --project=test -e 'using Pkg; Pkg.develop(PackageSpec(path=joinpath(pwd(),"lib","CUDAKernels")))' - run: julia -e 'using Pkg; pkg"add Run@0.1"' - run: julia -e 'using Run; Run.prepare_test()' - run: julia -e 'using Run; Run.test()' From 86c056fd36e22ee09103c64409bd1c7db97a4cc0 Mon Sep 17 00:00:00 2001 From: Valentin Churavy Date: Thu, 11 Feb 2021 14:49:51 -0500 Subject: [PATCH 5/5] fixup! attempt to fix CI --- test/Project.toml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/test/Project.toml b/test/Project.toml index 342addb31..016b96062 100644 --- a/test/Project.toml +++ b/test/Project.toml @@ -1,9 +1,8 @@ [deps] CUDA = "052768ef-5323-5732-b1bb-66c8b64840ba" -CUDAKernels = "72cfdca4-0801-4ab0-bf6a-d52aa10adc57" +InteractiveUtils = "b77e0a4c-d291-57a0-90e8-8db25a27a240" KernelAbstractions = "63c18a36-062a-441e-b654-da1e3ab1ce7c" MPI = "da04e1cc-30fd-572f-bb4f-1f8673147195" SpecialFunctions = "276daf66-3868-5448-9aa4-cd146d93841b" StaticArrays = "90137ffa-7385-5640-81b9-e52037218182" Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" -InteractiveUtils = "b77e0a4c-d291-57a0-90e8-8db25a27a240"