Skip to content

Commit 6f26d02

Browse files
committed
warn -> @warn
1 parent c4f1b32 commit 6f26d02

14 files changed

+30
-30
lines changed

examples/hands_on_opencl/ex07/matmul.jl

+1-1
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ prg = cl.Program(ctx, source=kernel_source) |> cl.build!
148148
mmul = cl.Kernel(prg, "mmul")
149149
wk_size = cl.info(first(cl.devices(ctx)), :max_work_group_size)
150150
if Ndim * (ORDER ÷ 16) >= wk_size
151-
warn("Specified work_size is bigger than $wk_size")
151+
@warn("Specified work_size is bigger than $wk_size")
152152
else
153153

154154
info("=== OpenCL, matrix mult, C row, A row in priv mem, order $Ndim ====")

examples/hands_on_opencl/ex08/matmul.jl

+2-2
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ prg = cl.Program(ctx, source=kernel_source) |> cl.build!
147147
mmul = cl.Kernel(prg, "mmul")
148148
wk_size = cl.info(first(cl.devices(ctx)), :max_work_group_size)
149149
if Ndim * (ORDER ÷ 16) >= wk_size
150-
warn("Specified work_size is bigger than $wk_size")
150+
@warn("Specified work_size is bigger than $wk_size")
151151
else
152152

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

182182
info("=== OpenCL, matrix mult, A and B in block form in local memory, order $Ndim ====")

examples/hands_on_opencl/exA/pi_vocl.jl

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ elseif vector_size == 8
3838
ITERS = 32768 # (262144/8)
3939
WGS = 64
4040
else
41-
warn("Invalid vector size")
41+
@warn("Invalid vector size")
4242
exit(1)
4343
end
4444

examples/performance.jl

+5-5
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ function cl_performance(ndatapts::Integer, nworkers::Integer)
4444
for platform in cl.platforms()
4545

4646
if platform[:name] == "Portable Computing Language"
47-
warn("Portable Computing Language platform not yet supported")
47+
@warn("Portable Computing Language platform not yet supported")
4848
continue
4949
end
5050

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

6767
if device[:max_mem_alloc_size] < sizeof(Float32) * ndatapts
68-
warn("Requested buffer size exceeds device max alloc size!")
69-
warn("Skipping device $(device[:name])...")
68+
@warn("Requested buffer size exceeds device max alloc size!")
69+
@warn("Skipping device $(device[:name])...")
7070
continue
7171
end
7272

7373
if device[:max_work_group_size] < nworkers
74-
warn("Number of workers exceeds the device's max work group size!")
75-
warn("Skipping device $(device[:name])...")
74+
@warn("Number of workers exceeds the device's max work group size!")
75+
@warn("Skipping device $(device[:name])...")
7676
continue
7777
end
7878

src/buffer.jl

