Datasets:

Modalities:
Text
Formats:
text
Libraries:
Datasets
License:
alexhang commited on
Commit
ba67797
·
verified ·
1 Parent(s): a7c5b83

Publish experimental Windows CPython 3.10 MMCV CPU wheel

Browse files

Add unmodified MMCV 2.2.0 CPU ops for Windows AMD64 / Torch 2.4.1+cpu, original build and fresh-environment reports, independent integrity/DLL review, and additive notices. Existing wheels and notices archive unchanged. Full Windows MAAP3D/model and clean-host validation remain pending.

.gitattributes CHANGED
@@ -64,3 +64,4 @@ sam3-0.1.0+maap3d.847e1a3b.1-py3-none-any.whl filter=lfs diff=lfs merge=lfs -tex
64
  sam3-0.1.0+maap3d.847e1a3b.2-py3-none-any.whl filter=lfs diff=lfs merge=lfs -text
65
  mmcv-2.2.0-cp310-cp310-win_amd64.whl filter=lfs diff=lfs merge=lfs -text
66
  mmcv-2.2.0-1cu128sm120-cp310-cp310-win_amd64.whl filter=lfs diff=lfs merge=lfs -text
 
 
64
  sam3-0.1.0+maap3d.847e1a3b.2-py3-none-any.whl filter=lfs diff=lfs merge=lfs -text
65
  mmcv-2.2.0-cp310-cp310-win_amd64.whl filter=lfs diff=lfs merge=lfs -text
66
  mmcv-2.2.0-1cu128sm120-cp310-cp310-win_amd64.whl filter=lfs diff=lfs merge=lfs -text
67
+ mmcv-2.2.0-1cpupt241-cp310-cp310-win_amd64.whl filter=lfs diff=lfs merge=lfs -text
PROVENANCE.json CHANGED
@@ -173,6 +173,78 @@
173
  "builds/windows-cu128-sm120/GPU_VERIFICATION.json",
174
  "builds/windows-cu128-sm120/PUBLICATION_CHECKS.json"
175
  ]
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
176
  }
177
  ],
178
  "builder": "tools/build_patched_wheels.py",
 
173
  "builds/windows-cu128-sm120/GPU_VERIFICATION.json",
174
  "builds/windows-cu128-sm120/PUBLICATION_CHECKS.json"
175
  ]
176
+ },
177
+ {
178
+ "key": "mmcv-windows-cpu-cp310",
179
+ "distribution": "mmcv",
180
+ "version": "2.2.0",
181
+ "build_tag": "1cpupt241",
182
+ "wheel": "mmcv-2.2.0-1cpupt241-cp310-cp310-win_amd64.whl",
183
+ "sha256": "35db4db7d467f45e71e4d50c19ffaf6e35c713053109ff413d199ac503a45389",
184
+ "upstream_repository": "https://github.com/open-mmlab/mmcv",
185
+ "upstream_version": "2.2.0",
186
+ "upstream_source_url": "https://files.pythonhosted.org/packages/e9/a2/57a733e7e84985a8a0e3101dfb8170fc9db92435c16afad253069ae3f9df/mmcv-2.2.0.tar.gz",
187
+ "upstream_source_sha256": "ac479247e808d8802f89eadf04d4118de86bdfe81361ec5aed0cc1bf731c67c9",
188
+ "profile": "Experimental native Windows CPython 3.10 / AMD64 / Torch 2.4.1+cpu only",
189
+ "changes": [
190
+ "Compile unmodified MMCV 2.2.0 source with MMCV_WITH_OPS=1 and FORCE_CUDA=0.",
191
+ "Use distinct wheel build tag 1cpupt241; distribution version remains 2.2.0."
192
+ ],
193
+ "builder": "builds/windows-cpu/build_mmcv.py",
194
+ "compiler": "Visual Studio 2026 MSVC v145 / 19.51.36260 (approved deviation from v143 handoff)",
195
+ "license": "Apache-2.0 generally; see operation-specific upstream LICENSES.md and existing NVIDIA notices",
196
+ "license_files": [
197
+ "licenses/mmcv/LICENSE",
198
+ "licenses/mmcv/LICENSES.md",
199
+ "licenses/mmcv/NVIDIA-StyleGAN2-LICENSE.txt",
200
+ "licenses/mmcv/NVIDIA-StyleGAN3-LICENSE.txt"
201
+ ],
202
+ "validation": {
203
+ "wheel": "mmcv-2.2.0-1cpupt241-cp310-cp310-win_amd64.whl",
204
+ "sha256": "35db4db7d467f45e71e4d50c19ffaf6e35c713053109ff413d199ac503a45389",
205
+ "size_bytes": 1059408,
206
+ "zip_crc": "passed",
207
+ "duplicate_archive_members": false,
208
+ "record_hashes_and_sizes_verified": 537,
209
+ "extension": "mmcv/_ext.cp310-win_amd64.pyd",
210
+ "pe_machine": "AMD64 (0x8664)",
211
+ "wheel_build": "1cpupt241",
212
+ "wheel_tag": "cp310-cp310-win_amd64",
213
+ "dll_imports": [
214
+ "c10.dll",
215
+ "torch_cpu.dll",
216
+ "torch_python.dll",
217
+ "MSVCP140.dll",
218
+ "python310.dll",
219
+ "KERNEL32.dll",
220
+ "VCRUNTIME140_1.dll",
221
+ "VCRUNTIME140.dll",
222
+ "api-ms-win-crt-heap-l1-1-0.dll",
223
+ "api-ms-win-crt-string-l1-1-0.dll",
224
+ "api-ms-win-crt-runtime-l1-1-0.dll",
225
+ "api-ms-win-crt-math-l1-1-0.dll"
226
+ ],
227
+ "cuda_dll_dependencies": false,
228
+ "licenses": [
229
+ "mmcv-2.2.0.dist-info/licenses/LICENSE",
230
+ "mmcv-2.2.0.dist-info/licenses/LICENSES.md"
231
+ ],
232
+ "supplied_windows_validation": "CPU NMS, RoIAlign forward/backward, and pip check passed",
233
+ "fresh_windows_environment": "CPU NMS, RoIAlign forward/backward and pip check passed (supplied logs)",
234
+ "compiler_deviation": "VS 2026 MSVC v145 / 19.51.36260; approved on build host, no source patches",
235
+ "not_run": [
236
+ "Full Windows MAAP3D installation and OpenMMLab model smoke",
237
+ "Checkpoint-backed CPU inference",
238
+ "Clean Windows machine without Build Tools"
239
+ ]
240
+ },
241
+ "reports": [
242
+ "builds/windows-cpu/BUILD_REPORT.json",
243
+ "builds/windows-cpu/BUILD_SUMMARY.md",
244
+ "builds/windows-cpu/VERIFICATION_LOG.txt",
245
+ "builds/windows-cpu/DLL_DEPENDENCIES.txt",
246
+ "builds/windows-cpu/PUBLICATION_CHECKS.json"
247
+ ]
248
  }
249
  ],
250
  "builder": "tools/build_patched_wheels.py",
README.md CHANGED
@@ -29,6 +29,7 @@ redistributing or using an artifact.
29
  | --- | --- | --- | --- |
30
  | `mmcv` | `2.2.0`, Windows `cp310` | Torch 2.4.1/cu121; SM75/80/86/89 | Apache-2.0 generally; see MMCV special-operation NVIDIA notices |
31
  | `mmcv` | `2.2.0`, build `1cu128sm120`, Windows `cp310` | Experimental Torch 2.7.1/cu128; SM120 only | Apache-2.0 generally; see MMCV special-operation NVIDIA notices |
 
32
  | `mmdet` | `3.3.0+maap3d.cfd5d3a9.1` | CUDA 12.1 and CUDA 12.8 full/dev | Apache-2.0 |
33
  | `sam3` | `0.1.0+maap3d.847e1a3b.1` | Legacy CUDA 12.8 artifact with PyTorch >=2.7 | Custom SAM License dated November 19, 2025 |
