@@ -91,7 +91,7 @@ void ggml_tallocr_alloc(struct ggml_tallocr * talloc, struct ggml_tensor * tenso
9191 if (talloc -> offset + size > ggml_backend_buffer_get_size (talloc -> buffer )) {
9292 fprintf (stderr , "%s: not enough space in the buffer to allocate %s (needed %zu, available %zu)\n" ,
9393 __func__ , tensor -> name , size , ggml_backend_buffer_get_size (talloc -> buffer ) - talloc -> offset );
94- GGML_ASSERT (! "not enough space in the buffer" );
94+ GGML_ABORT ( "not enough space in the buffer" );
9595 }
9696
9797 void * addr = (char * )ggml_backend_buffer_get_base (talloc -> buffer ) + talloc -> offset ;
@@ -132,7 +132,7 @@ static void add_allocated_tensor(struct ggml_dyn_tallocr * alloc, size_t offset,
132132 return ;
133133 }
134134 }
135- GGML_ASSERT (! "out of allocated_tensors" );
135+ GGML_ABORT ( "out of allocated_tensors" );
136136}
137137static void remove_allocated_tensor (struct ggml_dyn_tallocr * alloc , size_t offset , const struct ggml_tensor * tensor ) {
138138 for (int i = 0 ; i < 1024 ; i ++ ) {
@@ -142,7 +142,7 @@ static void remove_allocated_tensor(struct ggml_dyn_tallocr * alloc, size_t offs
142142 }
143143 }
144144 fprintf (stderr , "tried to free tensor %s not found\n" , tensor -> name );
145- GGML_ASSERT (! "tensor not found" );
145+ GGML_ABORT ( "tensor not found" );
146146}
147147#endif
148148
@@ -175,8 +175,7 @@ static size_t ggml_dyn_tallocr_alloc(struct ggml_dyn_tallocr * alloc, size_t siz
175175 // this should never happen
176176 fprintf (stderr , "%s: not enough space in the buffer to allocate %zu bytes, largest block available %zu bytes\n" ,
177177 __func__ , size , max_avail );
178- GGML_ASSERT (!"not enough space in the buffer" );
179- GGML_UNREACHABLE ();
178+ GGML_ABORT ("not enough space in the buffer" );
180179 }
181180 }
182181
0 commit comments