CUDA so fast

This commit is contained in:
Joseph Redmon
2015-01-22 16:38:24 -08:00
parent 4ac78c8926
commit 809f924db2
57 changed files with 1116 additions and 2181 deletions

View File

@ -2,7 +2,7 @@
#define MAXPOOL_LAYER_H
#include "image.h"
#include "opencl.h"
#include "cuda.h"
typedef struct {
int batch;
@ -13,9 +13,9 @@ typedef struct {
float *delta;
float *output;
#ifdef GPU
cl_mem indexes_cl;
cl_mem output_cl;
cl_mem delta_cl;
int *indexes_gpu;
float *output_gpu;
float *delta_gpu;
#endif
} maxpool_layer;
@ -26,8 +26,8 @@ void forward_maxpool_layer(const maxpool_layer layer, float *input);
void backward_maxpool_layer(const maxpool_layer layer, float *delta);
#ifdef GPU
void forward_maxpool_layer_gpu(maxpool_layer layer, cl_mem input);
void backward_maxpool_layer_gpu(maxpool_layer layer, cl_mem delta);
void forward_maxpool_layer_gpu(maxpool_layer layer, float * input);
void backward_maxpool_layer_gpu(maxpool_layer layer, float * delta);
#endif
#endif