Skip to content

Commit

Permalink
change to strides
Browse files Browse the repository at this point in the history
  • Loading branch information
PABannier committed Nov 19, 2024
1 parent 630d65d commit 093f087
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/ggml-metal/ggml-metal.m
Original file line number Diff line number Diff line change
Expand Up @@ -3483,7 +3483,7 @@ static void ggml_metal_encode_node(
[encoder setComputePipelineState:pipeline];
[encoder setBuffer:id_src0 offset:offs_src0 atIndex:0];
[encoder setBuffer:id_dst offset:offs_dst atIndex:1];
[encoder setBytes:&ne00 length:sizeof( int64_t) atIndex:2];
[encoder setBytes:&nb01 length:sizeof( int64_t) atIndex:2];

[encoder dispatchThreadgroups:MTLSizeMake(nrows, 1, 1) threadsPerThreadgroup:MTLSizeMake(1, 1, 1)];
} break;
Expand Down
4 changes: 2 additions & 2 deletions src/ggml-metal/ggml-metal.metal
Original file line number Diff line number Diff line change
Expand Up @@ -1347,9 +1347,9 @@ kernel void kernel_ssm_scan_f32(
kernel void kernel_argmax(
device const void * x,
device int32_t * dst,
constant int64_t & ncols,
constant int64_t & nb01,
uint tgpig[[threadgroup_position_in_grid]]) {
device const float * x_row = (device const float *) ((device const char *) x + tgpig * ncols * sizeof(float));
device const float * x_row = (device const float *) ((device const char *) x + tgpig * nb01);

dst[tpitg] = 0;

Expand Down

0 comments on commit 093f087

Please sign in to comment.