Commit 3ea86a4d authored by Paul's avatar Paul
Browse files

Formatting

parent a4bb0fdb
...@@ -88,10 +88,7 @@ argument from_gpu(argument arg) ...@@ -88,10 +88,7 @@ argument from_gpu(argument arg)
return result; return result;
} }
void gpu_sync() void gpu_sync() { hipDeviceSynchronize(); }
{
hipDeviceSynchronize();
}
} // namespace gpu } // namespace gpu
......
...@@ -52,14 +52,18 @@ struct hip_sync ...@@ -52,14 +52,18 @@ struct hip_sync
std::string name() const { return "hip::sync"; } std::string name() const { return "hip::sync"; }
shape compute_shape(const std::vector<shape>& inputs) const shape compute_shape(const std::vector<shape>& inputs) const
{ {
if(inputs.empty()) return {}; if(inputs.empty())
else return inputs.front(); return {};
else
return inputs.front();
} }
argument compute(context&, const shape&, const std::vector<argument>& args) const argument compute(context&, const shape&, const std::vector<argument>& args) const
{ {
gpu_sync(); gpu_sync();
if(args.empty()) return {}; if(args.empty())
else return args.front(); return {};
else
return args.front();
} }
}; };
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment