Skip to content

Commit

Permalink
[CPU][Emitters] Add more informative exception messages in emitters (o…
Browse files Browse the repository at this point in the history
  • Loading branch information
a-sidorova authored Jan 23, 2024
1 parent 3872ccf commit edd5e9a
Show file tree
Hide file tree
Showing 18 changed files with 253 additions and 215 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class jit_uni_vcvtneps2bf16 : public jit_emitter {
} else if (host_isa_ == dnnl::impl::cpu::x64::sse41) {
emit_isa<dnnl::impl::cpu::x64::sse41>(in_vec_idxs, out_vec_idxs);
} else {
OPENVINO_THROW("Unsupported ISA");
OV_CPU_JIT_EMITTER_THROW("Unsupported ISA ", host_isa_);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@ void jit_convert_emitter::validate_types() const {
};

if (!is_supported_type(input_type))
OPENVINO_THROW("Unsupported input type: ", input_type.get_type_name());
OV_CPU_JIT_EMITTER_THROW("Unsupported input type: ", input_type.get_type_name());
if (!is_supported_type(output_type))
OPENVINO_THROW("Unsupported output type: ", output_type.get_type_name());
OV_CPU_JIT_EMITTER_THROW("Unsupported output type: ", output_type.get_type_name());
}

size_t jit_convert_emitter::get_inputs_num() const { return 1; }
Expand All @@ -50,7 +50,7 @@ void jit_convert_emitter::float2bfloat(const std::vector<size_t> &in_vec_idxs, c
Vmm vmm_src = Vmm(in_vec_idxs[0]);
Vmm vmm_dst = Vmm(out_vec_idxs[0]);
if (!uni_vcvtneps2bf16)
OPENVINO_THROW("Converter from float to bf16 isn't initialized!");
OV_CPU_JIT_EMITTER_THROW("Converter from float to bf16 isn't initialized!");

uni_vcvtneps2bf16->emit_code({static_cast<size_t>(vmm_src.getIdx())}, {static_cast<size_t>(vmm_dst.getIdx())});
}
Expand All @@ -75,7 +75,7 @@ void jit_convert_truncation_emitter::emit_impl(const std::vector<size_t> &in_vec
} else if (host_isa_ == cpu::x64::avx512_core) {
emit_isa<cpu::x64::avx512_core>(in_vec_idxs, out_vec_idxs);
} else {
OPENVINO_THROW("Unsupported ISA");
OV_CPU_JIT_EMITTER_THROW("Unsupported ISA ", host_isa_);
}
}

Expand Down Expand Up @@ -120,7 +120,7 @@ void jit_convert_truncation_emitter::emit_isa(const std::vector<size_t> &in_vec_
h->uni_vpmovzxbd(vmm_dst, vmm_src);
break;
default:
OPENVINO_THROW("Unsupported input data type");
OV_CPU_JIT_EMITTER_THROW("Unsupported input data type");
}

switch (output_type) {
Expand Down Expand Up @@ -159,7 +159,7 @@ void jit_convert_truncation_emitter::emit_isa(const std::vector<size_t> &in_vec_
}
break;
default:
OPENVINO_THROW("Unsupported output data type");
OV_CPU_JIT_EMITTER_THROW("Unsupported output data type");
}
}

Expand Down Expand Up @@ -204,7 +204,7 @@ void jit_convert_saturation_emitter::emit_impl(const std::vector<size_t> &in_vec
} else if (host_isa_ == cpu::x64::avx512_core) {
emit_isa<cpu::x64::avx512_core>(in_vec_idxs, out_vec_idxs);
} else {
OPENVINO_THROW("Unsupported ISA");
OV_CPU_JIT_EMITTER_THROW("Unsupported ISA ", host_isa_);
}
}

Expand Down Expand Up @@ -246,7 +246,7 @@ void jit_convert_saturation_emitter::emit_isa(const std::vector<size_t> &in_vec_
h->uni_vpmovzxbd(vmm_dst, vmm_src);
break;
default:
OPENVINO_THROW("Unsupported input data type");
OV_CPU_JIT_EMITTER_THROW("Unsupported input data type");
}

switch (output_type) {
Expand Down Expand Up @@ -286,7 +286,7 @@ void jit_convert_saturation_emitter::emit_isa(const std::vector<size_t> &in_vec_
}
break;
default:
OPENVINO_THROW("Unsupported output data type");
OV_CPU_JIT_EMITTER_THROW("Unsupported output data type");
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ void jit_dnnl_emitter::set_injector() {
eltwise_injector_avx512_core = std::make_shared<jit_uni_eltwise_injector_f32<cpu::x64::avx512_core>>(
h, kind, alpha, beta, 1.f);
} else {
OPENVINO_THROW("Unsupported ISA");
OV_CPU_JIT_EMITTER_THROW("Unsupported ISA ", host_isa_);
}
}

Expand All @@ -67,7 +67,7 @@ void jit_dnnl_emitter::emit_code(const std::vector<size_t> &in_vec_idxs, const s
h->uni_vmovups(Zmm(out_vec_idxs[0]), Zmm(in_vec_idxs[0]));
eltwise_injector_avx512_core->compute_vector(out_vec_idxs[0]);
} else {
OPENVINO_THROW("Unsupported ISA");
OV_CPU_JIT_EMITTER_THROW("Unsupported ISA ", host_isa_);
}
}

Expand All @@ -79,7 +79,7 @@ void jit_dnnl_emitter::emit_data() const {
} else if (host_isa_ == cpu::x64::avx512_core) {
eltwise_injector_avx512_core->prepare_table();
} else {
OPENVINO_THROW("Unsupported ISA");
OV_CPU_JIT_EMITTER_THROW("Unsupported ISA ", host_isa_);
}
}

Expand Down
Loading

0 comments on commit edd5e9a

Please sign in to comment.