Skip to content

Commit a62c1d2

Browse files
committed
tests: benchdnn: add bia_dt to perf report
1 parent b969eb9 commit a62c1d2

7 files changed

Lines changed: 15 additions & 7 deletions

File tree

tests/benchdnn/conv/conv.hpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ struct settings_t : public base_settings_t {
104104

105105
const char *perf_template_csv() const {
106106
static const std::string args
107-
= "%dir%,%sdt%,%stag%,%wtag%,%dtag%,%alg%";
107+
= "%dir%,%sdt%,%bia_dt%,%stag%,%wtag%,%dtag%,%alg%";
108108
return perf_template_csv_base(args);
109109
}
110110

@@ -207,6 +207,7 @@ struct perf_report_t : public base_perf_report_t {
207207
const std::vector<dnnl_data_type_t> *sdt() const override {
208208
return &p_->dt;
209209
}
210+
const dnnl_data_type_t *bia_dt() const override { return &p_->bia_dt_; }
210211
const attr_t *attr() const override { return &p_->attr; }
211212
const thr_ctx_t *ctx_init() const override { return &p_->ctx_init; }
212213
const thr_ctx_t *ctx_exe() const override { return &p_->ctx_exe; }

tests/benchdnn/deconv/deconv.hpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ struct settings_t : public base_settings_t {
106106

107107
const char *perf_template_csv() const {
108108
static const std::string args
109-
= "%dir%,%sdt%,%stag%,%wtag%,%dtag%,%alg%";
109+
= "%dir%,%sdt%,%bia_dt%,%stag%,%wtag%,%dtag%,%alg%";
110110
return perf_template_csv_base(args);
111111
}
112112

@@ -205,6 +205,7 @@ struct perf_report_t : public base_perf_report_t {
205205
const std::vector<dnnl_data_type_t> *sdt() const override {
206206
return &p_->dt;
207207
}
208+
const dnnl_data_type_t *bia_dt() const override { return &p_->bia_dt_; }
208209
const attr_t *attr() const override { return &p_->attr; }
209210
const thr_ctx_t *ctx_init() const override { return &p_->ctx_init; }
210211
const thr_ctx_t *ctx_exe() const override { return &p_->ctx_exe; }

tests/benchdnn/doc/knobs_perf_report.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ Data types options supported:
3131
| Syntax | Primitives | Description
3232
| :-- | :-- | :--
3333
| %cfg% | Conv, IP, Matmul, Pool, RNN | Config which describes data types and filling rules
34+
| %bia_dt% | BRGEMM, Conv, Deconv, IP, Matmul | Bias data type (precision)
3435
| %dt% | Data md based, Resampling, Zeropad | Source and Destination Data type (precision)
3536
| %ddt% | Binary, Concat, Reduction, Reorder, Sum | Destination data types (precision)
3637
| %sdt% | Binary, Concat, Prelu, Reduction, Reorder, Sum | Source data types (precision)
@@ -137,9 +138,9 @@ CSV-style:
137138
--batch=inputs/ip/test_ip_all
138139
```
139140
```
140-
Template entries: perf,%engine%,%impl%,%name%,%dir%,%sdt%,%stag%,%wtag%,%dtag%,%attr%,%desc%,%Gops%,%+ctime%,%-time%,%-Gflops%,%0time%,%0Gflops%
141-
perf,engine,impl,name,dir,sdt,stag,wtag,dtag,attr,desc,Gops,max_ctime,min_time,min_Gflops,avg_time,avg_Gflops
142-
perf,cpu,brg_matmul:avx512_core,"resnet:ip1",FWD_B,f32:f32:f32,any,any,any,,ic2048oc1000n"resnet:ip1",0.008192,0.9375,0.0234375,349.525,0.027302,300.051
141+
Template entries: perf,%engine%,%impl%,%name%,%dir%,%sdt%,%bia_dt%,%stag%,%wtag%,%dtag%,%attr%,%desc%,%Gops%,%+ctime%,%-time%,%-Gflops%,%0time%,%0Gflops%
142+
perf,engine,impl,name,dir,sdt,bia_dt,stag,wtag,dtag,attr,desc,Gops,max_ctime,min_time,min_Gflops,avg_time,avg_Gflops
143+
perf,cpu,brg_matmul:avx512_core,"resnet:ip1",FWD_B,f32:f32:f32,f32,any,any,any,,ic2048oc1000n"resnet:ip1",0.008192,0.9375,0.0234375,349.525,0.027302,300.051
143144
...
144145
```
145146

tests/benchdnn/ip/ip.hpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,8 @@ struct settings_t : public base_settings_t {
5656
std::vector<std::string> stag {tag::any}, wtag {tag::any}, dtag {tag::any};
5757

5858
const char *perf_template_csv() const {
59-
static const std::string args = "%dir%,%sdt%,%stag%,%wtag%,%dtag%";
59+
static const std::string args
60+
= "%dir%,%sdt%,%bia_dt%,%stag%,%wtag%,%dtag%";
6061
return perf_template_csv_base(args);
6162
}
6263

@@ -152,6 +153,7 @@ struct perf_report_t : public base_perf_report_t {
152153
const std::vector<dnnl_data_type_t> *sdt() const override {
153154
return &p_->dt;
154155
}
156+
const dnnl_data_type_t *bia_dt() const override { return &p_->bia_dt_; }
155157
const attr_t *attr() const override { return &p_->attr; }
156158
const thr_ctx_t *ctx_init() const override { return &p_->ctx_init; }
157159
const thr_ctx_t *ctx_exe() const override { return &p_->ctx_exe; }

tests/benchdnn/matmul/matmul.hpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ struct settings_t : public base_settings_t {
5252
std::vector<std::vector<dims_mask_t>> rt_dims_masks {{}};
5353

5454
const char *perf_template_csv() const {
55-
static const std::string args = "%sdt%,%stag%,%wtag%,%dtag%";
55+
static const std::string args = "%sdt%,%bia_dt%,%stag%,%wtag%,%dtag%";
5656
return perf_template_csv_base(args);
5757
}
5858

@@ -232,6 +232,7 @@ struct perf_report_t : public base_perf_report_t {
232232
const std::vector<dnnl_data_type_t> *sdt() const override {
233233
return &p_->dt;
234234
}
235+
const dnnl_data_type_t *bia_dt() const override { return &p_->bia_dt; }
235236
const attr_t *attr() const override { return &p_->attr; }
236237
const thr_ctx_t *ctx_init() const override { return &p_->ctx_init; }
237238
const thr_ctx_t *ctx_exe() const override { return &p_->ctx_exe; }

tests/benchdnn/utils/perf_report.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,7 @@ void base_perf_report_t::handle_option(std::ostream &s, const char *&option,
118118
HANDLE("dt", if (dt()) s << *dt());
119119
HANDLE("group", if (group()) s << *group());
120120
HANDLE("sdt", if (sdt()) s << *sdt());
121+
HANDLE("bia_dt", if (bia_dt()) s << *bia_dt());
121122
HANDLE("stag", if (stag()) s << *stag());
122123
HANDLE("mb", if (user_mb()) s << *user_mb());
123124
HANDLE("name", if (name()) s << *name());

tests/benchdnn/utils/perf_report.hpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ struct base_perf_report_t {
4949
virtual const dir_t *dir() const { return nullptr; }
5050
virtual const dnnl_data_type_t *dt() const { return nullptr; }
5151
virtual const std::vector<dnnl_data_type_t> *sdt() const { return nullptr; }
52+
virtual const dnnl_data_type_t *bia_dt() const { return nullptr; }
5253
virtual const dnnl_data_type_t *ddt() const { return nullptr; }
5354
virtual const std::string *tag() const { return nullptr; }
5455
virtual const std::string *stat_tag() const { return nullptr; }

0 commit comments

Comments
 (0)