Add avgPool2d implementation

This commit is contained in:
2025-11-21 19:39:30 +01:00
parent c83e1f0c45
commit 5679dc0a50
7 changed files with 102 additions and 67 deletions

28
include/kernels/pool.cuh Normal file
View File

@@ -0,0 +1,28 @@
#pragma once
#include <cuda_runtime.h>
#include "layer.hpp"
namespace CUDANet::Kernels {
__global__ void max_pool(
const float* __restrict__ d_input,
float* __restrict__ d_output,
const Shape input_shape,
const Shape output_shape,
const Shape pool_shape,
const Shape stride_shape,
const Shape padding_shape
);
__global__ void avg_pool(
const float* __restrict__ d_input,
float* __restrict__ d_output,
const Shape input_shape,
const Shape output_shape,
const Shape pool_shape,
const Shape stride_shape,
const Shape padding_shape
);
} // namespace CUDANet::Kernels