Skip to content
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 improvements #51

Merged
merged 5 commits into from
Jan 4, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 11 additions & 7 deletions .buildkite/pipeline.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
env:
SECRET_CODECOV_TOKEN: "OYpS8fj3vGhj7iZf9vLAeapyxQNSOEW6mApcSvGboL9AlS+0nfOSFjFrIBNnIU0prxQQy1gR9AwR/JO1m2OFWeRhjYtkQPPhk4xVtSKmv0LLTL0snA8IohUopqfu722i7zLrPcz/A0LFIFsb0ey+oReJs2xnGOshNIJu4FDowUV3wmZvfKWNsSK4cGN+HFQ3387Ow4SsmiUr7oqh0iMBQNqaY8oZ2BY1dFOgPaOegIp70YEFRdJ8DKaLd7WGxFLY9oQEhZZdmx/zx0xo56/NGtDwVYkDPa4qPhJczDBoIn5XvcRiIW0VJ/MaRARxnpenBX5H6gwdcZYUGtjXWIRXBw==;U2FsdGVkX1/bZy1Bp4/dBH5scPpWqLKusXGvSkRGUa+1F7hi4P4Cu5a6GcfNIEvQr+bBj2VlZvqhNW0FAqN3QQ=="

steps:
# Julia versions

- label: "Julia 1.6"
plugins:
- JuliaCI/julia#v0.5:
version: nightly
- JuliaCI/julia#v0.6:
version: 1.6-nightly
- JuliaCI/julia-test#v0.3: ~
- JuliaCI/julia-coverage#v0.3:
codecov: true
Expand All @@ -18,14 +15,16 @@ steps:
agents:
queue: "juliagpu"
intel: "*"
if: build.message !~ /\[skip tests\]/
timeout_in_minutes: 60


# Special tests

- label: "Validation"
plugins:
- JuliaCI/julia#v0.5:
version: nightly
- JuliaCI/julia#v0.6:
version: 1.6-nightly
- JuliaCI/julia-test#v0.3:
julia_args: "-g2"
- JuliaCI/julia-coverage#v0.3:
Expand All @@ -40,3 +39,8 @@ steps:
agents:
queue: "juliagpu"
intel: "*"
if: build.message !~ /\[skip tests\]/
timeout_in_minutes: 60

env:
SECRET_CODECOV_TOKEN: "OYpS8fj3vGhj7iZf9vLAeapyxQNSOEW6mApcSvGboL9AlS+0nfOSFjFrIBNnIU0prxQQy1gR9AwR/JO1m2OFWeRhjYtkQPPhk4xVtSKmv0LLTL0snA8IohUopqfu722i7zLrPcz/A0LFIFsb0ey+oReJs2xnGOshNIJu4FDowUV3wmZvfKWNsSK4cGN+HFQ3387Ow4SsmiUr7oqh0iMBQNqaY8oZ2BY1dFOgPaOegIp70YEFRdJ8DKaLd7WGxFLY9oQEhZZdmx/zx0xo56/NGtDwVYkDPa4qPhJczDBoIn5XvcRiIW0VJ/MaRARxnpenBX5H6gwdcZYUGtjXWIRXBw==;U2FsdGVkX1/bZy1Bp4/dBH5scPpWqLKusXGvSkRGUa+1F7hi4P4Cu5a6GcfNIEvQr+bBj2VlZvqhNW0FAqN3QQ=="
2 changes: 1 addition & 1 deletion lib/level-zero/cmdqueue.jl
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ function properties(groups::ZeCommandQueueGroups)
zeDeviceGetCommandQueueGroupProperties(groups.device, count_ref, all_props)

return [(flags=props.flags,
maxMemoryFillPatternSize=Int(props.maxMemoryFillPatternSize),
maxMemoryFillPatternSize=UInt(props.maxMemoryFillPatternSize),
numQueues=Int(props.numQueues),
) for props in all_props[1:count_ref[]]]
end
Expand Down
2 changes: 1 addition & 1 deletion src/array.jl
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ mutable struct oneArray{T,N} <: AbstractGPUArray{T,N}
ctx::ZeContext
dev::ZeDevice

function oneArray{T,N}(::UndefInitializer, dims::Dims{N}) where {T,N}
function oneArray{T,N}(::UndefInitializer, dims::Dims{N}) where {T,N}
Base.isbitsunion(T) && error("oneArray does not yet support union bits types")
Base.isbitstype(T) || error("oneArray only supports bits types") # allocatedinline on 1.3+
ctx = context()
Expand Down
5 changes: 0 additions & 5 deletions test/level-zero.jl
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
@testset "oneL0" begin

using oneAPI.oneL0


Expand Down Expand Up @@ -281,6 +279,3 @@ for buf in [device_alloc(ctx, dev, 1024),
end

end


end
15 changes: 13 additions & 2 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,14 @@ if do_help

--help Show this text.
--list List all available tests.
--quickfail Fail the entire run as soon as a single test errored.
--jobs=N Launch `N` processes to perform tests (default: Threads.nthreads()).

Remaining arguments filter the tests that will be executed.""")
exit(0)
end
_, jobs = extract_flag!(ARGS, "--jobs", Threads.nthreads())
do_quickfail, _ = extract_flag!(ARGS, "--quickfail")

include("setup.jl") # make sure everything is precompiled

Expand Down Expand Up @@ -179,9 +181,9 @@ all_tests = copy(tests)
try
# Monitor stdin and kill this task on ^C
# but don't do this on Windows, because it may deadlock in the kernel
t = current_task()
running_tests = Dict{String, DateTime}()
if !Sys.iswindows() && isa(stdin, Base.TTY)
t = current_task()
stdin_monitor = @async begin
term = REPL.Terminals.TTYTerminal("xterm", stdin, stdout, stderr)
try
Expand Down Expand Up @@ -229,6 +231,7 @@ try
# act on the results
if resp[1] isa Exception
print_testworker_errored(test, wrkr)
do_quickfail && Base.throwto(t, InterruptException())

# the worker encountered some failure, recycle it
# so future tests get a fresh environment
Expand Down Expand Up @@ -258,7 +261,15 @@ catch e
@error "InterruptException" exception=ex,catch_backtrace()
end
end, all_tasks)
foreach(wait, all_tasks)
for t in all_tasks
# NOTE: we can't just wait, but need to discard the exception,
# because the throwto for --quickfail also kills the worker.
try
wait(t)
catch e
showerror(stderr, e)
end
end
finally
if @isdefined stdin_monitor
schedule(stdin_monitor, InterruptException(); error=true)
Expand Down