34
  | `sam3` | `0.1.0+maap3d.847e1a3b.2` | CUDA 12.1 and CUDA 12.8 full/dev with PyTorch >=2.4 | Custom SAM License dated November 19, 2025 |
@@ -73,6 +74,36 @@ and [StyleGAN3](licenses/mmcv/NVIDIA-StyleGAN3-LICENSE.txt) license texts accomp
73
  these artifacts; their research/evaluation use restrictions remain applicable.
74
  The general Apache license does not override those operation-specific terms.
75
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
76
  ## What was changed
77
 
78
  - **MMDetection:** widens the package's runtime MMCV version guard so the
@@ -143,12 +174,15 @@ After downloading the complete artifact set, verify it with:
143
  sha256sum -c SHA256SUMS
144
  ```
145
 
146
- `SHA256SUMS` covers the seven wheels and
147
- `THIRD_PARTY_WHEEL_NOTICES.zip`. It does not cover repository documentation,
 
148
  the standalone license copies, or `PROVENANCE.json`.
149
 
150
- The notices archive contains a snapshot of the release notice, provenance, and
151
- upstream license copies. Each wheel also carries its applicable package license
 
 
152
  metadata. Model checkpoints, PyTorch/CUDA runtimes, `xtcocotools`, and
153
  other transitive dependencies are not included. Model checkpoints can have
154
  terms separate from their source code and must be obtained from an authorized
 
29
  | --- | --- | --- | --- |
30
  | `mmcv` | `2.2.0`, Windows `cp310` | Torch 2.4.1/cu121; SM75/80/86/89 | Apache-2.0 generally; see MMCV special-operation NVIDIA notices |
31
  | `mmcv` | `2.2.0`, build `1cu128sm120`, Windows `cp310` | Experimental Torch 2.7.1/cu128; SM120 only | Apache-2.0 generally; see MMCV special-operation NVIDIA notices |
32
+ | `mmcv` | `2.2.0`, build `1cpupt241`, Windows `cp310` | Experimental Torch 2.4.1+cpu; AMD64 | Apache-2.0 generally; see MMCV operation-specific notices |
33
  | `mmdet` | `3.3.0+maap3d.cfd5d3a9.1` | CUDA 12.1 and CUDA 12.8 full/dev | Apache-2.0 |
34
  | `sam3` | `0.1.0+maap3d.847e1a3b.1` | Legacy CUDA 12.8 artifact with PyTorch >=2.7 | Custom SAM License dated November 19, 2025 |
35
  | `sam3` | `0.1.0+maap3d.847e1a3b.2` | CUDA 12.1 and CUDA 12.8 full/dev with PyTorch >=2.4 | Custom SAM License dated November 19, 2025 |
 
74
  these artifacts; their research/evaluation use restrictions remain applicable.
75
  The general Apache license does not override those operation-specific terms.
76
 
77
+ ## Experimental Windows CPU MMCV wheel
78
+
79
+ `mmcv-2.2.0-1cpupt241-cp310-cp310-win_amd64.whl` uses unmodified MMCV 2.2.0
80
+ source, CPU operators only, native Windows AMD64, CPython 3.10, and exactly
81
+ Torch 2.4.1+cpu (TorchVision 0.19.1+cpu / TorchAudio 2.4.1+cpu). Python 3.11,
82
+ Windows ARM64 and CUDA Torch are outside this artifact's ABI. Wheel tags do
83
+ not encode the Torch ABI. SHA-256:
84
+ `35db4db7d467f45e71e4d50c19ffaf6e35c713053109ff413d199ac503a45389`.
85
+
86
+ The Windows build used VS 2026/MSVC v145 (19.51.36260), an approved deviation
87
+ from the handoff's VS 2022/v143 target, with no source patches. Supplied build
88
+ and separate-environment logs show CPU NMS, RoIAlign forward/backward and
89
+ `pip check` passing. Independent Linux publication checks verified the exact
90
+ SHA-256, all 537 RECORD hashes/sizes, ZIP integrity, AMD64 PE extension,
91
+ licenses, and DLL imports with no CUDA dependencies. Original scripts and
92
+ reports are preserved under [`builds/windows-cpu/`](builds/windows-cpu/).
93
+ Historical candidate-only wording in those original reports describes their
94
+ build-time status; this section records the subsequent publication.
95
+
96
+ `python install_package.py --cpu` in the updated MAAP3D checkout selects this
97
+ wheel from an immutable revision, verifies SHA-256, and force-reinstalls with
98
+ `--no-deps`. No GPU, CUDA toolkit or MMCV compiler is required. Install the
99
+ [Microsoft Visual C++ x64 Redistributable](https://aka.ms/vc14/vc_redist.x64.exe)
100
+ for the MSVCP140/VCRUNTIME140 runtime DLLs, alongside matching CPU Torch/Python.
101
+
102
+ **Full Windows MAAP3D installation, OpenMMLab model checks, checkpoint-backed
103
+ inference, and a clean Windows machine without Build Tools have NOT RUN.**
104
+ The installer retains its CPU operator/model smoke and final `pip check`.
105
+ This remains an experimental component release pending those checks.
106
+
107
  ## What was changed
108
 
109
  - **MMDetection:** widens the package's runtime MMCV version guard so the
 
174
  sha256sum -c SHA256SUMS
175
  ```
176
 
177
+ `SHA256SUMS` covers the eight wheels, the original
178
+ `THIRD_PARTY_WHEEL_NOTICES.zip`, and the additive
179
+ `THIRD_PARTY_WHEEL_NOTICES-windows-cpu-20261025.zip`. It does not cover repository documentation,
180
  the standalone license copies, or `PROVENANCE.json`.
181
 
182
+ The original notices archive retains its earlier release snapshot. The additive
183
+ [Windows CPU notices archive](THIRD_PARTY_WHEEL_NOTICES-windows-cpu-20261025.zip)
184
+ contains the updated release notice/provenance and applicable MMCV license
185
+ copies, without replacing the existing archive. Each wheel also carries its applicable package license
186
  metadata. Model checkpoints, PyTorch/CUDA runtimes, `xtcocotools`, and
187
  other transitive dependencies are not included. Model checkpoints can have
188
  terms separate from their source code and must be obtained from an authorized
SHA256SUMS CHANGED
@@ -6,3 +6,5 @@ d1fb98bf41865273eb4737a0391c2d2773c21eed15b6a0c747ec7190bd705974 chumpy-0.71+ma
6
  a0a1b913b1431bf847b278a43dcb3e0e800df6296ba66c0f4d10b2498c09121b mmcv-2.2.0-cp310-cp310-win_amd64.whl
7
  c67bca0e3d24611cf4241150f5ce9e03ca8b8697f38bb2ba497cabbf996cfcdd mmcv-2.2.0-1cu128sm120-cp310-cp310-win_amd64.whl
8
  14b7d2bed1ae109608b1e50b722c6cbe13ea6bdf01e1cbe1aa57e1a56fa8d4ae THIRD_PARTY_WHEEL_NOTICES.zip
 
 
 
6
  a0a1b913b1431bf847b278a43dcb3e0e800df6296ba66c0f4d10b2498c09121b mmcv-2.2.0-cp310-cp310-win_amd64.whl
7
  c67bca0e3d24611cf4241150f5ce9e03ca8b8697f38bb2ba497cabbf996cfcdd mmcv-2.2.0-1cu128sm120-cp310-cp310-win_amd64.whl
8
  14b7d2bed1ae109608b1e50b722c6cbe13ea6bdf01e1cbe1aa57e1a56fa8d4ae THIRD_PARTY_WHEEL_NOTICES.zip
9
+ 35db4db7d467f45e71e4d50c19ffaf6e35c713053109ff413d199ac503a45389 mmcv-2.2.0-1cpupt241-cp310-cp310-win_amd64.whl
10
+ 99d8adfd9a317a41b086e3bcf2fc82bed0d6ab0a977fa3ba6853d84aaa3b04a9 THIRD_PARTY_WHEEL_NOTICES-windows-cpu-20261025.zip
THIRD_PARTY_WHEEL_NOTICES-windows-cpu-20261025.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:99d8adfd9a317a41b086e3bcf2fc82bed0d6ab0a977fa3ba6853d84aaa3b04a9
3
+ size 18508
builds/windows-cpu/BUILD_LOG.txt ADDED
The diff for this file is too large to render. See raw diff
 
