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
This commit is contained in:
Hector Li 2022-10-13 11:08:35 -07:00 committed by GitHub
parent 807b2f4dd5
commit db32eacda1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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);
}