Skip to content
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
8 changes: 4 additions & 4 deletions backends/vulkan/runtime/graph/ops/glsl/permute.glsl
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ layout(std430) buffer;

#include "indexing_utils.h"

layout(set = 0, binding = 0, ${IMAGE_FORMAT[DTYPE]}) uniform PRECISION restrict writeonly ${IMAGE_T[NDIM][DTYPE]} image_out;
layout(set = 0, binding = 1) uniform PRECISION ${SAMPLER_T[NDIM][DTYPE]} image_in;
${layout_declare_tensor(B, "w", "t_out", DTYPE, STORAGE)}
${layout_declare_tensor(B, "r", "t_in", DTYPE, STORAGE)}

layout(push_constant) uniform PRECISION restrict Block {
ivec4 out_limits;
Expand Down Expand Up @@ -72,7 +72,7 @@ void main() {
fetch_pos[packed_dim] >>= 2;

// fetch input texel
VEC4_T inval = VEC4_T(texelFetch(image_in, fetch_pos, 0));
VEC4_T inval = VEC4_T(load_texel(t_in, fetch_pos));
outval[j] = inval[in_packed_dim_lane_index];

// go to next position in the input, that is mapped to the packed dim in the output
Expand All @@ -81,5 +81,5 @@ void main() {

pos[packed_dim] = int(gl_GlobalInvocationID[packed_dim]);

imageStore(image_out, pos, outval);
imageStore(t_out, pos, outval);
}
1 change: 1 addition & 0 deletions backends/vulkan/runtime/graph/ops/glsl/permute.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ permute:
parameter_names_with_default_values:
DTYPE: float
NDIM: 3
STORAGE: texture3d
generate_variant_forall:
DTYPE:
- VALUE: half
Expand Down
Loading