For Metal project---adding drivers#92
Draft
gulugulubing wants to merge 5 commits into
Draft
Conversation
gulugulubing
commented
May 11, 2026
| import ldc.dcompute; | ||
| pure: nothrow: @nogc: | ||
|
|
||
| pragma(LDC_intrinsic, "air.get_global_id.i32") uint get_global_id(uint dim); |
Author
There was a problem hiding this comment.
@asindarov, is this style of index consistent with your compiler's side progress? And If you are working on how to inline these functions, I found MPM.addPass(llvm::ModuleInlinerWrapperPass()); works https://github.com/gulugulubing/ldc/tree/Metal-OS26-LLVM20.
There was a problem hiding this comment.
yes, it is. I will see if I can run the module level pass during code gen for llvm bitcode
|
|
||
| //suspends work-item execution until all work-items in the work-group have called the barrier | ||
| void barrier() | ||
| void barrier()() |
Author
There was a problem hiding this comment.
At first, I didn't wanna touch the codes related to cuda and ocl, but I found I had to use a zero-argument template to avoid compiling this file. This is related to #95
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.
Start a minimal Metal bindings and mimic cuda or ocl's style. I am not sure whether it's a right direction.
One major blocker was an Objective-C interop RTTI/linker problem in D: