Skip to content

Commit

Permalink
warn -> @warn
Browse files Browse the repository at this point in the history
  • Loading branch information
SimonDanisch committed Oct 15, 2018
1 parent c4f1b32 commit 6f26d02
Show file tree
Hide file tree
Showing 14 changed files with 30 additions and 30 deletions.
2 changes: 1 addition & 1 deletion examples/hands_on_opencl/ex07/matmul.jl
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ prg = cl.Program(ctx, source=kernel_source) |> cl.build!
mmul = cl.Kernel(prg, "mmul")
wk_size = cl.info(first(cl.devices(ctx)), :max_work_group_size)
if Ndim * (ORDER ÷ 16) >= wk_size
warn("Specified work_size is bigger than $wk_size")
@warn("Specified work_size is bigger than $wk_size")
else

info("=== OpenCL, matrix mult, C row, A row in priv mem, order $Ndim ====")
Expand Down
4 changes: 2 additions & 2 deletions examples/hands_on_opencl/ex08/matmul.jl
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ prg = cl.Program(ctx, source=kernel_source) |> cl.build!
mmul = cl.Kernel(prg, "mmul")
wk_size = cl.info(first(cl.devices(ctx)), :max_work_group_size)
if Ndim * (ORDER ÷ 16) >= wk_size
warn("Specified work_size is bigger than $wk_size")
@warn("Specified work_size is bigger than $wk_size")
else

info("=== OpenCL, matrix mult, C row, priv A, B, cols loc, order $Ndim ====")
Expand Down Expand Up @@ -176,7 +176,7 @@ prg = cl.Program(ctx, source=kernel_source) |> cl.build!
mmul = cl.Kernel(prg, "mmul")
wk_size = cl.info(first(cl.devices(ctx)), :max_work_group_size)
if Ndim * (ORDER ÷ 16) >= wk_size
warn("Specified work_size is bigger than $wk_size")
@warn("Specified work_size is bigger than $wk_size")
else

info("=== OpenCL, matrix mult, A and B in block form in local memory, order $Ndim ====")
Expand Down
2 changes: 1 addition & 1 deletion examples/hands_on_opencl/exA/pi_vocl.jl
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ elseif vector_size == 8
ITERS = 32768 # (262144/8)
WGS = 64
else
warn("Invalid vector size")
@warn("Invalid vector size")
exit(1)
end

Expand Down
10 changes: 5 additions & 5 deletions examples/performance.jl
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ function cl_performance(ndatapts::Integer, nworkers::Integer)
for platform in cl.platforms()

if platform[:name] == "Portable Computing Language"
warn("Portable Computing Language platform not yet supported")
@warn("Portable Computing Language platform not yet supported")
continue
end

Expand All @@ -65,14 +65,14 @@ function cl_performance(ndatapts::Integer, nworkers::Integer)
@printf("Device max work item size: %s\n", device[:max_work_item_size])

if device[:max_mem_alloc_size] < sizeof(Float32) * ndatapts
warn("Requested buffer size exceeds device max alloc size!")
warn("Skipping device $(device[:name])...")
@warn("Requested buffer size exceeds device max alloc size!")
@warn("Skipping device $(device[:name])...")
continue
end

if device[:max_work_group_size] < nworkers
warn("Number of workers exceeds the device's max work group size!")
warn("Skipping device $(device[:name])...")
@warn("Number of workers exceeds the device's max work group size!")
@warn("Skipping device $(device[:name])...")
continue
end

