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

Log_softmax backward case#1: axis=-1 #32180

Merged
merged 13 commits into from
Apr 14, 2021

Conversation

AshburnLee
Copy link
Contributor

@AshburnLee AshburnLee commented Apr 10, 2021

PR types

Performance optimization

PR changes

OPs

Describe

实现log_softmax的cuda版本。如下是前向计算的3个case。当前PR实现case#1 的反向计算。

if (inner_size == 1) {
    if (dim_size <= 1024 && dim_size * sizeof(T) <= 4096) {
        case#1  
    } else {
        case#2
    }
} else {
    case#3
}

@paddle-bot-old
Copy link

Thanks for your contribution!
Please wait for the result of CI firstly. See Paddle CI Manual for details.

Copy link
Contributor

@Xreki Xreki left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. 有3处小的修改建议,可以下个PR再改。

paddle/fluid/operators/log_softmax_op.cu Show resolved Hide resolved
paddle/fluid/operators/log_softmax_op.cu Show resolved Hide resolved
paddle/fluid/operators/log_softmax_op.cu Show resolved Hide resolved
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

Successfully merging this pull request may close these issues.

2 participants