Skip to content

Commit d93b5ca

Browse files
committed
minor : cleanup
1 parent 4f787ea commit d93b5ca

File tree

2 files changed

+3
-13
lines changed

2 files changed

+3
-13
lines changed

ggml-cuda/rope.cu

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,7 @@ void ggml_cuda_op_rope(ggml_backend_cuda_context & ctx, ggml_tensor * dst) {
291291
freq_factors = (const float *) src2->data;
292292
}
293293
} else {
294-
GGML_ASSERT(src2 == nullptr && "TODO: freq_factors not implemented for mode 1");
294+
GGML_ASSERT(src2 == nullptr && "TODO: freq_factors not implemented for !is_neox");
295295
}
296296

297297
rope_corr_dims corr_dims;

ggml-metal.m

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2263,18 +2263,8 @@ static enum ggml_status ggml_metal_graph_compute(
22632263

22642264
GGML_ASSERT(!is_glm && "GLM RoPE not implemented in Metal");
22652265

2266-
if (is_neox) {
2267-
// TODO: move these asserts to ggml.c
2268-
GGML_ASSERT(src1->type == GGML_TYPE_I32);
2269-
GGML_ASSERT(src1->ne[0] == ne2);
2270-
2271-
if (id_src2 != nil) {
2272-
// TODO: move these asserts to ggml.c
2273-
GGML_ASSERT(src2->type == GGML_TYPE_F32);
2274-
GGML_ASSERT(src2->ne[0] >= n_dims / 2);
2275-
}
2276-
} else {
2277-
GGML_ASSERT(id_src2 == nil && "TODO: freq_factors not implemented for mode 1");
2266+
if (!is_neox) {
2267+
GGML_ASSERT(id_src2 == nil && "TODO: freq_factors not implemented for !is_neox");
22782268
}
22792269

22802270
id<MTLComputePipelineState> pipeline = nil;

0 commit comments

Comments
 (0)