Restructure include paths

This commit is contained in:
2025-11-23 20:57:08 +01:00
parent 4161caf3e1
commit 38cb0c9ac0
13 changed files with 15 additions and 15 deletions

View File

@@ -3,7 +3,7 @@
#include <cstdio> #include <cstdio>
#include <cstdlib> #include <cstdlib>
#include "backend/cuda.cuh" #include "backend/cuda/cuda.cuh"
cudaDeviceProp initializeCUDA() { cudaDeviceProp initializeCUDA() {
int deviceCount; int deviceCount;

View File

@@ -1,4 +1,4 @@
#include "activation_functions.cuh" #include "backend/cuda/kernels/activation_functions.cuh"
using namespace CUDANet; using namespace CUDANet;

View File

@@ -1,6 +1,6 @@
#include <iostream> #include <iostream>
#include "convolution.cuh" #include "backend/cuda/kernels/convolution.cuh"
using namespace CUDANet; using namespace CUDANet;
@@ -39,7 +39,7 @@ __global__ void Kernels::convolution(
continue; continue;
} }
int kernelIndex = int kernel_idx =
f * kernel_shape[0] * kernel_shape[1] * input_shape[2] + f * kernel_shape[0] * kernel_shape[1] * input_shape[2] +
c * kernel_shape[0] * kernel_shape[1] + c * kernel_shape[0] * kernel_shape[1] +
k * kernel_shape[1] + l; k * kernel_shape[1] + l;
@@ -48,7 +48,7 @@ __global__ void Kernels::convolution(
input_shape[1] + input_shape[1] +
(j * stride_shape[1] + l - padding_shape[1]); (j * stride_shape[1] + l - padding_shape[1]);
sum += d_kernel[kernelIndex] * d_input[inputIndex]; sum += d_kernel[kernel_idx] * d_input[inputIndex];
} }
} }
} }

View File

@@ -1,5 +1,5 @@
#include "backend/cuda.cuh" #include "backend/cuda/cuda.cuh"
#include "matmul.cuh" #include "backend/cuda/kernels/matmul.cuh"
using namespace CUDANet; using namespace CUDANet;

View File

@@ -1,5 +1,5 @@
#include "layer.hpp" #include "layer.hpp"
#include "pool.cuh" #include "backend/cuda/kernels/pool.cuh"
using namespace CUDANet; using namespace CUDANet;

View File

@@ -1,8 +1,8 @@
#include "backend/cuda.cuh" #include "backend/cuda/cuda.cuh"
#include "kernels/activation_functions.cuh" #include "backend/cuda/kernels/activation_functions.cuh"
#include "kernels/convolution.cuh" #include "backend/cuda/kernels/convolution.cuh"
#include "kernels/matmul.cuh" #include "backend/cuda/kernels/matmul.cuh"
#include "kernels/pool.cuh" #include "backend/cuda/kernels/pool.cuh"
using namespace CUDANet::Backends; using namespace CUDANet::Backends;

View File

@@ -1,8 +1,8 @@
#include <iostream> #include <iostream>
#include "backend.hpp" #include "backend.hpp"
#include "backend/cuda.cuh" #include "backend/cuda/cuda.cuh"
#include "kernels/matmul.cuh" #include "backend/cuda/kernels/matmul.cuh"
using namespace CUDANet::Backends; using namespace CUDANet::Backends;