Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/poly/dma_inject.cc
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ void ExtractOffsetFromConstraintEx(__isl_keep isl_constraint *c, EqualityInfoMap
CHECK(equality_info_map != nullptr);
if (!isl_constraint_is_equality(c)) return;

EqualityConstraintInfo info;
EqualityConstraintInfo info{0};
auto val_ptr = isl_constraint_get_constant_val(c);
info.offset = static_cast<int>(isl_val_get_num_si(val_ptr));
static_cast<void>(isl_val_free(val_ptr));
Expand Down
4 changes: 2 additions & 2 deletions src/poly/tiling/tiling_strategy_manager_gpu.cc
Original file line number Diff line number Diff line change
Expand Up @@ -713,7 +713,7 @@ void GpuStrategy::ApplyCustomConstraint() {
// add constraints to binding space according to custom tiling
std::unordered_set<std::string> thread_keys = {AT_THREAD_MIN, AT_THREAD_MAX, AT_THREAD_MOD};
std::unordered_set<std::string> block_keys = {AT_BLOCK_MIN, AT_BLOCK_MAX, AT_BLOCK_MOD};
for (const auto attr : analyzer_->RootAxis()->attrs) {
for (const auto &attr : analyzer_->RootAxis()->attrs) {
std::vector<int64_t> constraint;
std::vector<TileAxis::MappingConstraint> target;
if (thread_keys.find(attr.attr_key) != thread_keys.end()) {
Expand Down Expand Up @@ -1756,7 +1756,7 @@ void GpuStrategy::AnalyzeBroadcastIdx() {
continue;
}
auto op_types = common::Split(attr.attr_key, "_");
for (const auto type : op_types) {
for (const auto &type : op_types) {
if (type.find(AT_BROADCAST) == std::string::npos) {
continue;
}
Expand Down
2 changes: 1 addition & 1 deletion src/poly/tiling/tiling_strategy_manager_npu.cc
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ void DmaAlignStrategy::AddNpuConstraint() {
}

for (auto axis : analyzer_->GetAxesOfAttr(AT_BROADCAST_INNERMOST_AXIS)) {
for (const auto attr : axis->attrs) {
for (const auto &attr : axis->attrs) {
if (attr.attr_key != AT_BROADCAST_INNERMOST_AXIS) {
continue;
}
Expand Down
4 changes: 2 additions & 2 deletions src/poly/tune_info_adapter.cc
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ TuneAxisInfo AxisInfoAdapter(TileAxis *a, TileSizes dims) {
if (axis_info->dims.empty()) {
axis_info->dims.push_back(MIN_TILE);
}
for (const auto attr : a->attrs) {
for (const auto &attr : a->attrs) {
if (axis_info->attrs.find(attr.attr_key) != axis_info->attrs.end()) {
axis_info->attrs[attr.attr_key].push_back(attr.attr_value);
} else {
Expand Down Expand Up @@ -113,7 +113,7 @@ std::unique_ptr<TuneInfo> AdaptTuneInfo(const TilingAnalyzer &analyzer, ScopInfo
auto t = scop_info->analysis_result_.ShowOpTemplate();
tune_info->analysis.Set("op_template", StringImm::make(t));
auto axis_info = make_node<TuneAxisInfoNode>();
for (const auto attr : a->attrs) {
for (const auto &attr : a->attrs) {
if (axis_info->attrs.find(attr.attr_key) != axis_info->attrs.end()) {
axis_info->attrs[attr.attr_key].push_back(attr.attr_value);
} else {
Expand Down
2 changes: 1 addition & 1 deletion src/schedule/auto_inline.cc
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ class CSE {
for (const auto op : sch->outputs) {
count_used_number(op);
}
for (const auto op : counter) {
for (const auto &op : counter) {
if (op.second > 1) {
RemoveShortCommonExpr(op.first, op.first);
}
Expand Down
4 changes: 2 additions & 2 deletions third_party/incubator-tvm/3rdparty/picojson/picojson.h
Original file line number Diff line number Diff line change
Expand Up @@ -386,8 +386,8 @@ GET(std::string, *u_.string_)
GET(array, *u_.array_)
GET(object, *u_.object_)
#ifdef PICOJSON_USE_INT64
GET(double, (type_ == int64_type && (const_cast<value*>(this)->type_ = number_type,
const_cast<value*>(this)->u_.number_ = u_.int64_),
GET(double, (type_ == int64_type && ((const_cast<value*>(this)->type_ = number_type),
(const_cast<value*>(this)->u_.number_ = u_.int64_)),
u_.number_))
GET(int64_t, u_.int64_)
#else
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -543,7 +543,7 @@ class TVMPODValue_ {
protected:
friend class TVMArgsSetter;
friend class TVMRetValue;
TVMPODValue_() : type_code_(kNull) {}
TVMPODValue_() : type_code_(kNull) {value_.v_handle = nullptr;}
TVMPODValue_(TVMValue value, int type_code)
: value_(value), type_code_(type_code) {}

Expand Down
2 changes: 1 addition & 1 deletion third_party/incubator-tvm/src/relay/op/tensor/transform.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1655,7 +1655,7 @@ bool SqueezeRel(const Array<Type>& types,
CHECK_LT(axis_val, original_shape.size());
original_shape.at(axis_val).second = false;
}
for (const auto p : original_shape) {
for (const auto &p : original_shape) {
if (p.second) {
result_shape.push_back(p.first);
} else {
Expand Down