Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/marian-nmt/marian.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHieu Hoang <hieuhoang@gmail.com>2017-12-07 04:00:08 +0300
committerHieu Hoang <hieuhoang@gmail.com>2017-12-07 04:00:08 +0300
commit60d4266822ca228199bc3027fc82589c83a384a6 (patch)
tree5662c5ae8ec617818d266d317c27f3373117fde2
parent55ac6ae8fb11041c945b70bf27247c31e6665b49 (diff)
delete all mention of half2halfC
-rw-r--r--src/amun/half/mblas/matrix_functions.h7
-rw-r--r--src/amun/half/mblas/thrust_functions.h19
2 files changed, 4 insertions, 22 deletions
diff --git a/src/amun/half/mblas/matrix_functions.h b/src/amun/half/mblas/matrix_functions.h
index 8a7a3037..fdf92ccb 100644
--- a/src/amun/half/mblas/matrix_functions.h
+++ b/src/amun/half/mblas/matrix_functions.h
@@ -216,17 +216,18 @@ __global__ void gBroadcast(Functor functor,
uint batchIdx = batchMappingWrap[ beamIdx ];
- //outWrap[id] = functor(in1Wrap[(batchIdx * srcSize + srcId) * cols + stateIdx],
- // in2Wrap[beamIdx * cols + stateIdx]);
+ outWrap[id] = functor(in1Wrap[(batchIdx * srcSize + srcId) * cols + stateIdx],
+ in2Wrap[beamIdx * cols + stateIdx]);
//outWrap[id] = functor(in1Wrap(indices[0], indices[1], 0, batchIdx),
// in2Wrap(indices[2], indices[1], 0, 0));
//outWrap(srcId, stateIdx, beamIdx, 0) = functor(in1Wrap(srcId, stateIdx, 0, batchIdx),
// in2Wrap(beamIdx, stateIdx, 0, 0));
+ /*
const half *in1 = &in1Wrap(srcId, stateIdx, 0, batchIdx);
const half *in2 = &in2Wrap(beamIdx, stateIdx, 0, 0);
half *out = &outWrap(srcId, stateIdx, beamIdx, 0);
*out = functor(*in1, *in2);
-
+ */
}
}
diff --git a/src/amun/half/mblas/thrust_functions.h b/src/amun/half/mblas/thrust_functions.h
index 3373b1e5..ba36f662 100644
--- a/src/amun/half/mblas/thrust_functions.h
+++ b/src/amun/half/mblas/thrust_functions.h
@@ -20,19 +20,6 @@ inline half htanh(const half x)
return ret;
}
-__device__
-inline half2 htanh(const half2 x)
-{
- half2 one = __float2half2_rn(1.0f);
- half2 t1 = h2exp(__hmul2(__float2half2_rn(2.0f), x));
- half2 t2 = __hsub2(one, t1);
- half2 t3 = __hadd2(one, t1);
- t3 = h2rcp(t3);
- half2 ret = __hmul2(t1, t3);
-
- return ret;
-}
-
namespace thrust
{
namespace detail
@@ -75,12 +62,6 @@ namespace thrust
T operator()(const T &x, const T &y) const { return x + y; }
};
- template<>
- struct half_binary_add<half2> : public thrust::binary_function<half2,half2,half2> {
- __device__
- half2 operator()(const half2 &x, const half2 &y) const { return __hadd2(x, y); }
- };
-
template<typename Eval1, typename Eval2>
__host__ __device__
actor<composite<binary_operator<half_binary_add>, actor<Eval1>, actor<Eval2>>>