Giter VIP home page Giter VIP logo

Comments (4)

manopapad avatar manopapad commented on August 30, 2024

I'm afraid I don't understand what your issue is exactly. Are you saying that GPUs are not being used at all? Perhaps the input size is too small, and cuNumeric is deciding it's not worth the overhead to move the data to the GPU, and instead just completes the computation entirely in Python.

from cunumeric.

1193749292 avatar 1193749292 commented on August 30, 2024

@manopapad This demo uses GPUs for acceleration.
I'm just a little curious. For example, np.dot in the code is due to the call to src/cunumeric/matrix/matmul and the GPU is used for acceleration.

In the preceding demo, the (eg: CUNUMERIC_MATMUL, CUNUMERIC_DOT) operator in the cunumeric is not used, but the GPU can be used for acceleration.
I want to know how this works, maybe because the task uses a GPU and uses a TOC_PROC type processor? Is there a way to test this conjecture?

from cunumeric.

manopapad avatar manopapad commented on August 30, 2024

I want to know how this works

All of the arithmetic operations (multiplications, subtractions etc.) are executing on the GPU. The slices are outlining which pieces of the arrays are passed to the kernels.

Is there a way to test this conjecture?

You can run with --progress, which will show which tasks are being launched, and what type of processor they're running on:

(a/env) iblis:~/a/cunumeric> cat c.py
import cunumeric as cn
M = cn.ones((10000,1000))
v = cn.ones((1000,))
x = M.dot(v)
(a/env) iblis:~/a/cunumeric> legate --progress --gpus 2 c.py
[0 - 7ff2a6ffc000]    0.899180 {3}{legate}: cunumeric::MatVecMulTask GPU task [c.py:4], pt = (0,0), proc = 1d00000000000007
[0 - 7ff2a6df6000]    0.899572 {3}{legate}: cunumeric::MatVecMulTask GPU task [c.py:4], pt = (1,0), proc = 1d00000000000008
[0 - 7ff2a6ffc000]    0.961869 {3}{legate}: cunumeric::UnloadCUDALibsTask GPU task [], pt = (0), proc = 1d00000000000007
[0 - 7ff2a6df6000]    0.962215 {3}{legate}: cunumeric::UnloadCUDALibsTask GPU task [], pt = (1), proc = 1d00000000000008

Alternatively, you can run with --profile/--nsys and visualize a trace of the execution using legion_prof/Nsight Systems.

from cunumeric.

1193749292 avatar 1193749292 commented on August 30, 2024

Thank you very much for your answer, it works

from cunumeric.

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.