+1-1
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ function Buffer(::Type{T}, ctx::Context, flags::CL_mem_flags,
9292

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

9898
if flags == (CL_MEM_USE_HOST_PTR | CL_MEM_ALLOC_HOST_PTR)

src/context.jl

+2-2
Original file line numberDiff line numberDiff line change
@@ -209,11 +209,11 @@ function properties(ctx_id::CL_context)
209209
push!(result, (key, value))
210210
elseif key == 0
211211
if i != nprops
212-
warn("Encountered OpenCL.Context property key == 0 at position $i")
212+
@warn("Encountered OpenCL.Context property key == 0 at position $i")
213213
end
214214
break
215215
else
216-
warn("Unknown OpenCL.Context property key encountered $key")
216+
@warn("Unknown OpenCL.Context property key encountered $key")
217217
end
218218
end
219219
return result

test/test_behaviour.jl

+3-3
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ info(
2020

2121
for device in cl.devices()
2222
if device[:platform][:name] == "Portable Computing Language"
23-
warn("Skipping OpenCL.Kernel mem/workgroup size for Portable Computing Language Platform")
23+
@warn("Skipping OpenCL.Kernel mem/workgroup size for Portable Computing Language Platform")
2424
continue
2525
end
2626

@@ -243,7 +243,7 @@ let test_struct = "
243243
for device in cl.devices()
244244

245245
if device[:platform][:name] == "Portable Computing Language"
246-
warn("Skipping OpenCL Struct Buffer Test for Portable Computing Language Platform")
246+
@warn("Skipping OpenCL Struct Buffer Test for Portable Computing Language Platform")
247247
continue
248248
end
249249

@@ -304,7 +304,7 @@ let test_mutable_pointerfree = "
304304
for device in cl.devices()
305305

306306
if device[:platform][:name] == "Portable Computing Language"
307-
warn("Skipping OpenCL Struct Buffer Test for Portable Computing Language Platform")
307+
@warn("Skipping OpenCL Struct Buffer Test for Portable Computing Language Platform")
308308
continue
309309
end
310310

test/test_buffer.jl

+1-1
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ end
122122
for device in cl.devices()
123123
if occursin("Portable", device[:platform][:name])
124124
# the pocl platform claims to implement v1.2 of the spec, but does not
125-
warn("Skipping test OpenCL.Buffer fill for POCL Platform")
125+
@warn("Skipping test OpenCL.Buffer fill for POCL Platform")
126126
continue
127127
end
128128
ctx = cl.Context(device)

test/test_cmdqueue.jl

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
cl.CmdQueue(ctx, device, (:profile, :out_of_order))
1414
catch err
1515
if !has_warned
16-
warn("Platform $(device[:platform][:name]) does not seem to " *
16+
@warn("Platform $(device[:platform][:name]) does not seem to " *
1717
"suport out of order queues: \n$err")
1818
has_warned = true
1919
end

test/test_context.jl

+1-1
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ end
6363
end
6464

6565
if platform[:name] == "Portable Computing Language"
66-
warn("Skipping OpenCL.Context platform properties for " *
66+
@warn("Skipping OpenCL.Context platform properties for " *
6767
"Portable Computing Language Platform")
6868
continue
6969
end

test/test_device.jl

+1-1
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@
6868
for p in cl.platforms()
6969
if occursin("Portable", p[:name])
7070
msg = "Skipping Device Info tests for Portable Computing Language Platform "
71-
warn(msg)
71+
@warn(msg)
7272
continue
7373
end
7474
@test isa(p, cl.Platform)

test/test_event.jl

+3-3
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
for platform in cl.platforms()
44
if occursin("Portable", platform[:name])
55
msg = "$(platform[:name]) does not implement User Events"
6-
warn(msg)
6+
@warn(msg)
77
continue
88
end
99

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

@@ -66,7 +66,7 @@
6666
if occursin("Portable", platform[:name]) ||
6767
occursin("Intel Gen OCL", platform[:name])
6868
msg = "$(platform[:name]) does not implement User Events or shows other problems."
69-
warn(msg)
69+
@warn(msg)
7070
continue
7171
end
7272

test/test_kernel.jl

+7-7
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ end
2424
@testset "OpenCL.Kernel constructor" begin
2525
for device in cl.devices()
2626
if device[:platform][:name] == "Portable Computing Language"
27-
warn("Skipping OpenCL.Kernel constructor for " *
27+
@warn("Skipping OpenCL.Kernel constructor for " *
2828
"Portable Computing Language Platform")
2929
continue
3030
end
@@ -39,7 +39,7 @@ end
3939
@testset "OpenCL.Kernel info" begin
4040
for device in cl.devices()
4141
if device[:platform][:name] == "Portable Computing Language"
42-
warn("Skipping OpenCL.Kernel info for Portable Computing Language Platform")
42+
@warn("Skipping OpenCL.Kernel info for Portable Computing Language Platform")
4343
continue
4444
end
4545
ctx = cl.Context(device)
@@ -57,7 +57,7 @@ end
5757
@testset "OpenCL.Kernel mem/workgroup size" begin
5858
for device in cl.devices()
5959
if device[:platform][:name] == "Portable Computing Language"
60-
warn("Skipping OpenCL.Kernel mem/workgroup size for Portable Computing Language Platform")
60+
@warn("Skipping OpenCL.Kernel mem/workgroup size for Portable Computing Language Platform")
6161
continue
6262
end
6363
ctx = cl.Context(device)
@@ -82,7 +82,7 @@ end
8282
for device in cl.devices()
8383

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

@@ -142,7 +142,7 @@ end
142142
@testset "OpenCL.Kernel enqueue_kernel" begin
143143
for device in cl.devices()
144144
if device[:platform][:name] == "Portable Computing Language"
145-
warn("Skipping OpenCL.Kernel mem/workgroup size for Portable Computing Language Platform")
145+
@warn("Skipping OpenCL.Kernel mem/workgroup size for Portable Computing Language Platform")
146146
continue
147147
end
148148

@@ -204,7 +204,7 @@ end
204204
"
205205
for device in cl.devices()
206206
if device[:platform][:name] == "Portable Computing Language"
207-
warn("Skipping OpenCL.Kernel constructor for " *
207+
@warn("Skipping OpenCL.Kernel constructor for " *
208208
"Portable Computing Language Platform")
209209
continue
210210
end
@@ -239,7 +239,7 @@ end
239239

240240
for device in cl.devices()
241241
if device[:platform][:name] == "Portable Computing Language"
242-
warn("Skipping OpenCL.Kernel constructor for " *
242+
@warn("Skipping OpenCL.Kernel constructor for " *
243243
"Portable Computing Language Platform")
244244
continue
245245
end

test/test_program.jl

+1-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949

5050
# BUILD_SUCCESS undefined in POCL implementation..
5151
if device[:platform][:name] == "Portable Computing Language"
52-
warn("Skipping OpenCL.Program build for Portable Computing Language Platform")
52+
@warn("Skipping OpenCL.Program build for Portable Computing Language Platform")
5353
continue
5454
end
5555
@test prg[:build_status][device] == cl.CL_BUILD_SUCCESS

0 commit comments

Comments
 (0)