summaryrefslogtreecommitdiff
path: root/modules/remote-sycl/benchmarks/kernel_mixed_precision.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'modules/remote-sycl/benchmarks/kernel_mixed_precision.cpp')
-rw-r--r--modules/remote-sycl/benchmarks/kernel_mixed_precision.cpp40
1 files changed, 20 insertions, 20 deletions
diff --git a/modules/remote-sycl/benchmarks/kernel_mixed_precision.cpp b/modules/remote-sycl/benchmarks/kernel_mixed_precision.cpp
index c71582e..b939374 100644
--- a/modules/remote-sycl/benchmarks/kernel_mixed_precision.cpp
+++ b/modules/remote-sycl/benchmarks/kernel_mixed_precision.cpp
@@ -13,14 +13,14 @@ saw::interface<sch::MixedPrecisionBenchmarkInterface, saw::encode::Sycl<saw::enc
h.parallel_for(cl::sycl::range<1>(in_size.get()), [=] (cl::sycl::id<1> it){
- saw::data<sch::Float64> foo = {acc_buff[0u].at(it[0u]).get()};
+ saw::data<sch::Float64> foo = {acc_buff[it[0u]].get()};
for(uint64_t i = 0; i < arithmetic_intensity; ++i){
if( foo.get() == 1.1e12 ){
- acc_buff[0u].at(it[0u]) = 0.f;
+ acc_buff[it[0u]] = 0.f;
}
foo = foo + foo * saw::data<sch::Float64>{1.7342345};
}
- acc_buff[0u].at(it[0u]) = foo;
+ acc_buff[it[0u]] = foo;
});
});
return saw::void_t{};
@@ -31,14 +31,14 @@ saw::interface<sch::MixedPrecisionBenchmarkInterface, saw::encode::Sycl<saw::enc
auto acc_buff = in.template access<cl::sycl::access::mode::read_write>(h);
h.parallel_for(cl::sycl::range<1>(in_size.get()), [=] (cl::sycl::id<1> it){
- saw::data<sch::Float64> foo = {acc_buff[0u].at(it[0u]).get()};
+ saw::data<sch::Float64> foo = {acc_buff[it[0u]].get()};
for(uint64_t i = 0; i < arithmetic_intensity; ++i){
if( foo == saw::data<sch::Float64>{1.1e12} ){
- acc_buff[0u].at(it[0u]) = 0.f;
+ acc_buff[it[0u]] = 0.f;
}
foo = foo +foo * saw::data<sch::Float64>{1.7342345};
}
- acc_buff[0u].at(it[0u]) = foo;
+ acc_buff[it[0u]] = foo;
});
});
return saw::void_t{};
@@ -49,14 +49,14 @@ saw::interface<sch::MixedPrecisionBenchmarkInterface, saw::encode::Sycl<saw::enc
auto acc_buff = in.template access<cl::sycl::access::mode::read_write>(h);
h.parallel_for(cl::sycl::range<1>(in_size.get()), [=] (cl::sycl::id<1> it){
- saw::data<sch::Float32> foo = {acc_buff[0u].at(it[0u]).get()};
+ saw::data<sch::Float32> foo = {acc_buff[it[0u]].get()};
for(uint64_t i = 0; i < arithmetic_intensity; ++i){
if( foo == saw::data<sch::Float32>{1.1e12f} ){
- acc_buff[0u].at(it[0u]) = 0.f;
+ acc_buff[it[0u]] = 0.f;
}
foo = foo + foo * saw::data<sch::Float32>{1.7342345f};
}
- acc_buff[0u].at(it[0u]) = foo;
+ acc_buff[it[0u]] = foo;
});
});
return saw::void_t{};
@@ -74,14 +74,14 @@ saw::interface<sch::FloatPrecisionBenchmarkInterface<sch::MixedArray>, saw::enco
h.parallel_for(cl::sycl::range<1>(in_size.get()), [=] (cl::sycl::id<1> it){
- saw::data<sch::Float64> foo = {acc_buff[0u].at(it[0u]).get()};
+ saw::data<sch::Float64> foo = {acc_buff[it[0u]].get()};
for(uint64_t i = 0; i < arithmetic_intensity; ++i){
if( foo.get() == 1.1e12 ){
- acc_buff[0u].at(it[0u]) = 0.f;
+ acc_buff[it[0u]] = 0.f;
}
foo = foo + foo * saw::data<sch::Float64>{1.7342345};
}
- acc_buff[0u].at(it[0u]) = foo;
+ acc_buff[it[0u]] = foo;
});
});
return saw::void_t{};
@@ -92,18 +92,18 @@ saw::interface<sch::FloatPrecisionBenchmarkInterface<sch::Float32Array>, saw::en
return {
[&](saw::data<sch::Float32Array, saw::encode::Sycl<saw::encode::Native>>& in, cl::sycl::queue* cmd) -> saw::error_or<void> {
auto in_size = in.size();
- float32_ev = cmd->submit([&](cl::sycl::handler& h){
+ ev = cmd->submit([&](cl::sycl::handler& h){
auto acc_buff = in.template access<cl::sycl::access::mode::read_write>(h);
h.parallel_for(cl::sycl::range<1>(in_size.get()), [=] (cl::sycl::id<1> it){
- saw::data<sch::Float32> foo = {acc_buff[0u].at(it[0u]).get()};
+ saw::data<sch::Float32> foo = {acc_buff[it[0u]].get()};
for(uint64_t i = 0; i < arithmetic_intensity; ++i){
if( foo == saw::data<sch::Float32>{1.1e12f} ){
- acc_buff[0u].at(it[0u]) = 0.f;
+ acc_buff[it[0u]] = 0.f;
}
foo = foo + foo * saw::data<sch::Float32>{1.7342345f};
}
- acc_buff[0u].at(it[0u]) = foo;
+ acc_buff[it[0u]] = foo;
});
});
return saw::void_t{};
@@ -115,18 +115,18 @@ saw::interface<sch::FloatPrecisionBenchmarkInterface<sch::Float64Array>, saw::en
return {
[&](saw::data<sch::Float64Array, saw::encode::Sycl<saw::encode::Native>>& in, cl::sycl::queue* cmd) -> saw::error_or<void> {
auto in_size = in.size();
- float64_ev = cmd->submit([&](cl::sycl::handler& h){
+ ev = cmd->submit([&](cl::sycl::handler& h){
auto acc_buff = in.template access<cl::sycl::access::mode::read_write>(h);
h.parallel_for(cl::sycl::range<1>(in_size.get()), [=] (cl::sycl::id<1> it){
- saw::data<sch::Float64> foo = {acc_buff[0u].at(it[0u]).get()};
+ saw::data<sch::Float64> foo = {acc_buff[it[0u]].get()};
for(uint64_t i = 0; i < arithmetic_intensity; ++i){
if( foo == saw::data<sch::Float64>{1.1e12} ){
- acc_buff[0u].at(it[0u]) = 0.f;
+ acc_buff[it[0u]] = 0.f;
}
foo = foo +foo * saw::data<sch::Float64>{1.7342345};
}
- acc_buff[0u].at(it[0u]) = foo;
+ acc_buff[it[0u]] = foo;
});
});
return saw::void_t{};