mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[PR #3002] [CLOSED] metal: stub wait_handoff / handoff_publish so the Metal engine links on 0.1.45 #4393
Labels
No labels
needs-format
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Niko1221/Strata#4393
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/Niko1221/Strata/pull/3002
Author: @bsvinay
Created: 10/18/2026
Status: ❌ Closed
Base:
main← Head:metal-handoff-stubs📝 Commits (1)
4f015cbmetal: stubs for the layer split's overlapped hand-off (wait_handoff, handoff_publish)📊 Changes
1 file changed (+23 additions, -0 deletions)
View changed files
➕
metal/src/engine/stubs_145.cpp(+23 -0)📄 Description
Fixes the Mac link failure qiuzan2001 reported on #1120.
Verifier::record_window(src/core/verify.cpp, compiled into the Mac engine via metal/CMakeLists.txt) callsstrata::kernels::wait_handoffandstrata::kernels::handoff_publishsince the overlapped hand-off landed. Both are defined only in src/kernels/cuda/verify_kernels.cu, and the generated metal/src/engine/stubs.cpp stubs the neighbouringwait_flag_ge/wait_flag_ge_orbut not these two, so ld64 reports them undefined.This adds
metal/src/engine/stubs_145.cpp(a separate file, like stubs_144.cpp, so the generated stubs.cpp stays untouched), defining both with the header's exact signatures; each callsstrata::metal_engine::missing(...)like the other stubs. The overlap is opt-in and needs two CUDA/HIP devices, so these are not reached on Metal.Not built on a Mac (I don't have one); the signatures were checked against include/strata/kernels/verify_kernels.hpp on main. A Metal build to confirm the link would be appreciated.
Note: a static scan of 0.1.45 finds seven more entry points called from Metal-compiled sources (verify.cpp, mtp.cpp) with no Metal definition or stub:
wait_flag_ge_stamped,wait_copy_i32_from_mapped,gdn_conv_ab_multi,gdn_step_norm_groups,gather_rows,argmax_rows_scratch_bytes,row_top_prob_scratch_bytes. @qiuzan2001, could you paste the full ld64 output? If those are undefined too, the right fix is regenerating stubs.cpp with metal/tools/gen_stubs.py from that log, and I can fold it into this PR.🤖 Generated with Claude Code
https://claude.ai/code/session_016BbK25NizvXkQUCrF1kWAX
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.