nn-testing/src/clm_gpu.h
2024-02-21 23:45:11 +01:00

17 lines
586 B
C

#ifndef _CLM_GPU_H_
#define _CLM_GPU_H_
#include "clm.h"
#define CLM_MODE_CPU 1
#define CLM_MODE_OPENCL 2
int clm_gpuInit(unsigned int mode);
void clm_gpuDestroy();
void clm_linearInit(clm_Linear *linear);
void clm_linearForward(clm_Linear *linear, unsigned int batchSize, clm_Matrix *inputs, clm_Matrix *outputs);
void clm_linearBackprop(clm_Linear *linear, float learnRate, unsigned int batchSize, clm_Matrix *inputs, clm_Matrix *outputs, clm_Matrix *inputErrors, bool updateErrors, clm_Matrix *outputErrors, clm_Matrix *outputWeightsErrors, clm_Matrix *outputGradients);
#endif