Giter VIP home page Giter VIP logo

Comments (5)

zz-Malfurion avatar zz-Malfurion commented on August 30, 2024

Ohh, I just found this limitation in the paper.

Injected functions may not use shared and constant memory because that memory can be used by the application itself.

But in my inject_kernel, I just want to read the shared memory of the origin kernel instead of modifying it. That is also not possible?

from nvbit.

ovilla avatar ovilla commented on August 30, 2024

We currently don't have an interface for reading shared memory within an injected function.
We will keep it in mind for next version, but unfortunately we will not be able to explore this in short time as it requires non trivial amount of plumbing.

from nvbit.

zz-Malfurion avatar zz-Malfurion commented on August 30, 2024

Can I pass the c[0x0][0x18] and c[0x0][0x1c] as the base address of the shared memory? (BTW, I'm using GV100).

It works for me in this simple test:

extern "C" __device__ __noinline__ void inject_kernel(unsigned int r2, unsigned int r3) {
    unsigned long x = ((unsigned long)r3 << 32) | r2;
    long *shared_mem_ptr = (long *)x;
    printf("%ld\n", *shared_mem_ptr);
}

from nvbit.

ovilla avatar ovilla commented on August 30, 2024

We never tried that explicitly, but it seems promising.

From the earlier post I thought you were looking for an API to dump the entire content of shmem (without knowing a particular address), but if you know the exact address I guess you can do the way you are doing above... it should be safe.

from nvbit.

zz-Malfurion avatar zz-Malfurion commented on August 30, 2024

Thanks for your explanation.

from nvbit.

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.