AI for Qualcomm Compute: How to add AI to your Windows on Snapdragon App

Thursday 9/21/23 11:25pm
Posted By Rami Husseini
  • Up0
  • Down0

Snapdragon and Qualcomm branded products are products of
Qualcomm Technologies, Inc. and/or its subsidiaries.

Windows on Snapdragon is the next-generation Windows platform. Powered by Qualcomm Technologies’ mobile compute platforms like the Snapdragon 8cx Gen 3, Windows on Snapdragon offers powerful performance and long battery life. This means you can build apps that run longer to keep your users more engaged. Additionally, its low-power, always-on capability, combined with its always-connected Wi-Fi and 5G options, let your apps run virtually anytime and anywhere.

But that’s not all. With AI making headlines today, the Snapdragon 8cx Gen 3 built-in NPU – the Qualcomm Hexagon Digital Signal Processor (DSP), is probably the most exciting feature. The Hexagon DSP forms the foundation of our Qualcomm AI Engine for AI at the edge applications and is powered by the Qualcomm AI Stack. With it, you can offload hardware-accelerated ML inference in your Windows apps to the Hexagon, while the CPU and GPU remain free to perform their respective processing.

To help you get started, Qualcomm Wireless Academy created a course: AI for Qualcomm Compute. This 15-part series explores how to get started developing for Windows on Snapdragon and integrate our AI Stack into your Windows apps. Let’s take a closer look at how the course is laid out.

A Course by Windows Developers, For Windows Developers
Rami Husseini, Director, Product Manager at Qualcomm Technologies, starts the series with an overview of Windows on Snapdragon, including how its key features can enhance your app’s user experience. Rami then introduces Windows Dev Kit 2023 (Figure 1 below), an affordable HDK for Windows on Snapdragon development, and discusses tools and frameworks and the different build options – native apps, emulation, and hybrid .

Figure 1 – Windows Dev Kit 2023

Pradeep Singh, Senior Engineer at Qualcomm Technologies, takes a deeper dive into those tools, frameworks, and libraries. He creates a basic Hello World console app from scratch, shows how to recompile two open-source projects to native Windows on Snapdragon, and reviews debugging an app.

Integrating AI into Windows on Snapdragon Apps
The course then focuses on integrating AI into Windows apps. Graeme Ashford, Engineer and Senior Staff Manager for Qualcomm Technologies, provides an overview of the Qualcomm's AI Stack. He reviews how the Qualcomm Neural Processing SDK for Windows optimizes (e.g., quantizes) ML models and converts them to DLC format – our proprietary format for optimal runtime inference on Hexagon. This workflow is shown in Figure 2.

Figure 2 – Neural Processing SDK workflow to convert an ML model to our optimized, proprietary format for execution on Snapdragon.

He discusses the roles of different ML practitioners in this workflow, including data scientists, ML training engineers, ML inference engineers, app developers, and DevOps engineers.

Graeme brings everything together by converting a ResNet50 image classification model from ONNX to DLC with the Qualcomm Neural Processing SDK. He shows how to prepare image data for processing by that model, then integrates the Qualcomm Neural Processing SDK runtime into a Windows on Snapdragon app to run inference with the optimized model.

Are you Ready to Build for Windows on Snapdragon?
Many companies, including Adobe, Sketchable Plus, and Shapr3D, are already developing or porting their apps to Windows on Snapdragon.

You can sign up for AI for Qualcomm Compute today – it’s quick and free! The course only takes about an hour to go through, after which you’ll be able to:

  • Prepare your development environment for Windows on Snapdragon development.
  • Compile/recompile an app for native or hybrid execution.
  • Build an ML model training pipeline.
  • Run inference in a C++ Windows on Snapdragon app.

Quick Tip: Here’s something you can try today if you plan to port your app. With Visual Studio 2022, you can cross-compile a Windows on Snapdragon binary using your existing x64 machine. While you’ll need a device with Windows on Snapdragon to run the output, you can still check to see what sort of build issues, if any, you’ll encounter before your HDK arrives.

Here are some additional resources for you:

Snapdragon and Qualcomm branded products are products of Qualcomm Technologies, Inc. and/or its subsidiaries. Qualcomm Wireless Academy is a program of Qualcomm Technologies, Inc. and/or its subsidiaries.