mirror of
https://github.com/lordmathis/CUDANet.git
synced 2025-12-22 14:24:22 +00:00
Restructure include paths
This commit is contained in:
@@ -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;
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
#include "activation_functions.cuh"
|
#include "backend/cuda/kernels/activation_functions.cuh"
|
||||||
|
|
||||||
using namespace CUDANet;
|
using namespace CUDANet;
|
||||||
|
|
||||||
|
|||||||
@@ -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];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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;
|
||||||
|
|
||||||
|
|||||||
@@ -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;
|
||||||
|
|
||||||
|
|||||||
@@ -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;
|
||||||
|
|
||||||
|
|||||||
@@ -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;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user