Giter VIP home page Giter VIP logo

Comments (8)

x-y-z avatar x-y-z commented on August 30, 2024

You can use nvbit_read_pred_reg() to read predicate registers. Also you need to include nvbit_reg_rw.h file in your injection function file.

from nvbit.

liujian883 avatar liujian883 commented on August 30, 2024

how to index the pred reg with this api ?the general reg rw api can be set with reg index

from nvbit.

leiwen83 avatar leiwen83 commented on August 30, 2024
extern "C" __device__ __noinline__ int32_t nvbit_read_pred_reg() {
#pragma unroll
    for (int i = 0; i < 32; i++) __nvbit_var += i;
    return __nvbit_var;
}

The definition of this api is as above. how to parse the result?
Like if I want to read what the current status for P5, whether it is true or not, how should I deal wtih the return value?

from nvbit.

x-y-z avatar x-y-z commented on August 30, 2024

It reads out the entire predicate register and only the lower 8 bits ([P7 .. P0]) are used.

from nvbit.

leiwen83 avatar leiwen83 commented on August 30, 2024

I try to add the code, but read out as 0...
I test it over 2080ti.

from nvbit.

x-y-z avatar x-y-z commented on August 30, 2024

If the predicate register is not used in the code or is set to 0, the result will be 0.

from nvbit.

WilliamWangPeng avatar WilliamWangPeng commented on August 30, 2024

I try to add the code, but read out as 0...
I test it over 2080ti.

hi dear @leiwen83
I'm also interested in this nvbit_read_pred_reg() function. but how can you display the values of this function, I try to print the values, but there is an error here,
image

image

thank you
best regards
William

from nvbit.

x-y-z avatar x-y-z commented on August 30, 2024

It is a device function and should be called only in your instrumentation functions in the inject_func.cu file.

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.