Skip to content

Commit 4e06318

Browse files
dsharletgxnnpack-bot
authored andcommitted
Fix mismatched use of xnn_allocate_zero_simd_memory and xnn_release_memory
This causes crashes on windows, uncovered in #7830. This bug appears with `xnn_create_runtime_v4`, other paths that allocate workspaces have matching allocate/free calls. PiperOrigin-RevId: 728501674
1 parent e4113ae commit 4e06318

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/runtime.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -532,7 +532,7 @@ enum xnn_status xnn_create_runtime_v4(
532532

533533
if (workspace == NULL) {
534534
xnn_log_debug("Allocating non-shared workspace");
535-
workspace = xnn_allocate_zero_simd_memory(sizeof(struct xnn_workspace));
535+
workspace = xnn_allocate_zero_memory(sizeof(struct xnn_workspace));
536536
}
537537

538538
const uint32_t optimization_flags = XNN_FLAG_HINT_SPARSE_INFERENCE | XNN_FLAG_HINT_FP16_INFERENCE |

0 commit comments

Comments
 (0)