Bazel: align Windows release package with make#3670
Conversation
There was a problem hiding this comment.
Pull request overview
This PR updates the Bazel-based Windows release flow to match the Make-based release package, and adds a nightly CI gate that builds the Bazel Windows release and compares its manifest against the Make release output.
Changes:
- Add a Windows nightly CI job step to build the Bazel release and compare release manifests vs Make.
- Fix/align Windows Bazel release packaging (copying/renaming import libs, excluding Bazel-only artifacts, adding missing examples/samples).
- Improve Windows DPC++ dynamic linking behavior in Bazel by adjusting link inputs/flags and toolchain wiring.
Reviewed changes
Copilot reviewed 13 out of 13 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| examples/oneapi/dpc/BUILD | Adds a release_files filegroup so oneAPI DPC examples are included in release packaging. |
| dev/bazel/toolchains/cc_toolchain_win.bzl | Introduces a Windows DPC++ link wrapper to better handle large link argument sets/response-file expansion. |
| dev/bazel/release.bzl | Tweaks include/lib copy rules to better match Make’s Windows release layout (import libs/versioning; skip Bazel-only artifacts). |
| dev/bazel/deps/mkl.bzl | Adds missing MKL Windows DPC import libraries to the prebuilt MKL repo definition. |
| dev/bazel/deps/mkl_win.tpl.BUILD | Links MKL DPC utilities against the newly packaged MKL *_dll.lib import libraries on Windows. |
| dev/bazel/cc/link.bzl | Archives Windows DLL object inputs and links them whole-archive; adds DPC-specific flag handling. |
| dev/bazel/cc.bzl | Plumbs an is_dpc signal into the Windows dynamic link path for correct flag forwarding. |
| cpp/oneapi/dal/BUILD | Adds Windows-only DPC deps for oneAPI DAL DLLs to resolve symbols at link time. |
| cpp/oneapi/dal/algo/pca/backend/BUILD | Adjusts PCA backend module inputs/deps to incorporate the CPU dispatcher header and related sources. |
| BUILD | Adds Windows+DPC release config setting, packages additional DPC samples, and includes oneAPI DPC examples in release data. |
| .github/workflows/nightly-build.yml | Extends nightly workflow triggers and adds Bazel Windows release build + manifest comparison steps. |
| .ci/scripts/compare_windows_release.ps1 | New script that compares Make vs Bazel Windows release directory manifests (case-insensitive). |
| .ci/env/bazelisk.ps1 | New helper script to install Bazelisk in CI with SHA256 verification and PATH setup. |
| } | ||
| } | ||
|
|
||
| $objectRsp = [IO.Path]::GetTempFileName() + '.rsp' |
4f4a72e to
2c858a5
Compare
| run: | | ||
| set PATH=C:\msys64\usr\bin;%PATH% | ||
| call .\oneapi\setvars.bat | ||
| call "%ONEAPI_ROOT%\setvars-vcvarsall.bat" %VS_VER% |
There was a problem hiding this comment.
Isn't bazel meant to handle these types of dependencies inside its build?
| tool_path = repo_ctx.path("tool_not_found_{}.bat".format(tool_name)) | ||
| return str(tool_path), is_found | ||
|
|
||
| def _create_dpc_link_wrapper(repo_ctx, dpcc_path): |
There was a problem hiding this comment.
Why would this file need to be auto-generated instead of making it a regular committed file?
| #=============================================================================== | ||
|
|
||
| param( | ||
| [string] $MakeReleaseDir = "__release_win_vc\daal\latest", |
There was a problem hiding this comment.
Is this meant to compare MSVC builds or ICX builds?
|
The best possible thing to validate that its really compatible - add ci check where bazel build is reused for cmake example. In ideal case it should work |
There was a problem hiding this comment.
What does this provide that .ci/env/bazelisk.sh doesn't?
There was a problem hiding this comment.
Just windows alternative?
Summary
Testing
build.bat onedal_dpc vc avx2completed successfullybazel build //:release --config=release-dpc --cpu=avx2completed successfully.ci/scripts/compare_windows_release.ps1 -MakeReleaseDir .\__release_win_vc\daal\latest -BazelReleaseDir .\bazel-bin\release\daal\latestpassed withmake files: 1066,bazel files: 1066git diff --cached --checkbazel query //:release --noshow_progressNote: local PowerShell parser check was skipped because
pwshis not installed in this Linux workspace; the script itself was exercised on the Windows remote compare gate above.