From db32eacda1050d3fdadcd043ef5b6d16f459f168 Mon Sep 17 00:00:00 2001 From: Hector Li Date: Thu, 13 Oct 2022 11:08:35 -0700 Subject: [PATCH] make the UNSIGNEDPD_CHECK for Windows only (#13260) Fix issue reported from https://github.com/microsoft/onnxruntime/issues/13247 The UNSIGNEDPD_CHECK should apply to Windows only --- onnxruntime/core/providers/snpe/snpe_runtime_wrapper.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/onnxruntime/core/providers/snpe/snpe_runtime_wrapper.h b/onnxruntime/core/providers/snpe/snpe_runtime_wrapper.h index 6d27dd67af..f34c079229 100644 --- a/onnxruntime/core/providers/snpe/snpe_runtime_wrapper.h +++ b/onnxruntime/core/providers/snpe/snpe_runtime_wrapper.h @@ -37,10 +37,12 @@ class SnpeRuntimeWrapper { bool IsAvailable() const { zdl::DlSystem::RuntimeCheckOption_t runtime_check_option = zdl::DlSystem::RuntimeCheckOption_t::DEFAULT; +#if defined(_WIN32) && defined(_M_ARM64) // check availability, explicitly requiring unsignedpd support if (runtime_ == zdl::DlSystem::Runtime_t::DSP) { runtime_check_option = zdl::DlSystem::RuntimeCheckOption_t::UNSIGNEDPD_CHECK; } +#endif return zdl::SNPE::SNPEFactory::isRuntimeAvailable(runtime_, runtime_check_option); }