mirror of
https://github.com/ROCm/composable_kernel.git
synced 2026-04-20 14:59:17 +00:00
Add dynamic elementwise op (#1426)
* Add dynamic elementwise op Co-authored-by: ThruptiRajLakshmanaGowda <thruptiraj.lakshmanagowda@amd.com> * CI issues fix * Custom parameter value for dynamic functions - Comments addressed --------- Co-authored-by: ThruptiRajLakshmanaGowda <thruptiraj.lakshmanagowda@amd.com> Co-authored-by: ThruptiRajLakshmanaGowda <tlakshma@amd.com>
This commit is contained in:
@@ -405,7 +405,7 @@ struct ScaleAddScaleAddRelu
|
||||
const float& d1) const
|
||||
{
|
||||
const float x = c * alpha1_ + alpha2_ * d0 + d1;
|
||||
Relu{}.template operator()<float>(e, x);
|
||||
e = x > 0 ? x : 0;
|
||||
}
|
||||
|
||||
template <>
|
||||
@@ -416,7 +416,7 @@ struct ScaleAddScaleAddRelu
|
||||
type_convert<float>(d1);
|
||||
|
||||
float result = 0;
|
||||
Relu{}.template operator()<float>(result, x);
|
||||
result = x > 0 ? x : 0;
|
||||
|
||||
e = type_convert<half_t>(result);
|
||||
}
|
||||
@@ -429,7 +429,7 @@ struct ScaleAddScaleAddRelu
|
||||
type_convert<float>(d1);
|
||||
|
||||
float result = 0;
|
||||
Relu{}.template operator()<float>(result, x);
|
||||
result = x > 0 ? x : 0;
|
||||
|
||||
e = type_convert<bhalf_t>(result);
|
||||
}
|
||||
@@ -441,7 +441,7 @@ struct ScaleAddScaleAddRelu
|
||||
const float x = type_convert<float>(c) * alpha1_ + alpha2_ * d0 + d1;
|
||||
|
||||
float result = 0;
|
||||
Relu{}.template operator()<float>(result, x);
|
||||
result = x > 0 ? x : 0;
|
||||
|
||||
e = type_convert<int8_t>(result);
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user