Repository navigation
fix(Mac): 0.1.45 does not compile on Metal (three CUDA-only calls in shared host files) - #2984
Closed
SuperDistance wants to merge 1 commit into
Closed
SuperDistance wants to merge 1 commit into
SuperDistance wants to merge 1 commit into
Conversation
…s shared sources) The Metal build compiles the shared host sources with metal/include/metal_compat first on the include path, and three changes in 0.1.45 call CUDA names its shim does not provide, so src/core/verify.cpp and src/core/peer_experts.cpp stop there: - verify.cpp make_stream (the concurrent read, Niko1221#2326; its last commit fcf93bd was not ported): the stream priority calls get the Metal guard mtp.cpp already has for the same calls (default priority). - verify.cpp device_is_sm75 (Niko1221#2222): cudaDevAttrComputeCapabilityMajor/Minor; Metal has no Turing card, so it answers false, as on HIP. - peer_experts.cpp (Niko1221#2666's peer-copy probe): cudaMemcpyPeer and cudaDeviceDisablePeerAccess go into the shim, as e6ad6c8 added them to the HIP one. One GPU: the copy is the peer async copy and a sync; disabling answers unsupported, as enabling does. CUDA and HIP see no change: CUDA's preprocessed verify.cpp and peer_experts.cpp are identical before and after.
4 tasks
Owner
|
Thanks for the pull request. We're resetting the tracker for 0.2.0-beta. There are more than 1,300 open issues and pull requests, too many for us to review properly, so we're closing everything that isn't being worked on right now. Closed here does not mean rejected. To reopen it takes about two minutes:
The rules are in CONTRIBUTING.md. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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_stream&& !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), as e6ad6c8 added 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.