← Back to Pull requests

fix(spmd): export communicator member template instantiations on Windows #4022

Closed
unknown closed this pull request without merging on Nov 16, 2026 08:47 UTC
View on GitHub
unknown unknown commented on Nov 13, 2026 21:41 UTC
Author

Description

//cpp/oneapi/dal:test_communicator_host fails to link against onedal.dll in the Windows Bazel release_dynamic nightly legs, with both vc2026 and icx (EC nightlies of 11-12 and 11-13):

communicator.obj : error LNK2019: unresolved external symbol "... communicator<struct oneapi::dal::preview::spmd::device_memory_access::v1::none>::bcast<__int64>(class oneapi::dal::v2::array<__int64> const &, __int64) const"
... allgather<float>, allreduce<float>, sendrecv_replace<float>
fatal error LNK1120: 4 unresolved externals

Cause: communicator is declared ONEDAL_EXPORT. On Windows, though, a class template's dllexport does not reach explicit instantiations of its member templates. As a result, neither the Make nor the Bazel onedal.4.dll exports bcast<D>(const array<D>&) and the other array<D> overloads; they export only the byte_t* overloads. The 2026.2 Make and Bazel packages were both checked.

Fix: mark the explicit instantiations ONEDAL_EXPORT. gemm_dpc.cpp and table/homogen.cpp already use the same form.

| Check | Before | After |
|---|---|---|
| Minimal repro, clang++ -target x86_64-pc-windows-msvc: /EXPORT of comm<none>::bcast<float> | missing | present |
| communicator.cpp, g++ -fvisibility=hidden: exported symbols | — | identical to before |
| pre-commit (clang-format, editorconfig) | — | passed |

Linux is unchanged. Static builds are unchanged because ONEDAL_EXPORT is empty there. On Windows, onedal.dll gains the exports for the none and usm instantiations, which is additive to the ABI.

Not yet verified on a Windows build: the next EC nightly, or the Azure Windows Bazel job, should show test_communicator_host linking.

---

Checklist:

  • I have reviewed my changes thoroughly before submitting this pull request.

  • Git commit message contains an appropriate signed-off-by string.

  • The unit tests pass successfully (no new tests: an existing test that failed to link is the regression check).
  • 🤖 Generated with Claude Code

    Diff: 260 lines (+195 / -65) across 3 files Reviewer: Alexandr-Solovev Review duration: 3546m
    All Vouch review confidence checks passed
    Residual risk 0.15 = Change Risk (0.39) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.39 · 260 lines diff across 3 files
    0.39
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.17 · 1 substantive comment(s)
    0.17
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    60%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.333
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #4022"
    general weight: 0.35
    Assignees
    Unassigned
    Labels
    risk: low confidence: 60.5% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 39.2% (MEDIUM) · Higher = larger blast radius
    39.2%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 60.5% · Lower = rushed or shallow review
    60.5%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 15.5% · Safe to merge
    15.5%