Skip to content

Commit

Permalink
Fix mismatched use of xnn_allocate_zero_simd_memory and xnn_release_m…
Browse files Browse the repository at this point in the history
…emory

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
  • Loading branch information
dsharletg authored and xnnpack-bot committed Feb 19, 2025
1 parent e4113ae commit 4e06318
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/runtime.c
Original file line number Diff line number Diff line change
Expand Up @@ -532,7 +532,7 @@ enum xnn_status xnn_create_runtime_v4(

if (workspace == NULL) {
xnn_log_debug("Allocating non-shared workspace");
workspace = xnn_allocate_zero_simd_memory(sizeof(struct xnn_workspace));
workspace = xnn_allocate_zero_memory(sizeof(struct xnn_workspace));
}

const uint32_t optimization_flags = XNN_FLAG_HINT_SPARSE_INFERENCE | XNN_FLAG_HINT_FP16_INFERENCE |
Expand Down

0 comments on commit 4e06318

Please sign in to comment.