Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion paddle/fluid/framework/ir/graph_pattern_detector.cc
Original file line number Diff line number Diff line change
Expand Up @@ -3289,7 +3289,7 @@ PDNode *patterns::UnsupportedBfloat16::operator()() {
return op;
}

PDNode *patterns::Bloat16Ops::operator()() {
PDNode *patterns::Bfloat16Ops::operator()() {
auto op = pattern->NewNode(op_repr())->assert_is_op();
op->assert_more([&](Node *node) {
return node->Op()->GetAttrIfExists<std::string>("mkldnn_data_type") ==
Expand Down
4 changes: 2 additions & 2 deletions paddle/fluid/framework/ir/graph_pattern_detector.h
Original file line number Diff line number Diff line change
Expand Up @@ -1774,8 +1774,8 @@ struct UnsupportedBfloat16 : public PatternBase {
PATTERN_DECL_NODE(op);
};

struct Bloat16Ops : public PatternBase {
Bloat16Ops(PDPattern* pattern, const std::string& name_scope)
struct Bfloat16Ops : public PatternBase {
Bfloat16Ops(PDPattern* pattern, const std::string& name_scope)
: PatternBase(pattern, name_scope, "many_bfloat16_ops") {}

PDNode* operator()();
Expand Down
6 changes: 3 additions & 3 deletions paddle/fluid/framework/ir/onednn/cpu_bfloat16_pass.cc
Original file line number Diff line number Diff line change
Expand Up @@ -249,11 +249,11 @@ void CPUBFloat16Pass::ApplyImpl(ir::Graph* graph) const {
int dequantize_counter = 0;

GraphPatternDetector gpd;
patterns::Bloat16Ops Bloat16Ops{gpd.mutable_pattern(), "Bloat16Ops"};
Bloat16Ops();
patterns::Bfloat16Ops Bfloat16Ops{gpd.mutable_pattern(), "Bfloat16Ops"};
Bfloat16Ops();
auto handler = [&](const GraphPatternDetector::subgraph_t& subgraph,
Graph* graph) {
GET_IR_NODE_FROM_SUBGRAPH(op, op, Bloat16Ops);
GET_IR_NODE_FROM_SUBGRAPH(op, op, Bfloat16Ops);

Quantizer quantizer(graph, op);
quantizer.AddQuantOps();
Expand Down