mirror of
https://github.com/uxlfoundation/oneDNN.git
synced 2025-10-20 10:03:50 +08:00
benchdnn: postops: skip select postop cases for gpu device
This commit is contained in:
@ -128,6 +128,7 @@ void skip_unimplemented_prb(const prb_t *prb, res_t *res) {
|
||||
std::vector<dnnl_data_type_t> dts = {prb->sdt[0], prb->sdt[1], prb->ddt};
|
||||
skip_unimplemented_data_type(dts, prb->dir, res);
|
||||
skip_unimplemented_arg_scale(prb->attr, res);
|
||||
skip_unimplemented_binary_po(prb->attr, res);
|
||||
skip_unimplemented_prelu_po(prb->attr, res, dnnl_binary);
|
||||
|
||||
if (is_gpu()) {
|
||||
|
@ -455,6 +455,7 @@ void skip_unimplemented_prb(const prb_t *prb, res_t *res) {
|
||||
skip_unimplemented_data_type({prb->dt}, prb->dir, res);
|
||||
skip_unimplemented_sum_po(
|
||||
prb->attr, res, dnnl_batch_normalization, prb->dt);
|
||||
skip_unimplemented_binary_po(prb->attr, res);
|
||||
skip_unimplemented_prelu_po(prb->attr, res, dnnl_batch_normalization);
|
||||
|
||||
// Non-zero alpha is not supported for training in general.
|
||||
|
@ -495,6 +495,7 @@ void skip_unimplemented_prb(const prb_t *prb, res_t *res) {
|
||||
prb->dir, res);
|
||||
skip_unimplemented_sum_po(
|
||||
prb->attr, res, dnnl_gemm, prb->src_dt(), prb->dst_dt());
|
||||
skip_unimplemented_binary_po(prb->attr, res);
|
||||
skip_unimplemented_prelu_po(prb->attr, res, dnnl_gemm);
|
||||
|
||||
// Unconditionally skip remaining unimplemented cases.
|
||||
|
@ -116,6 +116,7 @@ int fill_src(int input_idx, dnnl_data_type_t dt, dnn_mem_t &mem_dt,
|
||||
void skip_unimplemented_prb(const prb_t *prb, res_t *res) {
|
||||
skip_unimplemented_data_type({prb->sdt, prb->ddt}, prb->dir, res);
|
||||
skip_unimplemented_sum_po(prb->attr, res, dnnl_concat, prb->sdt);
|
||||
skip_unimplemented_binary_po(prb->attr, res);
|
||||
skip_unimplemented_prelu_po(prb->attr, res, dnnl_concat);
|
||||
skip_unimplemented_arg_scale(prb->attr, res);
|
||||
|
||||
|
@ -378,6 +378,7 @@ void skip_unimplemented_prb(const prb_t *prb, res_t *res) {
|
||||
prb->dir, res);
|
||||
skip_unimplemented_sum_po(prb->attr, res, dnnl_convolution,
|
||||
prb->get_dt(SRC), prb->get_dt(DST));
|
||||
skip_unimplemented_binary_po(prb->attr, res);
|
||||
skip_unimplemented_prelu_po(prb->attr, res, dnnl_convolution);
|
||||
|
||||
if (is_cpu()) {
|
||||
|
@ -349,6 +349,7 @@ void skip_unimplemented_prb(const prb_t *prb, res_t *res) {
|
||||
prb->dir, res);
|
||||
skip_unimplemented_sum_po(
|
||||
prb->attr, res, dnnl_deconvolution, prb->get_dt(SRC));
|
||||
skip_unimplemented_binary_po(prb->attr, res);
|
||||
skip_unimplemented_prelu_po(prb->attr, res, dnnl_deconvolution);
|
||||
|
||||
// GPU supports only post ops and all but x8s8bf16 and f32xf16f32 cfg
|
||||
|
@ -803,6 +803,20 @@ void skip_unimplemented_sum_po(const attr_t &attr, res_t *res,
|
||||
}
|
||||
}
|
||||
|
||||
void skip_unimplemented_binary_po(const attr_t &attr, res_t *res) {
|
||||
const auto &po = attr.post_ops;
|
||||
if (po.is_def()) return;
|
||||
|
||||
if (is_gpu()) {
|
||||
const int select_idx = po.find(attr_t::post_ops_t::kind_t::SELECT);
|
||||
if (select_idx != -1) {
|
||||
res->state = SKIPPED;
|
||||
res->reason = skip_reason::case_not_supported;
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void skip_unimplemented_prelu_po(
|
||||
const attr_t &attr, res_t *res, dnnl_primitive_kind_t pkind) {
|
||||
const auto &po = attr.post_ops;
|
||||
|
@ -262,6 +262,7 @@ void skip_unimplemented_data_type(
|
||||
void skip_unimplemented_sum_po(const attr_t &attr, res_t *res,
|
||||
dnnl_primitive_kind_t pkind, dnnl_data_type_t src_dt,
|
||||
dnnl_data_type_t dst_dt = dnnl_data_type_undef);
|
||||
void skip_unimplemented_binary_po(const attr_t &attr, res_t *res);
|
||||
void skip_unimplemented_prelu_po(
|
||||
const attr_t &attr, res_t *res, dnnl_primitive_kind_t pkind);
|
||||
void skip_invalid_inplace(res_t *res, dnnl_data_type_t sdt,
|
||||
|
@ -287,6 +287,7 @@ int fill_data(const prb_t *prb, data_kind_t kind, dnn_mem_t &mem_dt,
|
||||
void skip_unimplemented_prb(const prb_t *prb, res_t *res) {
|
||||
skip_unimplemented_data_type({prb->dt}, prb->dir, res);
|
||||
skip_unimplemented_sum_po(prb->attr, res, dnnl_eltwise, prb->dt);
|
||||
skip_unimplemented_binary_po(prb->attr, res);
|
||||
skip_unimplemented_prelu_po(prb->attr, res, dnnl_eltwise);
|
||||
|
||||
if (is_gpu() && (prb->dt == dnnl_f8_e5m2 || prb->dt == dnnl_f8_e4m3)
|
||||
|
@ -246,6 +246,7 @@ void skip_unimplemented_prb(const prb_t *prb, res_t *res) {
|
||||
prb->dir, res);
|
||||
skip_unimplemented_sum_po(prb->attr, res, dnnl_inner_product,
|
||||
prb->get_dt(SRC), prb->get_dt(DST));
|
||||
skip_unimplemented_binary_po(prb->attr, res);
|
||||
skip_unimplemented_prelu_po(prb->attr, res, dnnl_inner_product);
|
||||
|
||||
if (is_cpu()) {
|
||||
|
@ -455,6 +455,7 @@ void skip_unimplemented_prb(const prb_t *prb, res_t *res) {
|
||||
{prb->dt[0], prb->dt[1], prb->ss_dt}, prb->dir, res);
|
||||
skip_unimplemented_sum_po(
|
||||
prb->attr, res, dnnl_layer_normalization, prb->dt[0]);
|
||||
skip_unimplemented_binary_po(prb->attr, res);
|
||||
skip_unimplemented_prelu_po(prb->attr, res, dnnl_layer_normalization);
|
||||
|
||||
if (is_gpu() && prb->attr.post_ops.len() != 0) {
|
||||
|
@ -118,6 +118,7 @@ dnnl_status_t init_pd(init_pd_args_t<prb_t> &init_pd_args) {
|
||||
void skip_unimplemented_prb(const prb_t *prb, res_t *res) {
|
||||
skip_unimplemented_data_type({prb->dt}, prb->dir, res);
|
||||
skip_unimplemented_sum_po(prb->attr, res, dnnl_lrn, prb->dt);
|
||||
skip_unimplemented_binary_po(prb->attr, res);
|
||||
skip_unimplemented_prelu_po(prb->attr, res, dnnl_lrn);
|
||||
}
|
||||
|
||||
|
@ -485,6 +485,7 @@ void skip_unimplemented_prb(const prb_t *prb, res_t *res) {
|
||||
prb->dir, res);
|
||||
skip_unimplemented_sum_po(
|
||||
prb->attr, res, dnnl_matmul, prb->src_dt(), prb->dst_dt());
|
||||
skip_unimplemented_binary_po(prb->attr, res);
|
||||
skip_unimplemented_prelu_po(prb->attr, res, dnnl_matmul);
|
||||
|
||||
if ((is_nvidia_gpu() || is_amd_gpu()) && !prb->sparse_options.is_def()) {
|
||||
|
@ -144,6 +144,7 @@ dnnl_status_t init_pd(init_pd_args_t<prb_t> &init_pd_args) {
|
||||
void skip_unimplemented_prb(const prb_t *prb, res_t *res) {
|
||||
skip_unimplemented_data_type({prb->src_dt(), prb->dst_dt()}, prb->dir, res);
|
||||
skip_unimplemented_sum_po(prb->attr, res, dnnl_pooling, prb->src_dt());
|
||||
skip_unimplemented_binary_po(prb->attr, res);
|
||||
skip_unimplemented_prelu_po(prb->attr, res, dnnl_pooling);
|
||||
|
||||
if (is_cpu() && prb->src_dt() != prb->dst_dt()) {
|
||||
|
@ -142,6 +142,7 @@ dnnl_status_t init_pd(init_pd_args_t<prb_t> &init_pd_args) {
|
||||
void skip_unimplemented_prb(const prb_t *prb, res_t *res) {
|
||||
skip_unimplemented_data_type(prb->sdt, FWD_D, res);
|
||||
skip_unimplemented_sum_po(prb->attr, res, dnnl_prelu, prb->sdt[0]);
|
||||
skip_unimplemented_binary_po(prb->attr, res);
|
||||
skip_unimplemented_prelu_po(prb->attr, res, dnnl_prelu);
|
||||
}
|
||||
|
||||
|
@ -204,6 +204,7 @@ int fill_dst(const prb_t *prb, dnn_mem_t &mem_dt, dnn_mem_t &mem_fp) {
|
||||
void skip_unimplemented_prb(const prb_t *prb, res_t *res) {
|
||||
skip_unimplemented_data_type({prb->sdt, prb->ddt}, prb->dir, res);
|
||||
skip_unimplemented_sum_po(prb->attr, res, dnnl_reduction, prb->sdt);
|
||||
skip_unimplemented_binary_po(prb->attr, res);
|
||||
skip_unimplemented_prelu_po(prb->attr, res, dnnl_reduction);
|
||||
}
|
||||
|
||||
|
@ -208,6 +208,7 @@ void skip_unimplemented_prb(const prb_t *prb, res_t *res) {
|
||||
const auto ddt = prb->ddt;
|
||||
skip_unimplemented_data_type({sdt, ddt}, prb->dir, res);
|
||||
skip_unimplemented_sum_po(prb->attr, res, dnnl_reorder, sdt);
|
||||
skip_unimplemented_binary_po(prb->attr, res);
|
||||
skip_unimplemented_prelu_po(prb->attr, res, dnnl_reorder);
|
||||
|
||||
const bool s32_src_ok = IMPLICATION(sdt == dnnl_s32,
|
||||
|
@ -111,6 +111,7 @@ dnnl_status_t init_pd(init_pd_args_t<prb_t> &init_pd_args) {
|
||||
void skip_unimplemented_prb(const prb_t *prb, res_t *res) {
|
||||
skip_unimplemented_data_type({prb->sdt, prb->ddt}, prb->dir, res);
|
||||
skip_unimplemented_sum_po(prb->attr, res, dnnl_resampling, prb->sdt);
|
||||
skip_unimplemented_binary_po(prb->attr, res);
|
||||
skip_unimplemented_prelu_po(prb->attr, res, dnnl_resampling);
|
||||
}
|
||||
|
||||
|
@ -778,6 +778,7 @@ void skip_unimplemented_prb(const prb_t *prb_, res_t *res) {
|
||||
dir_t dir = str2dir(prop2str(prb.prop));
|
||||
skip_unimplemented_data_type({prb.cfg[SRC_LAYER].dt}, dir, res);
|
||||
skip_unimplemented_sum_po(prb.attr, res, dnnl_rnn, prb.cfg[SRC_LAYER].dt);
|
||||
skip_unimplemented_binary_po(prb.attr, res);
|
||||
skip_unimplemented_prelu_po(prb.attr, res, dnnl_rnn);
|
||||
|
||||
if (is_cpu()) {
|
||||
|
@ -102,6 +102,7 @@ dnnl_status_t init_pd(init_pd_args_t<prb_t> &init_pd_args) {
|
||||
void skip_unimplemented_prb(const prb_t *prb, res_t *res) {
|
||||
skip_unimplemented_data_type({prb->dt}, prb->dir, res);
|
||||
skip_unimplemented_sum_po(prb->attr, res, dnnl_shuffle, prb->dt);
|
||||
skip_unimplemented_binary_po(prb->attr, res);
|
||||
skip_unimplemented_prelu_po(prb->attr, res, dnnl_shuffle);
|
||||
}
|
||||
|
||||
|
@ -222,6 +222,7 @@ int fill_data_bwd(data_kind_t data_kind, const prb_t *prb, dnn_mem_t &mem_dt,
|
||||
void skip_unimplemented_prb(const prb_t *prb, res_t *res) {
|
||||
skip_unimplemented_data_type({prb->sdt, prb->ddt}, prb->dir, res);
|
||||
skip_unimplemented_sum_po(prb->attr, res, dnnl_softmax, prb->sdt);
|
||||
skip_unimplemented_binary_po(prb->attr, res);
|
||||
skip_unimplemented_prelu_po(prb->attr, res, dnnl_softmax);
|
||||
|
||||
if (prb->attr.post_ops.find(attr_t::post_ops_t::kind_t::SUM) != -1) {
|
||||
|
@ -99,6 +99,7 @@ void skip_unimplemented_prb(const prb_t *prb, res_t *res) {
|
||||
dts.push_back(prb->ddt);
|
||||
skip_unimplemented_data_type(dts, prb->dir, res);
|
||||
skip_unimplemented_sum_po(prb->attr, res, dnnl_sum, prb->sdt[0]);
|
||||
skip_unimplemented_binary_po(prb->attr, res);
|
||||
skip_unimplemented_prelu_po(prb->attr, res, dnnl_sum);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user