Skip to content

Commit

Permalink
[dalgona] Consider no bias in FullyConnected (#14249)
Browse files Browse the repository at this point in the history
This commit considers FullyConnected with no bias.

ONE-DCO-1.0-Signed-off-by: seongwoo <[email protected]>
  • Loading branch information
mhs4670go authored Oct 24, 2024
1 parent 9d5e68d commit e24c111
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions compiler/dalgona/src/PostOperatorHook.h
Original file line number Diff line number Diff line change
Expand Up @@ -187,12 +187,17 @@ class PostOperatorHook final : public luci::CircleNodeVisitor<void>
POST_OPERATOR_HOOK_PROLOGUE(FullyConnected)

auto fused_act = node->fusedActivationFunction();

py::dict bias;
// bias is optional
if (inputs.size() == 3)
{
bias = inputs[2];
}
pySafeCall(hook,
node->name(), // name
inputs[0], // input
inputs[1], // weights
inputs[2], // bias
bias, // bias
output, // output
toString(fused_act) // fused activation
);
Expand Down

0 comments on commit e24c111

Please sign in to comment.