builds/windows-cpu/BUILD_REPORT.json ADDED
@@ -0,0 +1,38 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "wheel": "mmcv-2.2.0-1cpupt241-cp310-cp310-win_amd64.whl",
3
+ "sha256": "35db4db7d467f45e71e4d50c19ffaf6e35c713053109ff413d199ac503a45389",
4
+ "size_bytes": 1059408,
5
+ "profile": {
6
+ "architecture": "x86_64",
7
+ "torch": "2.4.1+cpu",
8
+ "build_tag": "1cpupt241"
9
+ },
10
+ "python": "3.10.22 | packaged by Anaconda, Inc. | (main, Oct 1 2026, 20:15:38) [MSC v.1942 64 bit (AMD64)]",
11
+ "platform": "Windows-10-10.0.26200-SP0",
12
+ "compiler": "usage: cl [ option... ] filename... [ /link linkoption... ]\nMicrosoft (R) C/C++ Optimizing Compiler Version 19.51.36260 for x64\nCopyright (C) Microsoft Corporation. All rights reserved.\n\n",
13
+ "source_url": "https://files.pythonhosted.org/packages/e9/a2/57a733e7e84985a8a0e3101dfb8170fc9db92435c16afad253069ae3f9df/mmcv-2.2.0.tar.gz",
14
+ "source_sha256": "ac479247e808d8802f89eadf04d4118de86bdfe81361ec5aed0cc1bf731c67c9",
15
+ "source_patches": [],
16
+ "macos_deployment_target_env": null,
17
+ "build_packages": {
18
+ "setuptools": "80.9.0",
19
+ "wheel": "0.44.0",
20
+ "ninja": "1.11.1.4",
21
+ "psutil": "6.1.1"
22
+ },
23
+ "validation": "CPU NMS, RoIAlign forward/backward, and pip check passed",
24
+ "limits": [
25
+ "Native target, Python 3.10 and exact Torch ABI only",
26
+ "No full MAAP3D/model/checkpoint or compiler-free clean-machine validation yet",
27
+ "Local candidate; no publishing or installer modifications"
28
+ ],
29
+ "extension": "mmcv/_ext.cp310-win_amd64.pyd",
30
+ "record_hashes_verified": 537,
31
+ "licenses": [
32
+ "mmcv-2.2.0.dist-info/licenses/LICENSE",
33
+ "mmcv-2.2.0.dist-info/licenses/LICENSES.md"
34
+ ],
35
+ "wheel_tags": [
36
+ "cp310-cp310-win_amd64"
37
+ ]
38
+ }
builds/windows-cpu/BUILD_SUMMARY.md ADDED
@@ -0,0 +1,48 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Windows CPU MMCV wheel build summary
2
+
3
+ Build date: 2026-10-22 (Asia/Tokyo)
4
+
5
+ ## Artifact
6
+
7
+ - Wheel: `mmcv-2.2.0-1cpupt241-cp310-cp310-win_amd64.whl`
8
+ - Size: 1,059,408 bytes
9
+ - SHA-256: `35db4db7d467f45e71e4d50c19ffaf6e35c713053109ff413d199ac503a45389`
10
+ - Target: native Windows x64, CPython 3.10, Torch 2.4.1+cpu
11
+
12
+ ## Build environment
13
+
14
+ - Windows: Windows 10 Pro 25H2, build 26200.9711, x64
15
+ - Python: CPython 3.10.22, 64-bit AMD64
16
+ - Torch: 2.4.1+cpu (`torch.version.cuda is None`)
17
+ - TorchVision: 0.19.1+cpu
18
+ - TorchAudio: 2.4.1+cpu
19
+ - NumPy: 1.26.4
20
+ - MMCV source: 2.2.0, source SHA-256 `ac479247e808d8802f89eadf04d4118de86bdfe81361ec5aed0cc1bf731c67c9`
21
+ - Compiler: Visual Studio Community 2026, MSVC 19.51.36260 for x64 (toolset 14.51/v145)
22
+ - Windows SDK: 10.0.26100.0
23
+
24
+ ## Validation
25
+
26
+ - Build-environment CPU NMS: PASS
27
+ - Build-environment RoIAlign forward/backward: PASS
28
+ - Build-environment `pip check`: PASS
29
+ - Fresh separate CPython 3.10 environment `--verify-only`: PASS
30
+ - Fresh-environment CPU NMS: PASS
31
+ - Fresh-environment RoIAlign forward/backward: PASS
32
+ - Fresh-environment `pip check`: PASS
33
+ - Wheel tag and AMD64 extension inspection: PASS
34
+ - Wheel RECORD hashes: PASS (537 entries)
35
+ - Upstream license files: PASS
36
+ - DLL dependency inspection: PASS; no CUDA DLLs or other unexpected dependencies were found. See `DLL_DEPENDENCIES.txt`.
37
+
38
+ ## Changes and deviations
39
+
40
+ - MMCV source patches: none.
41
+ - Handoff build-script changes: none.
42
+ - Compiler deviation: the handoff requested Visual Studio 2022/MSVC v143. That toolset was not installed. With user approval, the wheel was built and validated using Visual Studio 2026/MSVC v145. The exact compiler is recorded in `BUILD_REPORT.json` and `BUILD_LOG.txt`.
43
+
44
+ ## Remaining gaps
45
+
46
+ - MAAP3D/model validation: **NOT RUN**. A local `MAAP3D_Toolbox` directory exists, but it does not contain the handoff's required `openmmlab_cpu_smoke.py`, so it could not perform the prescribed current-checkout test.
47
+ - Compiler-free clean-machine validation: **NOT RUN**. The separate verification environment did not initialize a compiler shell, but Visual Studio and its runtime remain installed on this machine.
48
+ - This is a local candidate only; it was not published and no installer URLs were changed.
builds/windows-cpu/CODEX_TASK.md ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Codex task: build and validate the Windows CPU MMCV wheel
2
+
3
+ Read `README.md` here first. This folder is self-contained; do not assume a
4
+ parent MAAP3D checkout exists. Work on native Windows AMD64, using a fresh
5
+ 64-bit CPython 3.10 environment and exactly Torch 2.4.1+cpu / NumPy 1.26.4.
6
+
7
+ 1. Inspect the actual host and available VS 2022 x64 compiler tools. Initialize
8
+ the developer environment in the same process that runs the build; another
9
+ terminal's environment does not propagate to your tools.
10
+ 2. Follow the build environment and pinned dependency commands in README.
11
+ Run `python build_mmcv.py`. Monitor `dist/BUILD_LOG.txt` while compiling.
12
+ This is CPU-only: no GPU, CUDA toolkit, or CUDA Torch wheel is needed.
13
+ 3. Diagnose real failures. Make only necessary build-script or temporary MMCV
14
+ source changes; save a patch and explain every source change. Preserve CPU
15
+ operators, ABI pins, upstream licenses, original artifacts, and failed logs.
16
+ After an incomplete build use a new output directory, not an overwrite.
17
+ 4. Use a separate fresh runtime environment and `--verify-only` on the same
18
+ wheel. Require CPU NMS, RoIAlign forward/backward, and `pip check` to pass.
19
+ Inspect unexpected DLL dependencies; do not mask a CPU build failure by
20
+ switching to a GPU wheel or removing compiled operators.
21
+ 5. If a full current MAAP3D checkout is available, perform the optional model
22
+ verification in README using the patched MMDetection wheel. Otherwise say
23
+ **NOT RUN** for model/MAAP3D checks. Do not claim a fresh conda environment
24
+ on a developer machine proves installation on a clean machine without
25
+ Build Tools; report that check separately.
26
+
27
+ Finish with the wheel path, SHA-256, Python/Torch/NumPy/compiler/Windows
28
+ versions, CPU test and pip-check outcomes, patches made, and remaining gaps.
29
+ Save your summary beside the artifact. The user will copy the folder back.
30
+ Do not publish, upload, push commits, change MAAP3D installers, or replace
31
+ hosted wheels. Ask only when an essential machine/system setup action needs
32
+ the user's participation; continue with all independent authorized work.
builds/windows-cpu/DLL_DEPENDENCIES.txt ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Microsoft (R) COFF/PE Dumper Version 14.51.36260.0
2
+ Copyright (C) Microsoft Corporation. All rights reserved.
3
+
4
+
5
+ Dump of file C:\Users\alexh\Documents\Codex\2026-10-22\c\work\env-mmcv-verify\Lib\site-packages\mmcv\_ext.cp310-win_amd64.pyd
6
+
7
+ File Type: DLL
8
+
9
+ Image has the following dependencies:
10
+
11
+ c10.dll
12
+ torch_cpu.dll
13
+ torch_python.dll
14
+ MSVCP140.dll
15
+ python310.dll
16
+ KERNEL32.dll
17
+ VCRUNTIME140_1.dll
18
+ VCRUNTIME140.dll
19
+ api-ms-win-crt-heap-l1-1-0.dll
20
+ api-ms-win-crt-string-l1-1-0.dll
21
+ api-ms-win-crt-runtime-l1-1-0.dll
22
+ api-ms-win-crt-math-l1-1-0.dll
23
+
24
+ Summary
25
+
26
+ 7000 .data
27
+ 4000 .pdata
28
+ 26000 .rdata
29
+ 1000 .reloc
30
+ 1000 .rsrc
31
+ AE000 .text
builds/windows-cpu/PUBLICATION_CHECKS.json ADDED
@@ -0,0 +1,39 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "wheel": "mmcv-2.2.0-1cpupt241-cp310-cp310-win_amd64.whl",
3
+ "sha256": "35db4db7d467f45e71e4d50c19ffaf6e35c713053109ff413d199ac503a45389",
4
+ "size_bytes": 1059408,
5
+ "zip_crc": "passed",
6
+ "duplicate_archive_members": false,
7
+ "record_hashes_and_sizes_verified": 537,
8
+ "extension": "mmcv/_ext.cp310-win_amd64.pyd",
9
+ "pe_machine": "AMD64 (0x8664)",
10
+ "wheel_build": "1cpupt241",
11
+ "wheel_tag": "cp310-cp310-win_amd64",
12
+ "dll_imports": [
13
+ "c10.dll",
14
+ "torch_cpu.dll",
15
+ "torch_python.dll",
16
+ "MSVCP140.dll",
17
+ "python310.dll",
18
+ "KERNEL32.dll",
19
+ "VCRUNTIME140_1.dll",
20
+ "VCRUNTIME140.dll",
21
+ "api-ms-win-crt-heap-l1-1-0.dll",
22
+ "api-ms-win-crt-string-l1-1-0.dll",
23
+ "api-ms-win-crt-runtime-l1-1-0.dll",
24
+ "api-ms-win-crt-math-l1-1-0.dll"
25
+ ],
26
+ "cuda_dll_dependencies": false,
27
+ "licenses": [
28
+ "mmcv-2.2.0.dist-info/licenses/LICENSE",
29
+ "mmcv-2.2.0.dist-info/licenses/LICENSES.md"
30
+ ],
31
+ "supplied_windows_validation": "CPU NMS, RoIAlign forward/backward, and pip check passed",
32
+ "fresh_windows_environment": "CPU NMS, RoIAlign forward/backward and pip check passed (supplied logs)",
33
+ "compiler_deviation": "VS 2026 MSVC v145 / 19.51.36260; approved on build host, no source patches",
34
+ "not_run": [
35
+ "Full Windows MAAP3D installation and OpenMMLab model smoke",
36
+ "Checkpoint-backed CPU inference",
37
+ "Clean Windows machine without Build Tools"
38
+ ]
39
+ }
builds/windows-cpu/README.md ADDED
@@ -0,0 +1,184 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Build the Windows CPU MMCV wheel
2
+
3
+ Copy **this entire folder** to the Windows laptop, for example
4
+ `C:\mmcv_cpu`. It works without a MAAP3D checkout. Open this folder in Codex
5
+ and ask it to follow `CODEX_TASK.md`. The scripts have been checked on Linux,
6
+ but their native Windows compilation and runtime tests have not run here.
7
+
8
+ This is a **CPU** wheel. A GPU and CUDA toolkit are unnecessary, including
9
+ on a laptop that happens to have an NVIDIA GPU. The existing Windows CUDA
10
+ 12.1 and Blackwell wheels cannot substitute for this artifact.
11
+
12
+ ## Target and outputs
13
+
14
+ | Setting | Required value |
15
+ | --- | --- |
16
+ | OS / architecture | Native 64-bit Windows / AMD64 |
17
+ | Python | CPython 3.10, patch version 3.10.12 or newer |
18
+ | Torch | 2.4.1+cpu |
19
+ | TorchVision / TorchAudio | 0.19.1+cpu / 2.4.1+cpu |
20
+ | NumPy / MMCV | 1.26.4 / 2.2.0 |
21
+ | Compiler | Visual Studio 2022 MSVC v143, x64 target |
22
+ | Expected wheel | `mmcv-2.2.0-1cpupt241-cp310-cp310-win_amd64.whl` |
23
+
24
+ The `1cpupt241` build tag distinguishes this binary from the CUDA artifacts.
25
+ Pip wheel tags do **not** enforce the Torch ABI; always use the exact Torch
26
+ version above. Python 3.11 needs a separate build and is outside this handoff.
27
+ Windows ARM64 and emulated x64-on-ARM are outside this candidate's scope.
28
+
29
+ The script saves the wheel, SHA-256, source/compiler/platform information,
30
+ license and wheel RECORD checks, and complete build/verification logs under
31
+ `dist\`. A successful operator smoke is not a full MAAP3D inference test.
32
+
33
+ ## 1. Install build prerequisites
34
+
35
+ Install native x64 Miniconda or Anaconda, then install
36
+ [Visual Studio 2022 Build Tools](https://aka.ms/vs/17/release/vs_BuildTools.exe).
37
+ Choose **Desktop development with C++**, including:
38
+
39
+ - **MSVC v143 C++ x64/x86 build tools**.
40
+ - A **Windows 10 or Windows 11 SDK**.
41
+
42
+ The compiler is needed on the wheel-building machine. After the wheel is
43
+ validated and distributed, users should only need the matching runtime,
44
+ including the [Microsoft Visual C++ x64 Redistributable](https://aka.ms/vc14/vc_redist.x64.exe).
45
+ That future clean-machine installation still needs verification.
46
+
47
+ Use **Anaconda Prompt (cmd.exe syntax)** for the commands below. Initialize
48
+ the compiler in that same prompt:
49
+
50
+ ```bat
51
+ call "%ProgramFiles(x86)%\Microsoft Visual Studio\2022\BuildTools\VC\Auxiliary\Build\vcvars64.bat"
52
+ where cl
53
+ where link
54
+ echo %VSCMD_ARG_TGT_ARCH%
55
+ ```
56
+
57
+ The last command must show `x64`. If using Visual Studio Community,
58
+ Professional, or Enterprise, adjust the installation path accordingly.
59
+ Alternatively, start **x64 Native Tools Command Prompt for VS 2022** and
60
+ initialize conda there. A separate developer prompt does not configure an
61
+ already-running Codex terminal: Codex must run builds in an initialized
62
+ process, or call the batch file and activate conda in the same cmd invocation.
63
+
64
+ See [Microsoft's command-line tool setup](https://learn.microsoft.com/en-us/cpp/build/building-on-the-command-line)
65
+ for details. No CUDA installation is required for this CPU build.
66
+
67
+ ## 2. Create a disposable build environment
68
+
69
+ Use a new environment so an existing CUDA Torch or MMCV cannot leak in:
70
+
71
+ ```bat
72
+ conda create -n maap3d-mmcv-cpu-build python=3.10 -y
73
+ conda activate maap3d-mmcv-cpu-build
74
+ cd /d C:\mmcv_cpu
75
+ python -m pip install pip==25.0.1
76
+ python -m pip install torch==2.4.1+cpu torchvision==0.19.1+cpu torchaudio==2.4.1+cpu --index-url https://download.pytorch.org/whl/cpu --extra-index-url https://pypi.org/simple
77
+ python -m pip install -r requirements.txt
78
+ python -c "import torch,platform; print(platform.machine()); print(torch.__version__,torch.version.cuda); assert torch.__version__=='2.4.1+cpu'; assert torch.version.cuda is None"
79
+ where cl
80
+ where link
81
+ ```
82
+
83
+ Expected runtime output includes `2.4.1+cpu None`. A CUDA-enabled Torch build
84
+ will be rejected even when the GPU is not in use.
85
+
86
+ ## 3. Build and test
87
+
88
+ ```bat
89
+ python build_mmcv.py
90
+ ```
91
+
92
+ The script verifies the pinned source archive hash, builds CPU operators
93
+ with `MMCV_WITH_OPS=1` and `FORCE_CUDA=0`, checks the wheel's AMD64 extension,
94
+ file hashes and licenses, and installs the candidate with `--no-deps`.
95
+ A fresh Python process then checks **CPU NMS and RoIAlign forward/backward**,
96
+ followed by `pip check`. The default maximum is two compiler jobs.
97
+
98
+ Compilation may take several minutes. To watch progress from another prompt:
99
+
100
+ ```powershell
101
+ Get-Content C:\mmcv_cpu\dist\BUILD_LOG.txt -Tail 30 -Wait
102
+ ```
103
+
104
+ Do not overwrite an existing candidate. To retry a failed build, choose a
105
+ new output directory, e.g. `python build_mmcv.py --output-dir dist-attempt2`.
106
+ Keep failed logs until the cause is understood. If only validation failed,
107
+ use `python build_mmcv.py --verify-only` to validate the same wheel again.
108
+
109
+ Expected successful outputs:
110
+
111
+ ```text
112
+ dist/
113
+ mmcv-2.2.0-1cpupt241-cp310-cp310-win_amd64.whl
114
+ BUILD_REPORT.json
115
+ SHA256SUMS
116
+ BUILD_LOG.txt
117
+ VERIFICATION_LOG.txt
118
+ VERIFICATION_REQUIREMENTS.txt
119
+ ```
120
+
121
+ `BUILD_REPORT.json` must report passed CPU operators and `pip check`.
122
+ Its original build provenance is preserved during `--verify-only` runs.
123
+
124
+ ## 4. Validate in a fresh environment
125
+
126
+ Open an ordinary Anaconda Prompt without activating a compiler developer
127
+ shell. This checks installation without using `cl`; because Build Tools are
128
+ still installed on the computer, it does not prove all runtime prerequisites
129
+ are present on a completely clean Windows computer.
130
+
131
+ ```bat
132
+ conda create -n maap3d-mmcv-cpu-verify python=3.10 -y
133
+ conda activate maap3d-mmcv-cpu-verify
134
+ cd /d C:\mmcv_cpu
135
+ python -m pip install pip==25.0.1
136
+ python -m pip install torch==2.4.1+cpu torchvision==0.19.1+cpu torchaudio==2.4.1+cpu --index-url https://download.pytorch.org/whl/cpu --extra-index-url https://pypi.org/simple
137
+ python -m pip install -r requirements.txt
138
+ python build_mmcv.py --verify-only
139
+ ```
140
+
141
+ Although `requirements.txt` includes Ninja and packaging tools, this command
142
+ does not compile MMCV or check for MSVC. Keep the report beside the wheel.
143
+
144
+ If `DLL load failed` occurs, preserve the full traceback. Check the VC++
145
+ Redistributable, x64/Python versions, CPU Torch version, and actual DLL
146
+ dependencies. In the developer prompt, Codex can run `dumpbin /DEPENDENTS`
147
+ on the installed `mmcv\_ext*.pyd`; save that output. Do not fix it by silently
148
+ installing CUDA Torch or substituting another wheel.
149
+
150
+ ## 5. Optional complete model validation
151
+
152
+ This folder deliberately builds only MMCV. With the full current MAAP3D
153
+ checkout available, Codex can install the pinned OpenMMLab dependencies in
154
+ the verification environment, use the checksum-pinned Chumpy and patched
155
+ MMDetection wheels from `install_package.py`, install MMPose 1.3.2, and run:
156
+
157
+ ```bat
158
+ cd /d C:\path\to\MAAP3D_Toolbox
159
+ python openmmlab_cpu_smoke.py
160
+ python -m pip check
161
+ ```
162
+
163
+ Use a constraint file to retain Torch 2.4.1+cpu, NumPy 1.26.4, SciPy 1.10.1,
164
+ MMCV 2.2.0, MMEngine 0.10.6, and OpenCV 4.10.0.84. Use the reviewed patched
165
+ MMDetection wheel: stock MMDetection 3.3.0 rejects MMCV 2.2.0. Reinstall this
166
+ local CPU wheel with `--force-reinstall --no-deps` after any setup that could
167
+ replace MMCV. `install_package.py --cpu` currently **rebuilds** MMCV, so it
168
+ cannot by itself validate that this prebuilt candidate was used.
169
+
170
+ If the checkout is unavailable, report model checks as **NOT RUN**. Test a
171
+ real CPU checkpoint/image workflow before claiming complete deployment
172
+ support. A later clean Windows VM without Build Tools is the final check
173
+ for removing the compiler prerequisite from end-user installation.
174
+
175
+ ## 6. Copy back and hand off
176
+
177
+ Copy this folder back, including **all files in `dist\`**, the exact scripts
178
+ used, any source patches, and a short Codex build summary. Include any DLL
179
+ inspection or full-model logs. Do not rename the wheel to make an incompatible
180
+ build appear compatible. Do not upload it, change installer URLs, or replace
181
+ existing hosted artifacts. Publication and installer integration happen after
182
+ review on the main machine.
183
+
184
+ Upstream reference: [MMCV build instructions](https://mmcv.readthedocs.io/en/latest/get_started/build.html).
builds/windows-cpu/SHA256SUMS ADDED
@@ -0,0 +1 @@
 
 
1
+ 35db4db7d467f45e71e4d50c19ffaf6e35c713053109ff413d199ac503a45389 mmcv-2.2.0-1cpupt241-cp310-cp310-win_amd64.whl
builds/windows-cpu/VERIFICATION_LOG.txt ADDED
@@ -0,0 +1,37 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ COMMAND: C:\Users\alexh\Documents\Codex\2026-10-22\c\work\env-mmcv-build\python.exe -m pip install --force-reinstall --no-deps C:\Users\alexh\Documents\Codex\2026-10-22\c\work\windows_mmcv_cpu\dist-v145-attempt1\mmcv-2.2.0-1cpupt241-cp310-cp310-win_amd64.whl
3
+ Processing c:\users\alexh\documents\codex\2026-10-22\c\work\windows_mmcv_cpu\dist-v145-attempt1\mmcv-2.2.0-1cpupt241-cp310-cp310-win_amd64.whl
4
+ Installing collected packages: mmcv
5
+ Successfully installed mmcv-2.2.0
6
+
7
+ [notice] A new release of pip is available: 25.0.1 -> 26.2.2
8
+ [notice] To update, run: C:\Users\alexh\Documents\Codex\2026-10-22\c\work\env-mmcv-build\python.exe -m pip install --upgrade pip
9
+
10
+ COMMAND: C:\Users\alexh\Documents\Codex\2026-10-22\c\work\env-mmcv-build\python.exe C:\Users\alexh\Documents\Codex\2026-10-22\c\work\windows_mmcv_cpu\build_mmcv.py --ops-only
11
+ C:\Users\alexh\Documents\Codex\2026-10-22\c\work\env-mmcv-build\lib\site-packages\mmengine\optim\optimizer\zero_optimizer.py:11: DeprecationWarning: `TorchScript` support for functional optimizers is deprecated and will be removed in a future PyTorch release. Consider using the `torch.compile` optimizer instead.
12
+ from torch.distributed.optim import \
13
+ CPU NMS and RoIAlign forward/backward passed: torch=2.4.1+cpu, mmcv=2.2.0
14
+
15
+ COMMAND: C:\Users\alexh\Documents\Codex\2026-10-22\c\work\env-mmcv-build\python.exe -m pip check
16
+ No broken requirements found.
17
+
18
+ COMMAND: C:\Users\alexh\Documents\Codex\2026-10-22\c\work\env-mmcv-verify\python.exe -m pip install --force-reinstall --no-deps C:\Users\alexh\Documents\Codex\2026-10-22\c\work\windows_mmcv_cpu\dist-v145-attempt1\mmcv-2.2.0-1cpupt241-cp310-cp310-win_amd64.whl
19
+ Processing c:\users\alexh\documents\codex\2026-10-22\c\work\windows_mmcv_cpu\dist-v145-attempt1\mmcv-2.2.0-1cpupt241-cp310-cp310-win_amd64.whl
20
+ Installing collected packages: mmcv
21
+ Successfully installed mmcv-2.2.0
22
+ WARNING: Failed to remove contents in a temporary directory 'C:\Users\alexh\AppData\Local\Packages\sandbox.{67328795-1d48-45c0-8aaa-9aef5580b857}\AC\Temp\pip-build-tracker-6smghbcq'.
23
+ You can safely remove it manually.
24
+ WARNING: Failed to remove contents in a temporary directory 'C:\Users\alexh\AppData\Local\Packages\sandbox.{67328795-1d48-45c0-8aaa-9aef5580b857}\AC\Temp\pip-unpack-tq_rv1h6'.
25
+ You can safely remove it manually.
26
+ WARNING: Failed to remove contents in a temporary directory 'C:\Users\alexh\AppData\Local\Packages\sandbox.{67328795-1d48-45c0-8aaa-9aef5580b857}\AC\Temp\pip-ephem-wheel-cache-pugycqd_'.
27
+ You can safely remove it manually.
28
+ WARNING: Failed to remove contents in a temporary directory 'C:\Users\alexh\AppData\Local\Packages\sandbox.{67328795-1d48-45c0-8aaa-9aef5580b857}\AC\Temp\pip-install-wp0jo22h'.
29
+ You can safely remove it manually.
30
+
31
+ COMMAND: C:\Users\alexh\Documents\Codex\2026-10-22\c\work\env-mmcv-verify\python.exe C:\Users\alexh\Documents\Codex\2026-10-22\c\work\windows_mmcv_cpu\build_mmcv.py --ops-only
32
+ C:\Users\alexh\Documents\Codex\2026-10-22\c\work\env-mmcv-verify\lib\site-packages\mmengine\optim\optimizer\zero_optimizer.py:11: DeprecationWarning: `TorchScript` support for functional optimizers is deprecated and will be removed in a future PyTorch release. Consider using the `torch.compile` optimizer instead.
33
+ from torch.distributed.optim import \
34
+ CPU NMS and RoIAlign forward/backward passed: torch=2.4.1+cpu, mmcv=2.2.0
35
+
36
+ COMMAND: C:\Users\alexh\Documents\Codex\2026-10-22\c\work\env-mmcv-verify\python.exe -m pip check
37
+ No broken requirements found.
builds/windows-cpu/VERIFICATION_REQUIREMENTS.txt ADDED
@@ -0,0 +1,84 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ COMMAND: C:\Users\alexh\Documents\Codex\2026-10-22\c\work\env-mmcv-build\python.exe -m pip freeze
3
+ addict==2.4.0
4
+ contourpy==1.3.2
5
+ cycler==0.12.1
6
+ filelock==4.1.0
7
+ fonttools==4.65.0
8
+ fsspec==2026.9.0
9
+ Jinja2==3.1.6
10
+ kiwisolver==1.5.1
11
+ markdown-it-py==4.2.0
12
+ MarkupSafe==3.0.4
13
+ matplotlib==3.10.9
14
+ mdurl==0.1.2
15
+ mmcv @ file:///C:/Users/alexh/Documents/Codex/2026-10-22/c/work/windows_mmcv_cpu/dist-v145-attempt1/mmcv-2.2.0-1cpupt241-cp310-cp310-win_amd64.whl#sha256=35db4db7d467f45e71e4d50c19ffaf6e35c713053109ff413d199ac503a45389
16
+ mmengine==0.10.6
17
+ mpmath==1.3.0
18
+ networkx==3.4.2
19
+ ninja==1.11.1.4
20
+ numpy==1.26.4
21
+ opencv-python==4.10.0.84
22
+ packaging==25.0
23
+ pillow==12.3.0
24
+ platformdirs==4.12.4
25
+ psutil==6.1.1
26
+ Pygments==2.21.0
27
+ pyparsing==3.3.3
28
+ python-dateutil==3.0.0
29
+ PyYAML==6.0.3
30
+ regex==2026.9.29
31
+ rich==15.0.0
32
+ scipy==1.10.1
33
+ six==1.17.0
34
+ sympy==1.14.0
35
+ termcolor==3.3.0
36
+ tomli==2.5.0
37
+ torch==2.4.1+cpu
38
+ torchaudio==2.4.1+cpu
39
+ torchvision==0.19.1+cpu
40
+ typing_extensions==4.16.0
41
+ tzdata==2026.5
42
+ yapf==0.43.0
43
+
44
+ COMMAND: C:\Users\alexh\Documents\Codex\2026-10-22\c\work\env-mmcv-verify\python.exe -m pip freeze
45
+ addict==2.4.0
46
+ contourpy==1.3.2
47
+ cycler==0.12.1
48
+ filelock==4.1.0
49
+ fonttools==4.65.0
50
+ fsspec==2026.9.0
51
+ Jinja2==3.1.6
52
+ kiwisolver==1.5.1
53
+ markdown-it-py==4.2.0
54
+ MarkupSafe==3.0.4
55
+ matplotlib==3.10.9
56
+ mdurl==0.1.2
57
+ mmcv @ file:///C:/Users/alexh/Documents/Codex/2026-10-22/c/work/windows_mmcv_cpu/dist-v145-attempt1/mmcv-2.2.0-1cpupt241-cp310-cp310-win_amd64.whl#sha256=35db4db7d467f45e71e4d50c19ffaf6e35c713053109ff413d199ac503a45389
58
+ mmengine==0.10.6
59
+ mpmath==1.3.0
60
+ networkx==3.4.2
61
+ ninja==1.11.1.4
62
+ numpy==1.26.4
63
+ opencv-python==4.10.0.84
64
+ packaging==25.0
65
+ pillow==12.3.0
66
+ platformdirs==4.12.4
67
+ psutil==6.1.1
68
+ Pygments==2.21.0
69
+ pyparsing==3.3.3
70
+ python-dateutil==3.0.0
71
+ PyYAML==6.0.3
72
+ regex==2026.9.29
73
+ rich==15.0.0
74
+ scipy==1.10.1
75
+ six==1.17.0
76
+ sympy==1.14.0
77
+ termcolor==3.3.0
78
+ tomli==2.5.0
79
+ torch==2.4.1+cpu
80
+ torchaudio==2.4.1+cpu
81
+ torchvision==0.19.1+cpu
82
+ typing_extensions==4.16.0
83
+ tzdata==2026.5
84
+ yapf==0.43.0
builds/windows-cpu/build_mmcv.py ADDED
@@ -0,0 +1,236 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/usr/bin/env python3
2
+ """Build or verify a native CPU MMCV wheel; see the adjacent README.md."""
3
+
4
+ import argparse
5
+ import base64
6
+ import csv
7
+ import hashlib
8
+ import importlib.metadata
9
+ import io
10
+ import json
11
+ import os
12
+ from pathlib import Path
13
+ import platform
14
+ import shutil
15
+ import struct
16
+ import subprocess
17
+ import sys
18
+ import tarfile
19
+ import tempfile
20
+ import urllib.request
21
+ import zipfile
22
+
23
+
24
+ TARGET_OS = "win32"
25
+ HERE = Path(__file__).resolve().parent
26
+ SOURCE_URL = "https://files.pythonhosted.org/packages/e9/a2/57a733e7e84985a8a0e3101dfb8170fc9db92435c16afad253069ae3f9df/mmcv-2.2.0.tar.gz"
27
+ SOURCE_SHA256 = "ac479247e808d8802f89eadf04d4118de86bdfe81361ec5aed0cc1bf731c67c9"
28
+ BUILD_PACKAGES = {"setuptools": "80.9.0", "wheel": "0.44.0", "ninja": "1.11.1.4", "psutil": "6.1.1"}
29
+ MPS_BRANCH = (
30
+ "elif (hasattr(torch.backends, 'mps')\n"
31
+ " and torch.backends.mps.is_available()) or os.getenv(\n"
32
+ " 'FORCE_MPS', '0') == '1':"
33
+ )
34
+
35
+
36
+ def host_profile(build):
37
+ if sys.platform != TARGET_OS:
38
+ raise RuntimeError(f"Run this folder on {TARGET_OS}, not {sys.platform}.")
39
+ if platform.python_implementation() != "CPython" or sys.version_info[:2] != (3, 10):
40
+ raise RuntimeError("Use CPython 3.10 in a fresh environment.")
41
+ if sys.version_info < (3, 10, 12) or sys.maxsize <= 2**32:
42
+ raise RuntimeError("Use 64-bit CPython 3.10.12 or newer within the 3.10 series.")
43
+ machine = platform.machine().lower()
44
+ if TARGET_OS == "win32":
45
+ if machine not in {"amd64", "x86_64"}:
46
+ raise RuntimeError("This Windows candidate targets AMD64, not ARM64.")
47
+ if build and (shutil.which("cl") is None or shutil.which("link") is None):
48
+ raise RuntimeError("Initialize the VS 2022 x64 developer environment; cl and link must be on PATH.")
49
+ if build and os.environ.get("VSCMD_ARG_TGT_ARCH", "").lower() != "x64":
50
+ raise RuntimeError("Use an x64 Native Tools environment (VSCMD_ARG_TGT_ARCH=x64).")
51
+ return {"architecture": "x86_64", "torch": "2.4.1+cpu", "build_tag": "1cpupt241"}
52
+ if machine not in {"arm64", "x86_64"}:
53
+ raise RuntimeError("Use native arm64 or x86_64 macOS Python.")
54
+ if int(platform.mac_ver()[0].split(".")[0]) < 11:
55
+ raise RuntimeError("This handoff targets macOS 11 or newer; wheel minimum versions may be higher.")
56
+ translated = subprocess.run(["/usr/sbin/sysctl", "-in", "sysctl.proc_translated"], capture_output=True, text=True)
57
+ if translated.returncode == 0 and translated.stdout.strip() == "1":
58
+ raise RuntimeError("Rosetta Python is unsupported; use a native Apple Silicon environment.")
59
+ if build:
60
+ subprocess.run(["xcrun", "--find", "clang++"], check=True)
61
+ torch = "2.4.0" if machine == "arm64" else "2.2.2"
62
+ return {"architecture": machine, "torch": torch, "build_tag": "1cpupt" + torch.replace(".", "")}
63
+
64
+
65
+ def require_runtime(profile, build):
66
+ import torch
67
+ if torch.__version__ != profile["torch"] or torch.version.cuda is not None or torch.version.hip is not None:
68
+ raise RuntimeError(f"Install exactly torch=={profile['torch']} without CUDA/ROCm.")
69
+ expected = {"numpy": "1.26.4", **(BUILD_PACKAGES if build else {})}
70
+ for name, version in expected.items():
71
+ if importlib.metadata.version(name) != version:
72
+ raise RuntimeError(f"Expected {name}=={version}; follow README.md.")
73
+
74
+
75
+ def run_logged(command, log, **kwargs):
76
+ print("Running:", " ".join(map(str, command)), flush=True)
77
+ with log.open("a", encoding="utf-8") as stream:
78
+ stream.write("\nCOMMAND: " + " ".join(map(str, command)) + "\n")
79
+ stream.flush()
80
+ result = subprocess.run(list(map(str, command)), stdout=stream, stderr=subprocess.STDOUT, **kwargs)
81
+ if result.returncode:
82
+ print("\n".join(log.read_text(encoding="utf-8", errors="replace").splitlines()[-50:]))
83
+ result.check_returncode()
84
+
85
+
86
+ def patch_mac_source(path):
87
+ source = path.read_text(encoding="utf-8")
88
+ if source.count(MPS_BRANCH) != 1:
89
+ raise RuntimeError("Unexpected MMCV MPS build branch; inspect before modifying the patch.")
90
+ path.write_text(source.replace(MPS_BRANCH,
91
+ "# Modified by MAAP3D: compile CPU operators, including on MPS hosts.\n elif False:"), encoding="utf-8")
92
+
93
+
94
+ def inspect_wheel(wheel, profile):
95
+ from packaging.tags import sys_tags
96
+ from packaging.utils import parse_wheel_filename
97
+ name, version, build_tag, tags = parse_wheel_filename(wheel.name)
98
+ if name != "mmcv" or str(version) != "2.2.0" or not tags.intersection(sys_tags()):
99
+ raise RuntimeError("Wheel version or platform/Python tags do not match this environment.")
100
+ if not build_tag or str(build_tag[0]) + build_tag[1] != profile["build_tag"]:
101
+ raise RuntimeError("Wrong CPU/Torch build tag; do not substitute a CUDA wheel.")
102
+ with zipfile.ZipFile(wheel) as archive:
103
+ record, = [n for n in archive.namelist() if n.endswith(".dist-info/RECORD")]
104
+ count = 0
105
+ for filename, digest, size in csv.reader(io.StringIO(archive.read(record).decode())):
106
+ if digest:
107
+ algorithm, value = digest.split("=", 1)
108
+ data = archive.read(filename)
109
+ actual = base64.urlsafe_b64encode(hashlib.new(algorithm, data).digest()).decode().rstrip("=")
110
+ if actual != value or len(data) != int(size):
111
+ raise RuntimeError(f"Wheel RECORD check failed: {filename}")
112
+ count += 1
113
+ extensions = [n for n in archive.namelist() if n.startswith("mmcv/_ext") and n.endswith((".pyd", ".so"))]
114
+ extension, = extensions
115
+ data = archive.read(extension)
116
+ if TARGET_OS == "win32":
117
+ if data[:2] != b"MZ":
118
+ raise RuntimeError("Expected a Windows PE extension.")
119
+ offset = struct.unpack_from("<I", data, 0x3C)[0]
120
+ if data[offset:offset + 4] != b"PE\0\0" or struct.unpack_from("<H", data, offset + 4)[0] != 0x8664:
121
+ raise RuntimeError("Expected an AMD64 Windows extension.")
122
+ else:
123
+ cpu_type = 0x100000C if profile["architecture"] == "arm64" else 0x1000007
124
+ if data[:4] != b"\xcf\xfa\xed\xfe" or struct.unpack_from("<I", data, 4)[0] != cpu_type:
125
+ raise RuntimeError("Expected a native single-architecture 64-bit Mach-O extension.")
126
+ licenses = [n for n in archive.namelist() if "LICENSE" in n]
127
+ if not licenses or archive.testzip() is not None:
128
+ raise RuntimeError("Missing license or corrupt ZIP entries.")
129
+ return {"extension": extension, "record_hashes_verified": count, "licenses": licenses,
130
+ "wheel_tags": sorted(map(str, tags))}
131
+
132
+
133
+ def verify_ops():
134
+ import torch
135
+ import mmcv
136
+ from mmcv.ops import nms, roi_align
137
+ if mmcv.__version__ != "2.2.0":
138
+ raise RuntimeError("Expected MMCV 2.2.0.")
139
+ boxes = torch.tensor([[0., 0., 10., 10.], [1., 1., 9., 9.], [20., 20., 30., 30.]], device="cpu")
140
+ scores = torch.tensor([0.9, 0.8, 0.7], device="cpu")
141
+ detections, kept = nms(boxes, scores, 0.5)
142
+ if kept.tolist() != [0, 2] or not torch.isfinite(detections).all():
143
+ raise RuntimeError("CPU NMS failed.")
144
+ feature = torch.arange(256., device="cpu").reshape(1, 1, 16, 16).requires_grad_()
145
+ rois = torch.tensor([[0., 1., 1., 12., 12.]], device="cpu")
146
+ pooled = roi_align(feature, rois, (4, 4), 1.0, 0, "avg", True)
147
+ pooled.sum().backward()
148
+ if pooled.shape != (1, 1, 4, 4) or not torch.isfinite(pooled).all() or feature.grad is None or not torch.isfinite(feature.grad).all():
149
+ raise RuntimeError("CPU RoIAlign forward/backward failed.")
150
+ print(f"CPU NMS and RoIAlign forward/backward passed: torch={torch.__version__}, mmcv={mmcv.__version__}")
151
+
152
+
153
+ def main():
154
+ parser = argparse.ArgumentParser(description=__doc__)
155
+ parser.add_argument("--output-dir", type=Path, default=HERE / "dist")
156
+ parser.add_argument("--verify-only", action="store_true", help="Install and verify the report's existing wheel")
157
+ parser.add_argument("--ops-only", action="store_true", help=argparse.SUPPRESS)
158
+ args = parser.parse_args()
159
+ profile = host_profile(build=not (args.verify_only or args.ops_only))
160
+ require_runtime(profile, build=not (args.verify_only or args.ops_only))
161
+ if args.ops_only:
162
+ verify_ops()
163
+ return
164
+ output = args.output_dir.resolve()
165
+ output.mkdir(parents=True, exist_ok=True)
166
+ report_path = output / "BUILD_REPORT.json"
167
+ if args.verify_only:
168
+ report = json.loads(report_path.read_text(encoding="utf-8"))
169
+ wheel = output / Path(report["wheel"]).name
170
+ if hashlib.sha256(wheel.read_bytes()).hexdigest() != report["sha256"] or report["profile"] != profile:
171
+ raise RuntimeError("Wheel checksum or target differs from original build report.")
172
+ else:
173
+ if report_path.exists() or list(output.glob("*.whl")):
174
+ raise FileExistsError("Use an empty output directory; previous candidates will not be replaced.")
175
+ environment = os.environ.copy()
176
+ environment.update({"MMCV_WITH_OPS": "1", "FORCE_CUDA": "0", "FORCE_MPS": "0",
177
+ "FORCE_MLU": "0", "FORCE_NPU": "0", "MMCV_WITH_DIOPI": "0", "MAX_JOBS": "2"})
178
+ environment["PATH"] = str(Path(sys.executable).parent) + os.pathsep + environment["PATH"]
179
+ patches = []
180
+ if TARGET_OS == "win32":
181
+ environment.update({"DISTUTILS_USE_SDK": "1", "MSSdk": "1"})
182
+ compiler_command = ["cl"]
183
+ else:
184
+ environment["ARCHFLAGS"] = "-arch " + profile["architecture"]
185
+ compiler_command = ["clang++", "--version"]
186
+ compiler = subprocess.run(compiler_command, capture_output=True, text=True)
187
+ with tempfile.TemporaryDirectory(prefix="mmcv-cpu-") as temporary:
188
+ temporary = Path(temporary)
189
+ archive_path = temporary / "mmcv.tar.gz"
190
+ with urllib.request.urlopen(SOURCE_URL, timeout=120) as response, archive_path.open("wb") as stream:
191
+ shutil.copyfileobj(response, stream)
192
+ if hashlib.sha256(archive_path.read_bytes()).hexdigest() != SOURCE_SHA256:
193
+ raise RuntimeError("MMCV source SHA-256 mismatch.")
194
+ with tarfile.open(archive_path) as archive:
195
+ archive.extractall(temporary / "source", filter="data")
196
+ source = temporary / "source/mmcv-2.2.0"
197
+ if TARGET_OS == "darwin":
198
+ patch_mac_source(source / "setup.py")
199
+ patches.append("Disabled upstream automatic MPS operator build; CPU-only source branch.")
200
+ run_logged([sys.executable, "setup.py", "bdist_wheel", "--build-number", profile["build_tag"],
201
+ "--dist-dir", output], output / "BUILD_LOG.txt", cwd=source, env=environment)
202
+ wheel, = output.glob("*.whl")
203
+ report = {"wheel": wheel.name, "sha256": hashlib.sha256(wheel.read_bytes()).hexdigest(),
204
+ "size_bytes": wheel.stat().st_size, "profile": profile, "python": sys.version,
205
+ "platform": platform.platform(), "compiler": compiler.stdout + compiler.stderr,
206
+ "source_url": SOURCE_URL, "source_sha256": SOURCE_SHA256, "source_patches": patches,
207
+ "macos_deployment_target_env": environment.get("MACOSX_DEPLOYMENT_TARGET"),
208
+ "build_packages": BUILD_PACKAGES, "validation": "not run",
209
+ "limits": ["Native target, Python 3.10 and exact Torch ABI only",
210
+ "No full MAAP3D/model/checkpoint or compiler-free clean-machine validation yet",
211
+ "Local candidate; no publishing or installer modifications"]}
212
+ report.update(inspect_wheel(wheel, profile))
213
+ report_path.write_text(json.dumps(report, indent=2) + "\n", encoding="utf-8")
214
+ (output / "SHA256SUMS").write_text(report["sha256"] + " " + wheel.name + "\n", encoding="utf-8")
215
+ inspect_wheel(wheel, profile)
216
+ report["validation"] = "in progress"
217
+ report_path.write_text(json.dumps(report, indent=2) + "\n", encoding="utf-8")
218
+ log = output / "VERIFICATION_LOG.txt"
219
+ try:
220
+ run_logged([sys.executable, "-m", "pip", "install", "--force-reinstall", "--no-deps", wheel], log)
221
+ # A new process cannot accidentally reuse a previously loaded MMCV.
222
+ run_logged([sys.executable, Path(__file__).resolve(), "--ops-only"], log)
223
+ run_logged([sys.executable, "-m", "pip", "check"], log)
224
+ except Exception:
225
+ report["validation"] = "failed; see VERIFICATION_LOG.txt"
226
+ raise
227
+ else:
228
+ report["validation"] = "CPU NMS, RoIAlign forward/backward, and pip check passed"
229
+ finally:
230
+ report_path.write_text(json.dumps(report, indent=2) + "\n", encoding="utf-8")
231
+ run_logged([sys.executable, "-m", "pip", "freeze"], output / "VERIFICATION_REQUIREMENTS.txt")
232
+ print(json.dumps(report, indent=2))
233
+
234
+
235
+ if __name__ == "__main__":
236
+ main()
builds/windows-cpu/requirements.txt ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Install the CPU Torch trio from README.md first. These are build/runtime
2
+ # dependencies for MMCV; this is not a full MAAP3D environment.
3
+ numpy==1.26.4
4
+ scipy==1.10.1
5
+ setuptools==80.9.0
6
+ wheel==0.44.0
7
+ ninja==1.11.1.4
8
+ psutil==6.1.1
9
+ packaging==25.0
10
+ addict==2.4.0
11
+ mmengine==0.10.6
12
+ yapf==0.43.0
13
+ opencv-python==4.10.0.84
mmcv-2.2.0-1cpupt241-cp310-cp310-win_amd64.whl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:35db4db7d467f45e71e4d50c19ffaf6e35c713053109ff413d199ac503a45389
3
+ size 1059408