Expand Down
2 changes: 1 addition & 1 deletion src/buffer.jl
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ function Buffer(::Type{T}, ctx::Context, flags::CL_mem_flags,

if (hostbuf !== nothing &&
(flags & (CL_MEM_USE_HOST_PTR | CL_MEM_COPY_HOST_PTR)) == 0)
warn("'hostbuf' was passed, but no memory flags to make use of it")
@warn("'hostbuf' was passed, but no memory flags to make use of it")
end

if flags == (CL_MEM_USE_HOST_PTR | CL_MEM_ALLOC_HOST_PTR)
Expand Down
4 changes: 2 additions & 2 deletions src/context.jl
Original file line number Diff line number Diff line change
Expand Up @@ -209,11 +209,11 @@ function properties(ctx_id::CL_context)
push!(result, (key, value))
elseif key == 0
if i != nprops
warn("Encountered OpenCL.Context property key == 0 at position $i")
@warn("Encountered OpenCL.Context property key == 0 at position $i")
end
break
else
warn("Unknown OpenCL.Context property key encountered $key")
@warn("Unknown OpenCL.Context property key encountered $key")
end
end
return result
Expand Down
6 changes: 3 additions & 3 deletions test/test_behaviour.jl
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ info(

for device in cl.devices()
if device[:platform][:name] == "Portable Computing Language"
warn("Skipping OpenCL.Kernel mem/workgroup size for Portable Computing Language Platform")
@warn("Skipping OpenCL.Kernel mem/workgroup size for Portable Computing Language Platform")
continue
end

Expand Down Expand Up @@ -243,7 +243,7 @@ let test_struct = "
for device in cl.devices()

if device[:platform][:name] == "Portable Computing Language"
warn("Skipping OpenCL Struct Buffer Test for Portable Computing Language Platform")
@warn("Skipping OpenCL Struct Buffer Test for Portable Computing Language Platform")
continue
end

Expand Down Expand Up @@ -304,7 +304,7 @@ let test_mutable_pointerfree = "
for device in cl.devices()

if device[:platform][:name] == "Portable Computing Language"
warn("Skipping OpenCL Struct Buffer Test for Portable Computing Language Platform")
@warn("Skipping OpenCL Struct Buffer Test for Portable Computing Language Platform")
continue
end

Expand Down
2 changes: 1 addition & 1 deletion test/test_buffer.jl
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ end
for device in cl.devices()
if occursin("Portable", device[:platform][:name])
# the pocl platform claims to implement v1.2 of the spec, but does not
warn("Skipping test OpenCL.Buffer fill for POCL Platform")
@warn("Skipping test OpenCL.Buffer fill for POCL Platform")
continue
end
ctx = cl.Context(device)
Expand Down
2 changes: 1 addition & 1 deletion test/test_cmdqueue.jl
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
cl.CmdQueue(ctx, device, (:profile, :out_of_order))
catch err
if !has_warned
warn("Platform $(device[:platform][:name]) does not seem to " *
@warn("Platform $(device[:platform][:name]) does not seem to " *
"suport out of order queues: \n$err")
has_warned = true
end
Expand Down
2 changes: 1 addition & 1 deletion test/test_context.jl
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ end
end

if platform[:name] == "Portable Computing Language"
warn("Skipping OpenCL.Context platform properties for " *
@warn("Skipping OpenCL.Context platform properties for " *
"Portable Computing Language Platform")
continue
end
Expand Down
2 changes: 1 addition & 1 deletion test/test_device.jl
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
for p in cl.platforms()
if occursin("Portable", p[:name])
msg = "Skipping Device Info tests for Portable Computing Language Platform "
warn(msg)
@warn(msg)
continue
end
@test isa(p, cl.Platform)
Expand Down
6 changes: 3 additions & 3 deletions test/test_event.jl
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
for platform in cl.platforms()
if occursin("Portable", platform[:name])
msg = "$(platform[:name]) does not implement User Events"
warn(msg)
@warn(msg)
continue
end

Expand All @@ -24,7 +24,7 @@
if occursin("Portable", platform[:name]) ||
occursin("Intel Gen OCL", platform[:name])
msg = "$(platform[:name]) does not implement User Events or shows other problems"
warn(msg)
@warn(msg)
continue
end

Expand Down Expand Up @@ -66,7 +66,7 @@
if occursin("Portable", platform[:name]) ||
occursin("Intel Gen OCL", platform[:name])
msg = "$(platform[:name]) does not implement User Events or shows other problems."
warn(msg)
@warn(msg)
continue
end

Expand Down
14 changes: 7 additions & 7 deletions test/test_kernel.jl
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ end
@testset "OpenCL.Kernel constructor" begin
for device in cl.devices()
if device[:platform][:name] == "Portable Computing Language"
warn("Skipping OpenCL.Kernel constructor for " *
@warn("Skipping OpenCL.Kernel constructor for " *
"Portable Computing Language Platform")
continue
end
Expand All @@ -39,7 +39,7 @@ end
@testset "OpenCL.Kernel info" begin
for device in cl.devices()
if device[:platform][:name] == "Portable Computing Language"
warn("Skipping OpenCL.Kernel info for Portable Computing Language Platform")
@warn("Skipping OpenCL.Kernel info for Portable Computing Language Platform")
continue
end
ctx = cl.Context(device)
Expand All @@ -57,7 +57,7 @@ end
@testset "OpenCL.Kernel mem/workgroup size" begin
for device in cl.devices()
if device[:platform][:name] == "Portable Computing Language"
warn("Skipping OpenCL.Kernel mem/workgroup size for Portable Computing Language Platform")
@warn("Skipping OpenCL.Kernel mem/workgroup size for Portable Computing Language Platform")
continue
end
ctx = cl.Context(device)
Expand All @@ -82,7 +82,7 @@ end
for device in cl.devices()

if device[:platform][:name] == "Portable Computing Language"
warn("Skipping OpenCL.Kernel mem/workgroup size for Portable Computing Language Platform")
@warn("Skipping OpenCL.Kernel mem/workgroup size for Portable Computing Language Platform")
continue
end

Expand Down Expand Up @@ -142,7 +142,7 @@ end
@testset "OpenCL.Kernel enqueue_kernel" begin
for device in cl.devices()
if device[:platform][:name] == "Portable Computing Language"
warn("Skipping OpenCL.Kernel mem/workgroup size for Portable Computing Language Platform")
@warn("Skipping OpenCL.Kernel mem/workgroup size for Portable Computing Language Platform")
continue
end

Expand Down Expand Up @@ -204,7 +204,7 @@ end
"
for device in cl.devices()
if device[:platform][:name] == "Portable Computing Language"
warn("Skipping OpenCL.Kernel constructor for " *
@warn("Skipping OpenCL.Kernel constructor for " *
"Portable Computing Language Platform")
continue
end
Expand Down Expand Up @@ -239,7 +239,7 @@ end

for device in cl.devices()
if device[:platform][:name] == "Portable Computing Language"
warn("Skipping OpenCL.Kernel constructor for " *
@warn("Skipping OpenCL.Kernel constructor for " *
"Portable Computing Language Platform")
continue
end
Expand Down
2 changes: 1 addition & 1 deletion test/test_program.jl
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@

# BUILD_SUCCESS undefined in POCL implementation..
if device[:platform][:name] == "Portable Computing Language"
warn("Skipping OpenCL.Program build for Portable Computing Language Platform")
@warn("Skipping OpenCL.Program build for Portable Computing Language Platform")
continue
end
@test prg[:build_status][device] == cl.CL_BUILD_SUCCESS
Expand Down

0 comments on commit 6f26d02

Please sign in to comment.