Skip to content

Commit

Permalink
Refine pack mapper
Browse files Browse the repository at this point in the history
Rremove restrictions on data types of Pack op

Type: Code Improvement
Signed-off-by: Feiyue Chen <[email protected]>
  • Loading branch information
chenfeiyue-cfy authored and sunshinemyson committed Dec 26, 2023
1 parent d8552f8 commit 91471fc
Showing 1 changed file with 0 additions and 11 deletions.
11 changes: 0 additions & 11 deletions op_map.cc
Original file line number Diff line number Diff line change
Expand Up @@ -3283,17 +3283,6 @@ struct LogicalOpMapper : public OpMapperBase<EmptyStructPlaceholder> {
};

struct PackMapper : public OpMapperBase<TfLitePackParams> {
virtual bool IsOpSupported(TfLiteContext* context,
TfLiteNode* node,
const TfLiteRegistration* registration) const {
auto input_tensor = context->tensors[node->inputs->data[0]];
if (input_tensor.type == kTfLiteInt32 ||
(input_tensor.dims->size == 1 && (input_tensor.type == kTfLiteInt8 ||
input_tensor.type == kTfLiteUInt8))) {
return false;
}
return true;
}
bool HandleMapOp(vx::delegate::Delegate* delegate,
std::vector<std::shared_ptr<tim::vx::Tensor>>& inputs,
std::vector<std::shared_ptr<tim::vx::Tensor>>& outputs,
Expand Down

0 comments on commit 91471fc

Please sign in to comment.