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

Fixing transpose function, a missing "end" and some argument orders. #487

Merged
merged 2 commits into from
Jul 1, 2024
Merged
Changes from 1 commit
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
9 changes: 5 additions & 4 deletions examples/performance.jl
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ end

@kernel function simple_transpose_kernel!(output, @Const(input))
I, J = @index(Global, NTuple)
@inbounds output[I, J] = input[I, J]
@inbounds output[J, I] = input[I, J]
end

# Local memory variants
Expand Down Expand Up @@ -143,7 +143,8 @@ for block_dims in ((TILE_DIM, TILE_DIM), (TILE_DIM*TILE_DIM, 1), (1, TILE_DIM*TI
# compile kernel
kernel(input, output, ndrange=size(output))
for rep in 1:nreps
KernelAbstractions.synchronize(backend)
KernelAbstractions.synchronize(backend)
vchuravy marked this conversation as resolved.
Show resolved Hide resolved
end
end
end
end
Expand All @@ -161,7 +162,7 @@ for (name, kernel) in (
# compile kernel
kernel(input, output, Val(Int(bank)), ndrange=size(output))
for rep in 1:nreps
kernel(input, output, Val(Int(bank)), ndrange=size(output))
kernel(output, input, Val(Int(bank)), ndrange=size(output))
vchuravy marked this conversation as resolved.
Show resolved Hide resolved
end
KernelAbstractions.synchronize(backend)
end
Expand All @@ -187,7 +188,7 @@ for (name, kernel) in (
# compile kernel
kernel(input, output, Val(Int(bank)), ndrange=ndrange)
for rep in 1:nreps
kernel(input, output, Val(Int(bank)), ndrange=ndrange)
kernel(output, input, Val(Int(bank)), ndrange=ndrange)
end
KernelAbstractions.synchronize(backend)
end
Expand Down