Skip to content

Commit

Permalink
src: common: verbose: zp and scales: add runtime info
Browse files Browse the repository at this point in the history
  • Loading branch information
igorsafo committed Nov 5, 2021
1 parent 6a9a305 commit 9179f15
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/common/verbose.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,9 @@ std::string md2desc_str(const memory_desc_t *md) {

std::ostream &operator<<(std::ostream &ss, const scales_t &oscale) {
ss << oscale.mask_;
if (oscale.mask_ == 0) ss << ":" << get_val_str(oscale.scales_[0]);
const float val = oscale.scales_[0];
if (oscale.mask_ == 0 || is_runtime_value(val))
ss << ":" << get_val_str(val);
return ss;
}

Expand Down Expand Up @@ -394,7 +396,8 @@ std::ostream &operator<<(std::ostream &ss, const primitive_attr_t *attr) {
<< (arg == DNNL_ARG_SRC ? "src"
: arg == DNNL_ARG_DST ? "dst" : "wei")
<< ":" << mask;
if (mask == 0) ss << ":" << get_val_str(*zpp);
if (mask == 0 || is_runtime_value(*zpp))
ss << ":" << get_val_str(*zpp);
delim = attr_delim;
}
ss << " ";
Expand Down

0 comments on commit 9179f15

Please sign in to comment.