Coder Social home page Coder Social logo

Comments (5)

moon6pence avatar moon6pence commented on July 1, 2024

I didn't test the code yet, but you have to copy Array to CudaArray to use in GPU.

Use CudaArray like this before calling the kernel:

        d_q = CudaArray(q)
        CUDArt.launch(juliafn, length(d_q), 1, (d_q, out, uint16(maxiter)))

from cudart.jl.

mindbound avatar mindbound commented on July 1, 2024

That fails with:

_ERROR: Invalid value
in checkdrv at /home/???/.julia/v0.3/CUDArt/src/module.jl:6
in launch at /home/???/.julia/v0.3/CUDArt/src/execute.jl:16
in anonymous at /home/???/julia.jl:16
in CuModule at /home/???/.julia/v0.3/CUDArt/src/module.jl:39
in anonymous at /home/???/julia.jl:12
in devices at /home/???/.julia/v0.3/CUDArt/src/device.jl:57
in devices at /home/???/.julia/v0.3/CUDArt/src/device.jl:49
in julia at /home/???/julia.jl:9
in include at /usr/bin/../lib/julia/sys.so
in include_from_node1 at loading.jl:128
in process_options at /usr/bin/../lib/julia/sys.so
in start at /usr/bin/../lib/julia/sys.so
while loading /home/???/julia.jl, in expression starting on line 24

from cudart.jl.

timholy avatar timholy commented on July 1, 2024

@moon6pence is right that you needed to move the memory to the GPU first. His suggestion seemed to have overcome the first problem, but now there seems to be something else going on. As a first thing to check, does Pkg.test("CUDArt") pass for you?

from cudart.jl.

mindbound avatar mindbound commented on July 1, 2024

Yes, the tests do pass.

from cudart.jl.

moon6pence avatar moon6pence commented on July 1, 2024

In launching cuda kernel,

CUDArt.launch(juliafn, length(d_q), 1, (d_q, out, uint16(maxiter)))

You have to specify proper block size rather than 1. ex) 256, 512, 1024, ...
It may be work with block size 1 but definitely run slow.

CUDArt.launch(juliafn, div(length(d_q), 512), 512, (d_q, out, uint16(maxiter)))

However, I couldn't get the julia image.
Keep checking julia.cu generates proper julia set.

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