Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

About sru_cuda_kernel.cu #181

Open
LittleRooki opened this issue Apr 28, 2021 · 1 comment
Open

About sru_cuda_kernel.cu #181

LittleRooki opened this issue Apr 28, 2021 · 1 comment

Comments

@LittleRooki
Copy link

LittleRooki commented Apr 28, 2021

Hi, I want to verify that my implementation of sru is correct, so I want to know more details.
Can you tell me how to printf in sru_cuda_kernel.cu, for example:

        const auto u0 = *up;
        const auto u1 = *(up + 1);
        const auto u2 = *(up + 2);
        const auto wc1 = *vp1;
        const auto wc2 = *vp2;
        const auto x_val = (skip_type) ? (*xp) : (scalar_t)0.f;
        const auto g1 = sigmoidf(u1 + wc1*cur + bias1);
        const auto g2 = sigmoidf(u2 + wc2*cur + bias2);
        cur = (cur-u0)*g1 + u0;
        const auto val = calc_activation(activation_type, cur);
        *hp = skip_type ? ((val - x_val) * mask * g2 + x_val) : (val * mask * g2);

I want to know how to printf wc1, wc2 and g1? Can you give me some help?

@taolei87
Copy link
Contributor

taolei87 commented May 1, 2021

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants