Skip to content

Commit

Permalink
use demangling to get emitter name
Browse files Browse the repository at this point in the history
  • Loading branch information
chenhu-wang committed Nov 1, 2023
1 parent 7432eaa commit 7c947a4
Show file tree
Hide file tree
Showing 10 changed files with 83 additions and 68 deletions.
2 changes: 1 addition & 1 deletion src/common/snippets/include/snippets/lowered/linear_ir.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class Config {
// Minimal advised work amount that should be processed during one call of the executable produced by Subgraph::generate
// Set by a backend, should be large enough to compensate for the kernel call overheads
size_t m_min_kernel_work_amount = 256;
bool m_enable_segfault_detector = false;
bool m_enable_segfault_detector = true;
};

/* The control flow of Snippets is built on Linear Intermediate Representation (Linear IR).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class jit_uni_vcvtneps2bf16 : public jit_emitter {
size_t get_inputs_num() const override { return 1; }

void print_debug_info() const override {
std::cerr << "ERROR is from jit_uni_vcvtneps2bf16." << "\n";
std::cerr << "Emitter type name:" << get_type_name(this) << "\n";
}

private:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ void jit_convert_truncation_emitter::dword2int8(const std::vector<size_t> &in_ve
}

void jit_convert_truncation_emitter::print_debug_info() const {
std::cerr << "ERROR is from jit_convert_truncation_emitter." << "\n";
std::cerr << "Emitter type name:" << get_type_name(this) << "\n";
std::cerr << "input_type:" << input_type << " output_type" << output_type << "\n";
}

Expand Down Expand Up @@ -337,7 +337,7 @@ size_t jit_convert_saturation_emitter::aux_vecs_count() const {
}

void jit_convert_saturation_emitter::print_debug_info() const {
std::cerr << "ERROR is from jit_convert_saturation_emitter." << "\n";
std::cerr << "Emitter type name:" << get_type_name(this) << "\n";
std::cerr << "input_type:" << input_type << " output_type" << output_type << "\n";
}

Expand Down
4 changes: 2 additions & 2 deletions src/plugins/intel_cpu/src/emitters/x64/jit_dnnl_emitters.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ void jit_dnnl_emitter::emit_data() const {
}

void jit_dnnl_emitter::print_debug_info() const {
std::cerr << "ERROR is from jit_dnnl_emitter." << "\n";
std::cerr << "Emitter type name:" << get_type_name(this) << "\n";
std::cerr << "dnnl_alg_kind:" << kind << " alpha" << alpha << " beta" << beta << "\n";
}

Expand All @@ -95,7 +95,7 @@ jit_dnnl_aux_emitter::jit_dnnl_aux_emitter(jit_generator *host, cpu_isa_t host_i
}

void jit_dnnl_aux_emitter::print_debug_info() const {
std::cerr << "ERROR is from jit_dnnl_aux_emitter." << "\n";
std::cerr << "Emitter type name:" << get_type_name(this) << "\n";
std::cerr << "dnnl_alg_kind:" << kind << " alpha" << alpha << " beta" << beta << "\n";
}

Expand Down
24 changes: 12 additions & 12 deletions src/plugins/intel_cpu/src/emitters/x64/jit_dnnl_ext_emitters.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class jit_relu_emitter : public jit_dnnl_emitter {
set_injector();
}
void print_debug_info() const override {
std::cerr << "ERROR is from jit_relu_emitter." << "\n";
std::cerr << "Emitter type name:" << get_type_name(this) << "\n";
std::cerr << "dnnl_alg_kind:" << kind << " alpha" << alpha << " beta" << beta << "\n";
}
};
Expand All @@ -40,7 +40,7 @@ class jit_sigmoid_emitter : public jit_dnnl_emitter {
set_injector();
}
void print_debug_info() const override {
std::cerr << "ERROR is from jit_sigmoid_emitter." << "\n";
std::cerr << "Emitter type name:" << get_type_name(this) << "\n";
std::cerr << "dnnl_alg_kind:" << kind << " alpha" << alpha << " beta" << beta << "\n";
}
};
Expand All @@ -57,7 +57,7 @@ class jit_tanh_emitter : public jit_dnnl_emitter {
set_injector();
}
void print_debug_info() const override {
std::cerr << "ERROR is from jit_tanh_emitter." << "\n";
std::cerr << "Emitter type name:" << get_type_name(this) << "\n";
std::cerr << "dnnl_alg_kind:" << kind << " alpha" << alpha << " beta" << beta << "\n";
}
};
Expand All @@ -74,7 +74,7 @@ class jit_elu_emitter : public jit_dnnl_emitter {
set_injector();
}
void print_debug_info() const override {
std::cerr << "ERROR is from jit_elu_emitter." << "\n";
std::cerr << "Emitter type name:" << get_type_name(this) << "\n";
std::cerr << "dnnl_alg_kind:" << kind << " alpha" << alpha << " beta" << beta << "\n";
}
};
Expand All @@ -91,7 +91,7 @@ class jit_exp_emitter : public jit_dnnl_emitter {
set_injector();
}
void print_debug_info() const override {
std::cerr << "ERROR is from jit_exp_emitter." << "\n";
std::cerr << "Emitter type name:" << get_type_name(this) << "\n";
std::cerr << "dnnl_alg_kind:" << kind << " alpha" << alpha << " beta" << beta << "\n";
}
};
Expand All @@ -108,7 +108,7 @@ class jit_abs_emitter : public jit_dnnl_emitter {
set_injector();
}
void print_debug_info() const override {
std::cerr << "ERROR is from jit_abs_emitter." << "\n";
std::cerr << "Emitter type name:" << get_type_name(this) << "\n";
std::cerr << "dnnl_alg_kind:" << kind << " alpha" << alpha << " beta" << beta << "\n";
}
};
Expand All @@ -126,7 +126,7 @@ class jit_clamp_emitter : public jit_dnnl_emitter {
set_injector();
}
void print_debug_info() const override {
std::cerr << "ERROR is from jit_clamp_emitter." << "\n";
std::cerr << "Emitter type name:" << get_type_name(this) << "\n";
std::cerr << "dnnl_alg_kind:" << kind << " alpha" << alpha << " beta" << beta << "\n";
}
};
Expand All @@ -144,7 +144,7 @@ class jit_swish_emitter : public jit_dnnl_emitter {
set_injector();
}
void print_debug_info() const override {
std::cerr << "ERROR is from jit_swish_emitter." << "\n";
std::cerr << "Emitter type name:" << get_type_name(this) << "\n";
std::cerr << "dnnl_alg_kind:" << kind << " alpha" << alpha << " beta" << beta << "\n";
}
};
Expand All @@ -162,7 +162,7 @@ class jit_hswish_emitter : public jit_dnnl_emitter {
set_injector();
}
void print_debug_info() const override {
std::cerr << "ERROR is from jit_hswish_emitter." << "\n";
std::cerr << "Emitter type name:" << get_type_name(this) << "\n";
std::cerr << "dnnl_alg_kind:" << kind << " alpha" << alpha << " beta" << beta << "\n";
}
};
Expand All @@ -177,7 +177,7 @@ class jit_gelu_v0_emitter : public jit_dnnl_emitter {
set_injector();
}
void print_debug_info() const override {
std::cerr << "ERROR is from jit_gelu_v0_emitter." << "\n";
std::cerr << "Emitter type name:" << get_type_name(this) << "\n";
std::cerr << "dnnl_alg_kind:" << kind << " alpha" << alpha << " beta" << beta << "\n";
}
};
Expand All @@ -199,7 +199,7 @@ class jit_gelu_v7_emitter : public jit_dnnl_emitter {
set_injector();
}
void print_debug_info() const override {
std::cerr << "ERROR is from jit_gelu_v7_emitter." << "\n";
std::cerr << "Emitter type name:" << get_type_name(this) << "\n";
std::cerr << "dnnl_alg_kind:" << kind << " alpha" << alpha << " beta" << beta << "\n";
}
};
Expand All @@ -224,7 +224,7 @@ class jit_round_emitter : public jit_dnnl_emitter {
set_injector();
}
void print_debug_info() const override {
std::cerr << "ERROR is from jit_round_emitter." << "\n";
std::cerr << "Emitter type name:" << get_type_name(this) << "\n";
std::cerr << "dnnl_alg_kind:" << kind << " alpha" << alpha << " beta" << beta << "\n";
}
};
Expand Down
Loading

0 comments on commit 7c947a4

Please sign in to comment.