Added preliminary support for half floats on CUDA GPU. For now we can simply convert floats into half floats and vice versa

This commit is contained in:
Benoit Steiner
2016-02-19 06:16:07 +00:00
parent 8ce46f9d89
commit 17b9fbed34
4 changed files with 109 additions and 3 deletions

View File

@@ -200,6 +200,7 @@
#if defined __CUDACC__
#define EIGEN_VECTORIZE_CUDA
#include <vector_types.h>
#include <cuda_fp16.h>
#endif
#if (defined _OPENMP) && (!defined EIGEN_DONT_PARALLELIZE)
@@ -329,7 +330,9 @@ using std::ptrdiff_t;
#if defined EIGEN_VECTORIZE_CUDA
#include "src/Core/arch/CUDA/PacketMath.h"
#include "src/Core/arch/CUDA/PacketMathHalf.h"
#include "src/Core/arch/CUDA/MathFunctions.h"
#include "src/Core/arch/CUDA/TypeCasting.h"
#endif
#include "src/Core/arch/Default/Settings.h"