Fix building (#1508)

This commit is contained in:
Fangjun Kuang
2024-11-03 19:47:04 +08:00
committed by GitHub
parent f0cced1f37
commit 6ee8c99c5d
3 changed files with 6 additions and 6 deletions

View File

@@ -60,7 +60,7 @@ Ort::SessionOptions GetSessionOptionsImpl(
case Provider::kCPU:
break; // nothing to do for the CPU provider
case Provider::kXnnpack: {
#if ORT_API_VERSION >= 17
#if ORT_API_VERSION >= 12
if (std::find(available_providers.begin(), available_providers.end(),
"XnnpackExecutionProvider") != available_providers.end()) {
sess_opts.AppendExecutionProvider("XNNPACK");