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/auto_mixed_precision_pass.cc
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ void DoInsertCastOp(Graph* graph,
desc.SetAttr("in_dtype", in_dtype);
desc.SetAttr("out_dtype", out_dtype);
}
desc.SetAttr("use_mkldnn", false);
desc.SetAttr("use_onednn", false);
desc.SetAttr("with_quant_attr", false);
desc.Flush();
};
Expand Down
4 changes: 2 additions & 2 deletions paddle/fluid/framework/ir/pass_test_util.cc
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,10 @@ OpDesc* CreateOp(ProgramDesc* prog,
const std::string& op_type_name,
const std::vector<InOutVarNamePair>& inputs,
const std::vector<InOutVarNamePair>& outputs,
bool use_mkldnn) {
bool use_onednn) {
auto* op = prog->MutableBlock(0)->AppendOp();
op->SetType(op_type_name);
op->SetAttr("use_mkldnn", use_mkldnn);
op->SetAttr("use_onednn", use_onednn);

for (const auto& input : inputs) {
op->SetInput(input.first, {input.second});
Expand Down
6 changes: 3 additions & 3 deletions paddle/fluid/framework/ir/pass_test_util.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,16 +46,16 @@ using OpTypeCountPair = std::pair<std::string, int>;
/// @param[in] inputs The vector of input pairs: {input_name, variable
/// name}
/// @param[in] outputs The vector of output pairs {output_name, variable}
/// @param[in] use_mkldnn The flag deciding whether or not to set
/// 'use_mkldnn' attribute.
/// @param[in] use_onednn The flag deciding whether or not to set
/// 'use_onednn' attribute.
///
/// @return Returns pointer to the created operator descriptor.
///
OpDesc* CreateOp(ProgramDesc* prog,
const std::string& op_type_name,
const std::vector<InOutVarNamePair>& inputs,
const std::vector<InOutVarNamePair>& outputs,
bool use_mkldnn = true);
bool use_onednn = true);

///
/// @brief Check whether node 'to' is reachable from node 'from' in graph.
Expand Down
8 changes: 4 additions & 4 deletions paddle/fluid/framework/ir/pass_tester_helper.h
Original file line number Diff line number Diff line change
Expand Up @@ -286,22 +286,22 @@ struct Layers {
VarDesc* out = nullptr,
int x_num_col_dims = 1,
int y_num_col_dims = 1,
bool use_mkldnn = false) {
bool use_onednn = false) {
AttributeMap attrs;
attrs["x_num_col_dims"] = x_num_col_dims;
attrs["y_num_col_dims"] = y_num_col_dims;
attrs["use_mkldnn"] = use_mkldnn;
attrs["use_onednn"] = use_onednn;
return binary_op("mul", x, y, out, &attrs);
}

VarDesc* elementwise_add(VarDesc* x,
VarDesc* y,
VarDesc* out = nullptr,
int axis = -1,
bool use_mkldnn = false) {
bool use_onednn = false) {
AttributeMap attrs;
attrs["axis"] = axis;
attrs["use_mkldnn"] = use_mkldnn;
attrs["use_onednn"] = use_onednn;
return binary_op("elementwise_add", x, y, out, &attrs);
}

Expand Down
Loading