mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[PR #2984] [CLOSED] fix(Mac): 0.1.45 does not compile on Metal (three CUDA-only calls in shared host files) #4379
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#4379
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/2984
Author: @SuperDistance
Created: 10/17/2026
Status: ❌ Closed
Base:
main← Head:pr/mac-build-v045📝 Commits (1)
722bb54metal: the Mac build compiles again (three CUDA-only calls in 0.1.45's shared sources)📊 Changes
2 files changed (+9 additions, -3 deletions)
View changed files
📝
metal/include/metal_compat/cuda_runtime.h(+6 -0)📝
src/core/verify.cpp(+3 -3)📄 Description
Summary
0.1.45's Mac build should stop in two shared host files: three changes in this release call CUDA names that
metal/include/metal_compat/cuda_runtime.hdoes not provide. This adds the Metal side of each, the way the code already does it elsewhere. CUDA and HIP are unchanged.What changed
src/core/verify.cpp,make_streamfcf93bde, was not ported; @qiuzan2001 found it)&& !defined(STRATA_GPU_METAL), asmtp.cppguards the same two calls (default priority)src/core/verify.cpp,device_is_sm75metal/include/metal_compat/cuda_runtime.hpeer_experts.cpp)cudaMemcpyPeer(the peer async copy and a sync; one GPU) andcudaDeviceDisablePeerAccess(unsupported, as enabling is), ase6ad6c81added them to the HIP shimHow I checked
There is no Mac here, so I compiled the Mac build's shared host sources the way
metal/CMakeLists.txtdoes (metal/include/metal_compatandmetal/includefirst,STRATA_GPU_METAL=1,STRATA_NATIVE_EXPERTS=1, C++20), syntax only, with g++ 13 on Linux:verify.cppandpeer_experts.cppare identical before and after (CUDA 13.0 headers).verify.cpptake the branch they took before, and the shim is only on the Metal include path.Not checked: a real Mac build and link (Apple clang, the metal-cpp side, the Metal kernels in
metal/src/engine, which this does not touch), and running it.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.