Skip to content

Commit 6aeff24

Browse files
committed
metal : fix indent (ggml/0)
1 parent 325756d commit 6aeff24

File tree

1 file changed

+14
-14
lines changed

1 file changed

+14
-14
lines changed

ggml-metal.m

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1195,24 +1195,24 @@ static enum ggml_status ggml_metal_graph_compute(
11951195
[encoder dispatchThreadgroups:MTLSizeMake(n, 1, 1) threadsPerThreadgroup:MTLSizeMake(1, 1, 1)];
11961196
} break;
11971197
case GGML_OP_CLAMP:
1198-
{
1199-
id<MTLComputePipelineState> pipeline = ctx->kernels[GGML_METAL_KERNEL_TYPE_CLAMP].pipeline;
1198+
{
1199+
id<MTLComputePipelineState> pipeline = ctx->kernels[GGML_METAL_KERNEL_TYPE_CLAMP].pipeline;
12001200

1201-
float min;
1202-
float max;
1203-
memcpy(&min, ((int32_t *) dst->op_params) + 0, sizeof(float));
1204-
memcpy(&max, ((int32_t *) dst->op_params) + 1, sizeof(float));
1201+
float min;
1202+
float max;
1203+
memcpy(&min, ((int32_t *) dst->op_params) + 0, sizeof(float));
1204+
memcpy(&max, ((int32_t *) dst->op_params) + 1, sizeof(float));
12051205

1206-
[encoder setComputePipelineState:pipeline];
1207-
[encoder setBuffer:id_src0 offset:offs_src0 atIndex:0];
1208-
[encoder setBuffer:id_dst offset:offs_dst atIndex:1];
1209-
[encoder setBytes:&min length:sizeof(min) atIndex:2];
1210-
[encoder setBytes:&max length:sizeof(max) atIndex:3];
1206+
[encoder setComputePipelineState:pipeline];
1207+
[encoder setBuffer:id_src0 offset:offs_src0 atIndex:0];
1208+
[encoder setBuffer:id_dst offset:offs_dst atIndex:1];
1209+
[encoder setBytes:&min length:sizeof(min) atIndex:2];
1210+
[encoder setBytes:&max length:sizeof(max) atIndex:3];
12111211

1212-
const int64_t n = ggml_nelements(dst);
1212+
const int64_t n = ggml_nelements(dst);
12131213

1214-
[encoder dispatchThreadgroups:MTLSizeMake(n, 1, 1) threadsPerThreadgroup:MTLSizeMake(1, 1, 1)];
1215-
} break;
1214+
[encoder dispatchThreadgroups:MTLSizeMake(n, 1, 1) threadsPerThreadgroup:MTLSizeMake(1, 1, 1)];
1215+
} break;
12161216
case GGML_OP_UNARY:
12171217
switch (ggml_get_unary_op(gf->nodes[i])) {
12181218
// we are not taking into account the strides, so for now require contiguous tensors

0 commit comments

Comments
 (0)