Comments (3)
These might help:
https://developer.apple.com/documentation/metalperformanceshaders/mpsmatrixsum
https://developer.apple.com/documentation/metalperformanceshaders/mpsnnreducerowsum
https://developer.apple.com/documentation/metalperformanceshaders/mpsnnreducecolumnsum
from metal.jl.
Yeah, mapreduce
is known to be slow, #46. We had sped it up at some point, but had to revert (JuliaGPU/GPUArrays.jl#454), and I haven't had the time to revisit.
Adding specializations that use MPS might be a good workaround for the common cases.
from metal.jl.
Regarding the performance of mapreduce: I think we're fine, see #303 (comment) for a benchmark
Regarding the allocations: I think we can close this in favor of JuliaInterop/ObjectiveC.jl#13
Basically, these aren't caused by the mapreduce
implementation, but are a consequence of how the ObjectiveC object wrappers are designed (all objects being abstract types resulting in dynamic dispatch everywhere).
For example, with the simplest kernel possible:
julia> f() = @metal identity(nothing)
f (generic function with 2 methods)
julia> @time f()
0.000177 seconds (55 allocations: 1.578 KiB)
Metal.HostKernel{typeof(identity), Tuple{Nothing}}(identity, Metal.MTL.MTLComputePipelineStateInstance (object of type AGXG15XFamilyComputePipeline))
Because of these allocations almost all coming from object instances, they are generally small and thus very fast. As such, I don't think this is a performance issue/priority right now.
from metal.jl.
Related Issues (20)
- Autorelease changes lead to use after free with errors
- Shader validator error with linear broadcast kernel HOT 3
- Support for Paravirtualized Graphics for Github Actions CI HOT 4
- Reductions don't work on Shared Arrays HOT 1
- Port the opportunistic synchronization from CUDA.jl HOT 1
- Register v1.1.0 HOT 4
- Tests sporadically timing out on 1.11 HOT 10
- ReshapedArray indexing broken because of Int128 operation HOT 13
- KernelAbstractions copyto! typo
- Segmentation Faults HOT 11
- Port `accmulate!` and `findall` from CUDA.jl HOT 8
- `MTL.append_copy!` silently ignores Metal documentation restriction HOT 2
- Tests failing with `GPUCompiler` v0.26.5 and `LLVM` v7.1 HOT 3
- downgrades LLVM HOT 2
- Missing public/exported docstrings HOT 1
- Audit exports/public symbols HOT 1
- Generalize `adapt` to allow specifying the storage mode but not the element type and/or number of dimensions HOT 3
- sqrt(::Complex) unsupported due to conversion exceptions HOT 3
- Compilation failure on 1.11 HOT 1
- Metal 3.1 and 3.2 HOT 3
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.