Giter Club home page Giter Club logo

Comments (6)

vchuravy avatar vchuravy commented on June 12, 2024

Yeah this decision is always a hard one. What to do with heterogeneous arrays or arrays on different devices. GPUArrays currently fails on heterogenous arrays.

For mixed devices, I presume HSA supports page-faulting memory in from a different device? If so I would choose a device (were that choice can be informed or a guess).

from amdgpu.jl.

jpsamaroo avatar jpsamaroo commented on June 12, 2024

Yes, we only allocate so-called finegrained memory, which is page-fault friendly. If you see my latest pull of memory.jl into the codebase, all upload/download/transfer operations are just implemented as ccall(:memcpy) since it's technically valid and I'm too lazy to figure out how to be efficient right now.

What I think we can/should do when there are multiple devices involved in OOP operations is just allocate solely on the default GPU (the one set by set_default_agent!), and then rely on contextual dispatch to change that value wherever the user wants to use a different default.

from amdgpu.jl.

jpsamaroo avatar jpsamaroo commented on June 12, 2024

Fat-fingered the close button, thanks phone!

from amdgpu.jl.

jpsamaroo avatar jpsamaroo commented on June 12, 2024

Oh, I see what you meant about page-faulting from another device. That would need the ROCm RDMA stuff working most likely. I do plan on implementing that eventually but not right now. Currently we'll just do cross-GPU memory transfer on the host.

from amdgpu.jl.

jpsamaroo avatar jpsamaroo commented on June 12, 2024

Transferring issue (instead of closing) in case this still needs to be addressed for ROCArray

from amdgpu.jl.

jpsamaroo avatar jpsamaroo commented on June 12, 2024

We now allocate coarse-grained memory for ROCArrays, we just allocate new arrays onto the default device, and we have an upload/download/transfer API, so I'm closing this.

from amdgpu.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.