Skip to content

Commit

Permalink
remove unused header and use auto for initializer type
Browse files Browse the repository at this point in the history
Change-Id: I10311b718c3abd0ed75dd88b5ec9de6e0742f047
  • Loading branch information
lhutton1 committed Feb 8, 2022
1 parent 3536c4e commit 86ac9c0
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 8 deletions.
6 changes: 3 additions & 3 deletions src/relay/op/contrib/ethosu/binary_elementwise.cc
Original file line number Diff line number Diff line change
Expand Up @@ -152,12 +152,12 @@ bool EthosuBinaryElementwiseRel(const Array<Type>& types, int num_inputs, const
CheckDataTypeMatch(reporter, ifm_dtype, ifm2_dtype, operator_name, "ifm", "ifm2", operator_type);

if (operator_type == "ADD" || operator_type == "SUB" || operator_type == "MUL") {
std::initializer_list<DataType> allowed_types = {DataType::Int(8), DataType::UInt(8),
DataType::Int(16), DataType::Int(32)};
auto allowed_types = {DataType::Int(8), DataType::UInt(8), DataType::Int(16),
DataType::Int(32)};
CheckDataType(reporter, ifm_dtype, allowed_types, operator_name, "ifm", operator_type);
CheckDataType(reporter, ofm_dtype, allowed_types, operator_name, "ofm", operator_type);
} else if (operator_type == "MIN" || operator_type == "MAX") {
std::initializer_list<DataType> allowed_types = {DataType::Int(8), DataType::UInt(8)};
auto allowed_types = {DataType::Int(8), DataType::UInt(8)};
CheckDataType(reporter, ifm_dtype, allowed_types, operator_name, "ifm", operator_type);
CheckDataTypeMatch(reporter, ifm_dtype, ofm_dtype, operator_name, "ifm", "ofm", operator_type);
} else if (operator_type == "SHR") {
Expand Down
1 change: 0 additions & 1 deletion src/relay/op/contrib/ethosu/common.cc
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
#include "common.h"

#include <sstream>
#include <unordered_set>

#include "../../op_common.h"

Expand Down
2 changes: 0 additions & 2 deletions src/relay/op/contrib/ethosu/common.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@

#include <tvm/relay/expr.h>

#include <unordered_set>

namespace tvm {
namespace relay {
namespace op {
Expand Down
3 changes: 1 addition & 2 deletions src/relay/op/contrib/ethosu/depthwise.cc
Original file line number Diff line number Diff line change
Expand Up @@ -144,8 +144,7 @@ bool EthosuDepthwiseConv2DRel(const Array<Type>& types, int num_inputs, const At
CheckDataType(reporter, scale_bias->dtype, {DataType::UInt(8)}, operator_name, "scale bias");

DataType ofm_dtype = DataTypeFromString(param->ofm_dtype);
std::initializer_list<DataType> ofm_dtypes = {DataType::UInt(8), DataType::Int(8),
DataType::Int(16), DataType::Int(32)};
auto ofm_dtypes = {DataType::UInt(8), DataType::Int(8), DataType::Int(16), DataType::Int(32)};
CheckDataType(reporter, ofm_dtype, ofm_dtypes, operator_name, "ofm");

// Collect the ifm, weight and ofm tensors for using in the inference function
Expand Down

0 comments on commit 86ac9c0

Please sign in to comment.