deephealthproject / eddl

European Distributed Deep Learning (EDDL) library. A general-purpose library initially developed to cover deep learning needs in healthcare use cases within the DeepHealth project.
https://deephealthproject.github.io/eddl/
MIT License
34 stars 10 forks source link

Remove hardware dependency from descriptors.h #248

Closed salvacarrion closed 3 years ago

salvacarrion commented 3 years ago

Describe the bug

We should aim to remove hardware dependencies from the headers.

Why?

There are cases where we want to simply use the precompiled shared library with the includes without installing any dependencies. The EDDL has been designed in a way that all dependencies can be embedded in itself. To do so, one of the steps is to remove dependency headers from the includes.

How to proceed?

Either create a header in src/include/eddl/hardware/cudnn which is included only with cudnn or add those lines inside a *.cpp file

Example:

We cannot run the unit testing with cuDNN because of these lines in src/include/eddl/descriptors/descriptors.h:

#ifdef cCUDNN
#include <cudnn.h>
extern cudnnHandle_t hdnn[64];
#endif