Skip to content

Commit

Permalink
Change local variable naming and remove redundant includes.
Browse files Browse the repository at this point in the history
Change local variable naming and remove redundant includes.

ONE-DCO-1.0-Signed-off-by: Banseok Lee <[email protected]>
  • Loading branch information
BLee-bot committed Nov 4, 2024
1 parent 1b54938 commit 4ff4986
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,6 @@

#include "record-hessian/HessianComputer.h"

#include <luci_interpreter/Interpreter.h>
#include <luci_interpreter/core/Tensor.h>
#include <luci/IR/CircleNodes.h>

namespace record_hessian
{

Expand Down
14 changes: 6 additions & 8 deletions compiler/record-hessian/src/HessianObserver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,6 @@

#include "record-hessian/HessianObserver.h"

#include <luci/IR/CircleOpcode.h>
#include <luci/IR/CircleNodes.h>

using DataType = luci_interpreter::DataType;

namespace record_hessian
Expand All @@ -29,14 +26,15 @@ void HessianObserver::postTensorWrite(const luci::CircleNode *node,
{

auto node_outputs = loco::succs(node);
for (auto node : node_outputs)
for (auto node_output : node_outputs)
{
auto _node = dynamic_cast<luci::CircleNode *>(node);
auto cur_node = dynamic_cast<luci::CircleNode *>(node_output);
assert(cur_node != nullptr);
// TODO : ADD TCONV/DepthCONV cases
if (_node->opcode() == luci::CircleOpcode::FULLY_CONNECTED ||
_node->opcode() == luci::CircleOpcode::CONV_2D)
if (cur_node->opcode() == luci::CircleOpcode::FULLY_CONNECTED ||
cur_node->opcode() == luci::CircleOpcode::CONV_2D)
{
_hessian_computer.recordHessian(_node, tensor);
_hessian_computer.recordHessian(cur_node, tensor);
}
}
}
Expand Down

0 comments on commit 4ff4986

Please sign in to comment.