comp files

This commit is contained in:
Aryan Singh committed 2026-06-07 14:30:55 -05:00
1 parent fa3efcaf07
commit 1f77d0131d
27 files changed
+1238 -798

No files matched your search

+2 -2
View File
@@ -6,7 +6,7 @@
#define GELU_SCALING_FACTOR sqrtf(2.0f / M_PI)
__global__ void gelu_forward_kernel(float* out, const float* inp, int N) {
__global__ void gelu_forward_kernel(float* __restrict__ out, const float* __restrict__ inp, int N) {
// Implement this
int x = blockDim.x * blockIdx.x + threadIdx.x;
@@ -22,7 +22,7 @@ __global__ void gelu_forward_kernel(float* out, const float* inp, int N) {
// Launch kernel here
void gelu_forward(float* out, const float* inp, int N) {
// Implement this
dim3 block(32,1,1);
dim3 block(256,1,1);
dim3 grid((N + block.x -1) / block.x);
gelu_forward_kernel<<<grid, block>>>(out, inp, N);