Combine padding and conv kernel

This commit is contained in:
2024-03-18 19:53:40 +01:00
parent e6d3757312
commit 6cf604423a
6 changed files with 14 additions and 209 deletions

View File

@@ -3,25 +3,6 @@
namespace CUDANet::Kernels {
/**
* @brief Kernel that pads the input matrix with zeros
*
* @param d_input Device pointer to the input matrix (as vector)
* @param d_padded Device pointer to the padded matrix (as vector)
* @param w Width of the input matrix
* @param h Height of the input matrix
* @param n Number of input channels
* @param p Padding size
*/
__global__ void padding(
const float* __restrict__ d_input,
float* __restrict__ d_padded,
const unsigned int w,
const unsigned int h,
const unsigned int n,
const unsigned int p
);
/**
* @brief Convolution kernel
*

View File

@@ -105,7 +105,6 @@ class Conv2d : public ILayer {
float* d_output;
float* d_weights;
float* d_biases;
float* d_padded;
// Kernels
Layers::Activation activation;