Skip to content

Commit

Permalink
roll lint
Browse files Browse the repository at this point in the history
  • Loading branch information
weberlo committed Aug 11, 2020
1 parent 939c25f commit 938cdef
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
5 changes: 3 additions & 2 deletions python/tvm/relay/quantize/quantize.py
Original file line number Diff line number Diff line change
Expand Up @@ -374,9 +374,10 @@ def quantize(mod, params=None, dataset=None):

q_cfg = current_qconfig()
assert q_cfg.partition_conversions in ['disabled', 'enabled', 'fully_integral']
if q_cfg.partition_conversions != 'disabled':
if q_cfg.partition_conversions == 'disabled':
return mod
else:
quantized_dtypes = {q_cfg.dtype_input, q_cfg.dtype_weight, q_cfg.dtype_activation}
ensure_fully_integral = q_cfg.partition_conversions == 'fully_integral'
return partition_conversions(mod, quantized_dtypes, ensure_fully_integral)

return mod
4 changes: 1 addition & 3 deletions src/relay/analysis/util.cc
Original file line number Diff line number Diff line change
Expand Up @@ -316,9 +316,7 @@ class DtypeCollector : protected ExprVisitor, protected TypeVisitor {
ExprVisitor::VisitExpr(expr);
}

void VisitType_(const TensorTypeNode* op) final {
dtypes_.insert(DLDataType2String(op->dtype));
}
void VisitType_(const TensorTypeNode* op) final { dtypes_.insert(DLDataType2String(op->dtype)); }

Array<String> All(const Expr& expr) {
VisitExpr(expr);
Expand Down

0 comments on commit 938cdef

Please sign in to comment.