-
Notifications
You must be signed in to change notification settings - Fork 66
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
Run Runic after explicit return rule addition #516
base: main
Are you sure you want to change the base?
Conversation
@@ -266,6 +266,7 @@ function unittest_testsuite(Backend, backend_str, backend_mod, BackendArrayT; sk | |||
function f(KernelAbstractions.@context, a) | |||
I = @index(Global, Linear) | |||
a[I] = 1 | |||
return # ?? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this valid? This function isn't defined in a macro, but used just below in a @kernel
function...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, that's valid
@@ -62,13 +62,13 @@ function histogram!(histogram_output, input) | |||
backend = get_backend(histogram_output) | |||
# Need static block size | |||
kernel! = histogram_kernel!(backend, (256,)) | |||
kernel!(histogram_output, input, ndrange = size(input)) | |||
return kernel!(histogram_output, input, ndrange = size(input)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
return kernel!(histogram_output, input, ndrange = size(input)) | |
kernel!(histogram_output, input, ndrange = size(input)) | |
return |
end | ||
|
||
function move(backend, input) | ||
# TODO replace with adapt(backend, input) | ||
out = KernelAbstractions.allocate(backend, eltype(input), size(input)) | ||
KernelAbstractions.copyto!(backend, out, input) | ||
return KernelAbstractions.copyto!(backend, out, input) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
return KernelAbstractions.copyto!(backend, out, input) | |
KernelAbstractions.copyto!(backend, out, input) | |
return |
@@ -22,7 +22,7 @@ function matmul!(output, a, b) | |||
end | |||
backend = KernelAbstractions.get_backend(a) | |||
kernel! = matmul_kernel!(backend) | |||
kernel!(output, a, b, ndrange = size(output)) | |||
return kernel!(output, a, b, ndrange = size(output)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
return kernel!(output, a, b, ndrange = size(output)) | |
kernel!(output, a, b, ndrange = size(output)) | |
return |
@@ -12,7 +12,7 @@ function mycopy!(A, B) | |||
@assert get_backend(B) == backend | |||
|
|||
kernel = copy_kernel!(backend) | |||
kernel(A, B, ndrange = length(A)) | |||
return kernel(A, B, ndrange = length(A)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
return kernel(A, B, ndrange = length(A)) | |
kernel(A, B, ndrange = length(A)) | |
return |
@@ -12,7 +12,7 @@ function mycopy_static!(A, B) | |||
@assert get_backend(B) == backend | |||
|
|||
kernel = copy_kernel!(backend, 32, size(A)) # if size(A) varies this will cause recompilation | |||
kernel(A, B, ndrange = size(A)) | |||
return kernel(A, B, ndrange = size(A)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
return kernel(A, B, ndrange = size(A)) | |
kernel(A, B, ndrange = size(A)) | |
return |
@@ -101,6 +101,7 @@ function transform_gpu!(def, constargs, force_inbounds) | |||
Expr(:block, let_constargs...), | |||
body, | |||
) | |||
return def # or nothing? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
return def # or nothing? | |
return |
@@ -135,6 +136,7 @@ function transform_cpu!(def, constargs, force_inbounds) | |||
Expr(:block, let_constargs...), | |||
Expr(:block, new_stmts...), | |||
) | |||
return def # or nothing? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
return def # or nothing? | |
return |
@@ -266,6 +266,7 @@ function unittest_testsuite(Backend, backend_str, backend_mod, BackendArrayT; sk | |||
function f(KernelAbstractions.@context, a) | |||
I = @index(Global, Linear) | |||
a[I] = 1 | |||
return # ?? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, that's valid
@@ -266,6 +266,7 @@ function unittest_testsuite(Backend, backend_str, backend_mod, BackendArrayT; sk | |||
function f(KernelAbstractions.@context, a) | |||
I = @index(Global, Linear) | |||
a[I] = 1 | |||
return # ?? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
return # ?? | |
return |
@@ -43,5 +43,5 @@ function unroll_testsuite(backend, ArrayT) | |||
kernel!(a, Val(5)) | |||
kernel2! = kernel_unroll2!(backend(), 1, 1) | |||
kernel2!(a) | |||
synchronize(backend()) | |||
return synchronize(backend()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
return synchronize(backend()) | |
synchronize(backend()) | |
return |
No description provided.