File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -195,12 +195,12 @@ typedef void * thread_ret_t;
195
195
#define GGML_ALIGNED_FREE(ptr) _aligned_free(ptr)
196
196
#else
197
197
inline static void * ggml_aligned_malloc(size_t size) {
198
- void * aligned_memory = NULL;
199
- #ifdef GGML_USE_CPU_HBM
200
198
if (size == 0) {
201
- GGML_PRINT("WARNING: Behavior may be unexpected when allocate 0 byte for hbw_posix_memalign !");
199
+ GGML_PRINT("WARNING: Behavior may be unexpected when allocate 0 byte for ggml_aligned_malloc !");
202
200
return NULL;
203
201
}
202
+ void * aligned_memory = NULL;
203
+ #ifdef GGML_USE_CPU_HBM
204
204
int result = hbw_posix_memalign(&aligned_memory, 16, size);
205
205
#elif GGML_USE_METAL
206
206
int result = posix_memalign(&aligned_memory, sysconf(_SC_PAGESIZE), size);
You can’t perform that action at this time.
0 commit comments