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

ReLU forward and backward implemented in train_gpt2_fp32.cu #1

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

Hrancheng
Copy link
Collaborator

Add Relu forward and backward kernels and it's fitting into model with validation loss decreasing
Usage:
make train_gpt2fp32cu
Enable relu training:
./train_gpt2fp32cu -r 1

@@ -299,6 +299,25 @@ __global__ void softmax_forward_kernel5(float* out, float inv_temperature, const
}
}

//ReLU forward kernel
__global__ void relu_forward_kernel(float* out, const float* inp, int N, int T) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think we need to add the scale (temperature) as well into the kernel

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