merges winml and cross-plat packages into one#786
Open
prathikr wants to merge 1 commit into
Open
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
There was a problem hiding this comment.
Pull request overview
This PR consolidates the previous “WinML variant” vs “cross-platform/base” split into a single packaging/build flow, shifting WinML enablement toward runtime detection/bootstrapping on Windows and simplifying CI/pipeline templates accordingly.
Changes:
- Remove WinML-variant toggles/parameters (CMake option, build.py flags, C# msbuild properties, pipeline variant stages) and standardize on
sdk_v2/deps_versions.jsonas the sole ORT/GenAI source of truth. - Make Windows App SDK bootstrap optional at runtime (dynamic
LoadLibraryofMicrosoft.WindowsAppRuntime.Bootstrap.dll) and enable the C# binding to opt in by default on Windows. - Collapse pipeline packaging stages so native/C#/Python artifacts are produced once (no separate WinML SKUs).
Reviewed changes
Copilot reviewed 30 out of 30 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| sdk_v2/python/pyproject.toml | Updates ORT/GenAI pin rewrite documentation to reference only deps_versions.json. |
| sdk_v2/python/_build_backend/init.py | Removes WinML deps selection; always rewrites pins from deps_versions.json and keeps optional package-name override. |
| sdk_v2/deps_versions_winml.json | Deletes the WinML-specific dependency versions file. |
| sdk_v2/cs/test/FoundryLocal.Tests/VisionTests.cs | Removes WinML-conditional skip logic so vision integration tests run unconditionally. |
| sdk_v2/cs/test/FoundryLocal.Tests/Microsoft.AI.Foundry.Local.Tests.csproj | Removes WinML-specific test targeting/defines. |
| sdk_v2/cs/src/Microsoft.AI.Foundry.Local.csproj | Removes WinML SKU branching and simplifies runtime package selection (but see review comment re: unsafe). |
| sdk_v2/cs/src/FoundryLocalManager.cs | On Windows, defaults AdditionalSettings["Bootstrap"]="true" unless explicitly overridden. |
| sdk_v2/cpp/src/winml_bootstrap.h | Changes bootstrap helper gating to _WIN32 and updates comments for runtime/dynamic loading. |
| sdk_v2/cpp/src/winml_bootstrap.cc | Implements dynamic loading of Windows App SDK bootstrap APIs (no static link dependency). |
| sdk_v2/cpp/src/manager.cc | Enables Windows bootstrap path under _WIN32; removes WinML build gating; always registers WebGPU EP. |
| sdk_v2/cpp/src/ep_detection/cuda_ep_bootstrapper.cc | Removes WinML-vs-non-WinML bifurcation for CUDA EP package URL/hashes. |
| sdk_v2/cpp/CMakeLists.txt | Removes FOUNDRY_LOCAL_USE_WINML option/defines and removes WinAppSDK bootstrap DLL copy step. |
| sdk_v2/cpp/cmake/FindOnnxRuntimeGenAI.cmake | Removes WinML package branching; always uses Microsoft.ML.OnnxRuntimeGenAI.Foundry and deps_versions.json. |
| sdk_v2/cpp/cmake/FindOnnxRuntime.cmake | Removes WinML-conditional version file selection and related messaging. |
| sdk_v2/cpp/build.py | Removes --use_winml / --winml_sdk_version CLI plumbing and associated CMake defines. |
| sdk_v2/build_and_test_all.ps1 | Removes -UseWinml flow; standardizes on a single package name and build/test path. |
| .pipelines/v2/templates/steps-test-python.yml | Removes WinML runtime-install step and WinML parameterization. |
| .pipelines/v2/templates/steps-test-cs.yml | Removes WinML parameterization and disables the old WinAppSDK install block. |
| .pipelines/v2/templates/steps-prefetch-nuget.yml | Removes WinML NuGet prefetch logic/parameters. |
| .pipelines/v2/templates/steps-pack-nuget.yml | Collapses “base vs WinML” packing into a single package id and artifact set. |
| .pipelines/v2/templates/steps-build-windows.yml | Removes WinML build branches and WinML-specific staging behavior. |
| .pipelines/v2/templates/steps-build-python.yml | Removes WinML wheel build parameterization and env var toggling. |
| .pipelines/v2/templates/steps-build-macos.yml | Removes WinML prefetch parameters (now always false/empty). |
| .pipelines/v2/templates/steps-build-linux.yml | Removes WinML prefetch parameters (now always false/empty). |
| .pipelines/v2/templates/steps-build-cs.yml | Removes WinML parameter wiring from restore/build/pack. |
| .pipelines/v2/templates/stages-sdk-v2.yml | Removes duplicate WinML stages; keeps single C# and Python stage sets. |
| .pipelines/v2/templates/stages-python.yml | Removes WinML variant stages and parameters; keeps base-only pipeline flow. |
| .pipelines/v2/templates/stages-cs.yml | Removes WinML variant stages and parameters; keeps base-only pipeline flow. |
| .pipelines/v2/templates/stages-build-native.yml | Removes WinML native build/pack stages; keeps single native pack stage. |
| .pipelines/foundry-local-packaging.yml | Removes WinML version variables/parameters and WinML artifact naming from packaging pipeline. |
Comment on lines
16
to
19
| <TargetFrameworks>net8.0;net9.0;netstandard2.0</TargetFrameworks> | ||
| <RuntimeIdentifiers>win-x64;win-arm64;linux-x64;linux-arm64;osx-arm64</RuntimeIdentifiers> | ||
|
|
||
| <AllowUnsafeBlocks>true</AllowUnsafeBlocks> | ||
| <GeneratePackageOnBuild>False</GeneratePackageOnBuild> | ||
| <ImplicitUsings>enable</ImplicitUsings> |
Comment on lines
+80
to
90
| HRESULT hr = init_fn(kMajorMinorVersion, nullptr, min_version, MddBootstrapInitializeOptions_None); | ||
| if (FAILED(hr)) { | ||
| char buf[16]; | ||
| std::snprintf(buf, sizeof(buf), "%08lX", static_cast<unsigned long>(hr)); | ||
| logger.Log(LogLevel::Warning, | ||
| logger.Log(LogLevel::Information, | ||
| std::string("WindowsAppSdk bootstrap: MddBootstrapInitialize2 failed (HRESULT=0x") + | ||
| buf + "). WinML EP discovery may find no providers."); | ||
| buf + "). WinML EPs will not be available."); | ||
| // Don't FreeLibrary — leak is intentional to keep the module handle stable | ||
| // if a subsequent call succeeds after a transient failure. | ||
| return false; | ||
| } |
Comment on lines
+4
to
10
| // Windows App SDK bootstrap helper for non-packaged consumer processes (e.g. the | ||
| // JavaScript binding loaded into Node, where the host process has no built-in WinAppSDK | ||
| // activation). When opted in via additional_options["Bootstrap"]="true", initializes the | ||
| // Windows App Runtime framework package so that APIs depending on it — notably the WinML EP | ||
| // catalog DLL `Microsoft.Windows.AI.MachineLearning.dll` consumed by `WinMLEpBootstrapper` — | ||
| // can resolve at runtime. Defaults to off; matches the C# FoundryLocalCore behavior. | ||
| // can resolve at runtime. Defaults to off; the C# and JS bindings set it automatically. | ||
| // |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.