Commit 01f80e7
Qualcomm AI Engine Direct - Support Windows native build (pytorch#20052)
## Summary
This PR updates the CMake files to enable native Windows builds for the
QNN ExecuTorch components.
Specifically, it adds support for building both the QNN backend as a
Windows dynamic library (.dll) and the corresponding runner executable
(.exe).
## Core Changes
### 1. CMake Enhancements
- Extend existing CMake to support native Windows builds.
- Enable generation of `qnn_executorch_backend.dll` and
`qnn_executor_runner.exe`.
### 2. Build Script Support
- Provide a dedicated build script to simplify and standardize the
Windows build process.
- The script configures the appropriate CMake options and toolchain
settings required for Windows.
## Build instructions
1. `.\install_executorch.bat` to build `PyQnnManagerAdaptor*.pyd` and
its static library as dependencies.
2. `.\backends\qualcomm\scripts\build.ps1 -SkipArm64Windows -Release` to
build Windows x86_64 AOT on Windows x86_64.
3. `.\backends\qualcomm\scripts\build.ps1 -SkipX86Windows -Release` to
cross compile and build WoA Runtime on Windows x86_64.
## Follow-up
- Add PyTorch documentation change.
---------
Co-authored-by: Cheng-Hsin Weng <chenweng@qti.qualcomm.com>1 parent d0a8dd6 commit 01f80e7
13 files changed
Lines changed: 497 additions & 50 deletions
File tree
- backends/qualcomm
- aot/wrappers
- runtime/backends
- scripts
- examples
- models
- llama
- runner
- llava
- qualcomm
- oss_scripts/llama/runner
- multimodal_runner
- kernels/quantized
- third-party
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
77 | 77 | | |
78 | 78 | | |
79 | 79 | | |
80 | | - | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
81 | 85 | | |
82 | 86 | | |
83 | 87 | | |
| |||
89 | 93 | | |
90 | 94 | | |
91 | 95 | | |
92 | | - | |
93 | | - | |
94 | | - | |
95 | | - | |
96 | | - | |
97 | | - | |
98 | | - | |
99 | | - | |
100 | | - | |
101 | | - | |
102 | | - | |
103 | | - | |
| 96 | + | |
| 97 | + | |
104 | 98 | | |
105 | | - | |
106 | | - | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
107 | 116 | | |
108 | 117 | | |
109 | 118 | | |
| |||
275 | 284 | | |
276 | 285 | | |
277 | 286 | | |
278 | | - | |
279 | | - | |
280 | | - | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
281 | 299 | | |
282 | 300 | | |
283 | 301 | | |
284 | 302 | | |
285 | 303 | | |
286 | 304 | | |
287 | | - | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
288 | 308 | | |
289 | 309 | | |
290 | 310 | | |
| |||
316 | 336 | | |
317 | 337 | | |
318 | 338 | | |
319 | | - | |
| 339 | + | |
320 | 340 | | |
321 | 341 | | |
322 | 342 | | |
| |||
350 | 370 | | |
351 | 371 | | |
352 | 372 | | |
353 | | - | |
354 | | - | |
355 | | - | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
356 | 380 | | |
357 | 381 | | |
358 | 382 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
11 | | - | |
12 | | - | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
47 | | - | |
| 47 | + | |
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
| |||
0 commit comments