Skip to content

Bazel: align Windows release package with make#3670

Open
napetrov wants to merge 2 commits into
uxlfoundation:mainfrom
napetrov:codex/windows-bazel-release-compare
Open

Bazel: align Windows release package with make#3670
napetrov wants to merge 2 commits into
uxlfoundation:mainfrom
napetrov:codex/windows-bazel-release-compare

Conversation

@napetrov

Copy link
Copy Markdown
Contributor

Summary

  • build the Windows Bazel release in nightly CI and compare its release manifest with the make release
  • fix Windows Bazel DPC dynamic linking by archiving object inputs and passing the archive through the Intel/Windows link path
  • package the missing oneAPI DPC examples/samples and versioned Windows import libraries while excluding Bazel-only artifacts from release output

Testing

  • Windows remote: build.bat onedal_dpc vc avx2 completed successfully
  • Windows remote: bazel build //:release --config=release-dpc --cpu=avx2 completed successfully
  • Windows remote: .ci/scripts/compare_windows_release.ps1 -MakeReleaseDir .\__release_win_vc\daal\latest -BazelReleaseDir .\bazel-bin\release\daal\latest passed with make files: 1066, bazel files: 1066
  • Local: git diff --cached --check
  • Local: bazel query //:release --noshow_progress

Note: local PowerShell parser check was skipped because pwsh is not installed in this Linux workspace; the script itself was exercised on the Windows remote compare gate above.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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'
@napetrov napetrov force-pushed the codex/windows-bazel-release-compare branch from 4f4a72e to 2c858a5 Compare June 24, 2026 04:28
run: |
set PATH=C:\msys64\usr\bin;%PATH%
call .\oneapi\setvars.bat
call "%ONEAPI_ROOT%\setvars-vcvarsall.bat" %VS_VER%

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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):

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this meant to compare MSVC builds or ICX builds?

@Alexandr-Solovev

Copy link
Copy Markdown
Contributor

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

Comment thread .ci/env/bazelisk.ps1

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What does this provide that .ci/env/bazelisk.sh doesn't?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just windows alternative?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants