ddemidov / ebuilds

Gentoo ebuilds
3 stars 0 forks source link

Support multiple backend switch for ViennaCL via IUSE #3

Open archenroot opened 7 years ago

archenroot commented 7 years ago

I suggest to support different acceleration technologies in: https://github.com/ddemidov/ebuilds/blob/master/dev-util/viennacl/viennacl-9999.ebuild

Something like this based on backend to be supported: IUSE="doc cuda opencl openmp"

ddemidov commented 7 years ago

ViennaCL is header-only library, so the only purpose for those flags I can think of would be to specify optional dependencies (on opencl runtime, cuda, etc). Not sure how useful would that be. Also, its been several years since I've last used Gentoo, so I could not test this anyway. Feel free to provide a pull request though.

Alessandro-Barbieri commented 7 years ago

I found these boolean cmake variables:

BUILD_DOXYGEN_DOCS
BUILD_EXAMPLES
BUILD_TESTING
CUDA_64_BIT_DEVICE_CODE
CUDA_ATTACH_VS_BUILD_RULE_TO_CUDA_FILE
CUDA_BUILD_CUBIN
CUDA_BUILD_EMULATION
CUDA_HOST_COMPILATION_CPP
CUDA_PROPAGATE_HOST_FLAGS
CUDA_SEPARABLE_COMPILATION
ENABLE_ASAN
ENABLE_CUDA
ENABLE_OPENCL
ENABLE_OPENMP
ENABLE_PEDANTIC_FLAGS

build examples with

ENABLE_ARMADILLO
ENABLE_EIGEN
ENABLE_MTL4
ENABLE_UBLAS

cmake automagically set alot of things in base of what it found from the official site CUDA is preferred over OPENCL that is preferred over CPU

I can't really test now because I don't have OPENCL nor CUDA installed

ddemidov commented 7 years ago

The cmake flags control what tests/examples will be built. The ebuild, however, does not build any of those; it just copies the include files into /usr/include. Users of the library may then build their own applications with any of the backends, supported by ViennaCL, simply by providing appropriate preprocessor definitions and link flags.