mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
[SYCL-2020] Enabling half precision support for SYCL.
This commit is contained in:
committed by
Alejandro Acosta
parent
92a77a596b
commit
ba47341a14
@@ -1118,7 +1118,7 @@ struct GeneralVectorTensor {
|
||||
: globalContractDimOffset + privateOffsetC)
|
||||
: OutScalar(0);
|
||||
|
||||
outScalar[j] = cl::sycl::mad(matScalar, vecScalar, outScalar[j]);
|
||||
outScalar[j] = ::Eigen::internal::pmadd(matScalar, vecScalar, outScalar[j]);
|
||||
privateOffsetNC += Properties::LocalThreadSizeNC;
|
||||
}
|
||||
privateOffsetC += Properties::LocalThreadSizeC;
|
||||
@@ -1263,7 +1263,7 @@ struct GeneralScalarContraction {
|
||||
StorageIndex localid = itemID.get_local_id(0);
|
||||
OutScalar accumulator = OutScalar(0);
|
||||
for (StorageIndex i = globalid; i < rng; i += itemID.get_global_range(0)) {
|
||||
accumulator = cl::sycl::mad(lhs(0, i), rhs(i, 0), accumulator);
|
||||
accumulator = Eigen::internal::pmadd(lhs(0, i), rhs(i, 0), accumulator);
|
||||
}
|
||||
auto out_scratch_ptr = scratch_ptr + localid;
|
||||
*out_scratch_ptr = accumulator;
|
||||
|
||||
Reference in New Issue
Block a user