Comments (5)
Great write-up, thanks.
Replace
libcmt
with a pure Julia implementation
Although I'd very much like a native FFI, aren't we going to be running into the same memory-management problems then, and wouldn't we avoid those by using metalcpp? Or can you parse that info from the headers?
Of course, C++ FFI is probably much harder to accomplish than ObjC FFI.
add metalcpp alongside cmt
You mean, as an alternative back-end for Metal.jl? Which wrapping solution would you propose to use for that? CxxWrap.jl is pretty laborious, and Cxx.jl isn't functional.
Probably before spending too much time on revamping
libcmt
it could be useful to agree a scope forMetal.jl
.
Although the focus is currently on compute, as you probably noticed by the bits of Metal I didn't care to wrap in libcmt or the MTL wrappers, I see no problem in adding more broad functionality to Metal.jl. The scope should be to offer Julia support for whatever the Metal libraries have to offer, or at least the bits that somebody cared to wrap and test. For me, that's only the compute parts, but feel free to work on other areas.
from metal.jl.
Thanks for reading! I will add a PR that concretely tries to clarify in code some of the confusing points of my writeup.
from metal.jl.
With #117 merged, this should now be much easier to contribute to. In that PR, I've just copied whatever memory management we were doing, so those points remain. The Clang generator is also still very relevant, although we could probably get most of the benefits already by just having it generate enum definitions instead of the whole Objective-C call signatures (which are both difficult to generate, and might still evolve in ObjectiveC.jl).
@habemus-papadum Since you have a better understanding of the exact memory management semantics in ObjectiveC, feel free to propose changes on that front! I don't have plans for any other large-scale refactors right now, so hopefully we can stabilize the interface a bit.
from metal.jl.
Sounds good -- I was going to write up (& work on) a proposal for a clang-based MacOS Framework to Julia package generator. It would discuss memory management, testing strategy, syntax, api availability, edge cases, etc -- I think it is better suited to start that conversation in Objective-C.jl. If you agree, I think we close this issue as complete, and revisit in Metal.jl after a generator exists.
from metal.jl.
Fine for me.
from metal.jl.
Related Issues (20)
- Support for macOS Sonoma HOT 1
- Long stacktrace when trying to create Float64 rand arrays HOT 2
- allowscalar equivalent for Metal.jl HOT 2
- Equivalent of cuSparse - start with sparse matvec HOT 7
- MPS - Support for Convolutional Neural Network kernels
- sum(vector) allocates a lot and feels slow. HOT 2
- Better error message for mixing MtlArray and Array operations
- Compilation failure due to high register usage HOT 3
- Threadgroup atomics require all-atomic operation HOT 3
- KernelAbstractions: add Atomix back-end
- Define map! ? HOT 1
- Q: How to debug kernels - KA.@print?
- Crash during MTLDispatchListApply HOT 14
- Unable to compile trig functions through ForwardDiff HOT 4
- `symbol multiply defined!` Bug/crash on Julia master, fine on 1.10 HOT 1
- `log1p` fails on `MtlArray{Float32}` HOT 10
- When precompiling, UndefVarError: `CompilerConfig` not defined HOT 2
- Legalization errors with vectorized code HOT 3
- Use vkFFT for FFT support HOT 2
- Error with Julia 1.10 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from metal.jl.