Giter Site home page Giter Site logo

Comments (4)

maleadt avatar maleadt commented on May 28, 2024 1

Would it be acceptable to specify CUDANATIVE_INITIALIZE=false as environment variable to prevent CUDAnative.jl from initializing device 0, and require you to device!(whatever) explicitly?
Doing so automatically upon the first API call, ie. how CUDA does it, is tricky, as I don't want to prefix every CUDAnative & CUDAdrv function with a initialized || do_initialize() check, nor pay the performance penalty of more automatic schemes (eg. a hook mechanism for @apicall).

from cuarrays.jl.

maleadt avatar maleadt commented on May 28, 2024 1

Adding a simple, well-typed hook turned out not so expensive, so we have full lazy initialization as per CUDA with JuliaGPU/CUDAnative.jl@c36ce17

$ DEBUG=true julia examples/vadd.jl
┌ Debug: Initializing CUDA for default device 0 after API call
│   name = "GeForce GTX TITAN"
│   apicall = :cuMemAlloc
└ @ CUDAnative init.jl:28

Adding an explicit device! disables this mechanism.

from cuarrays.jl.

MikeInnes avatar MikeInnes commented on May 28, 2024

Can you reproduce this just loading CUDAnative? I expect that's where the fix needs to be.

from cuarrays.jl.

denizyuret avatar denizyuret commented on May 28, 2024

Yes, I can confirm that using CUDAnative causes the same problem. Just fill up the memory of gpu0 and it does not see there is other gpus to use.

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