Commit 37f4de96 authored by Paul's avatar Paul
Browse files

Add miopen fusion objects

parent 3d912972
......@@ -17,6 +17,8 @@ using pooling_descriptor = MIGRAPH_MANAGE_PTR(miopenPoolingDescriptor_t,
miopenDestroyPoolingDescriptor);
using activation_descriptor = MIGRAPH_MANAGE_PTR(miopenActivationDescriptor_t,
miopenDestroyActivationDescriptor);
using fusion_plan_descriptor = MIGRAPH_MANAGE_PTR(miopenFusionPlanDescriptor_t, miopenDestroyFusionPlan);
using fused_operator_args = MIGRAPH_MANAGE_PTR(miopenOperatorArgs_t, miopenDestroyOperatorArgs);
template <class Result, class F, class... Ts>
Result make_obj(F f, Ts... xs)
......@@ -84,6 +86,17 @@ inline activation_descriptor make_relu()
return ad;
}
inline fusion_plan_descriptor make_fusion_plan(const migraph::shape& input)
{
auto t = make_tensor(input);
return make_obj<fusion_plan_descriptor>(&miopenCreateFusionPlan, miopenVerticalFusion, t.get());
}
inline fused_operator_args make_fused_args()
{
return make_obj<fused_operator_args>(&miopenCreateOperatorArgs);
}
} // namespace gpu
} // namespace migraph
......
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