Giter VIP home page Giter VIP logo

Comments (8)

maleadt avatar maleadt commented on May 25, 2024 1

CUDA.jl has recently seen a bunch of unified memory-related improvements, https://info.juliahub.com/cuda-jl-5-1-unified-memory, we should probably backport a bunch of those here (e.g. the ability to conveniently unsafe_wrap a Julia Array to MtlArray, if possible).

from metal.jl.

tgymnich avatar tgymnich commented on May 25, 2024 1

tracked also here: #62

from metal.jl.

habemus-papadum avatar habemus-papadum commented on May 25, 2024

Hi -- this looks to be done already:

function MtlArray{T,N}(::UndefInitializer, dims::Dims{N}; storage=Shared) where {T,N}

(MtlBuffer defaults to private but MtlArray to Shared; kwarg exists to choose another option)

If this seems correct, lmk and I will add documentation for others (and our future-selves.)

from metal.jl.

maleadt avatar maleadt commented on May 25, 2024

Ah right, that's where it's set. That doesn't seem great, as per Apple we should be using private storage.

from metal.jl.

habemus-papadum avatar habemus-papadum commented on May 25, 2024

I agree with that. I will try changing the default and updating the unifiedmemory example (and the gtk example)

from metal.jl.

jvkersch avatar jvkersch commented on May 25, 2024

Just wanted to add that I stumbled across this issue when using Metal.jl through KernelAbstractions; I wanted to do some experiments with shared arrays but quickly found that the default allocator allocates arrays in private storage mode. I ended up just adding some defaults to the allocator (jvkersch@08ea259), but as I'm neither a Julia or GPU programmer this is probably not the right approach. Still interested in seeing how this issue evolves, however!

from metal.jl.

tgymnich avatar tgymnich commented on May 25, 2024

fixed by #305

from metal.jl.

maleadt avatar maleadt commented on May 25, 2024

There's still a couple of important improvements to make, e.g. the ability to cheaply wrap Arrays with an MtlArray and vice-versa. That should make it much easier to use Metal.jl in an existing application.

from metal.jl.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.