Skip to content

Commit

Permalink
fix formating & add asserts
Browse files Browse the repository at this point in the history
ONE-DCO-1.0-Signed-off-by: Banseok Lee <bs93.lee@samsung.com>
  • Loading branch information
BLee-bot committed Oct 28, 2024
1 parent 8829062 commit 480cd33
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions compiler/record-hessian/src/HessianComputer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ void unfold(std::vector<float> &buf, uint32_t input_n, uint32_t input_h, uint32_
uint32_t kernel_ic)
{
if (input_c != kernel_ic)
throw std::runtime_error("Input channels do not match kernel channels.");
throw std::runtime_error("RecordHessian: Input channels do not match kernel channels.");
assert(input_n != 0);
assert(input_h != 0);
assert(input_w != 0);
Expand Down Expand Up @@ -101,7 +101,7 @@ void HessianComputer::recordHessianForFullyConnected(const luci::CircleNode *nod
}
else
{
throw std::runtime_error("Unsupported node rank");
throw std::runtime_error("RecordHessian: Unsupported node rank");
}
assert(size_in_ch != 0);
length = num_elements / size_in_ch;
Expand Down Expand Up @@ -192,7 +192,7 @@ void HessianComputer::recordHessian(const luci::CircleNode *node,
if (node == nullptr || input_tensor == nullptr)
throw std::invalid_argument("RecordHessian: node or input_tensor is null.");

if (input_tensor->element_type() != loco::DataType::FLOAT32)
if (input_tensor->element_type() != luci_interpreter::DataType::FLOAT32)
throw std::runtime_error("RecordHessian: Unsupported dtype: only FLOAT32 is supported.");

switch (node->opcode())
Expand Down

0 comments on commit 480cd33

Please sign in to comment.