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
Original file line number Diff line number Diff line change
Expand Up @@ -1018,7 +1018,7 @@ TEST(CpuQuantizeSquashPass, fc_dequant_more_than_one_op_after_dequant) {

// a->Concat1->b
// b->Concat2
// b->Quatize1(Scale)->c
// b->Quantize1(Scale)->c
// c->Fc1
// c->Fc2
TEST(CpuQuantizeSquashPass, quatize_with_same_scale) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ namespace paddle {
namespace framework {
namespace ir {

// Fusing of self-attetion structure
// Fusing of self-attention structure

class Graph;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ void ShuffleChannelMKLDNNDetectPass::ApplyImpl(ir::Graph* graph) const {
}
}

// shuffle_channel dosen't change shape
// shuffle_channel doesn't change shape
if ((reshape2_shape[0] != -1) && (x_shape1[0] != reshape2_shape[0])) {
return;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ class AllReduceDepsPass : public ir::Pass {
const std::vector<details::OpHandleBase*>& all_reduce_op_handles) const {
// get vars order
std::map<int, std::vector<std::string>> vars =
GetSoredGradientsFromStaleProgram(graph);
GetSortedGradientsFromStaleProgram(graph);
std::stringstream out;
size_t grads_of_stale_program = 0;
out << "Get Order From details::kStaleProgramOpDescs: ";
Expand Down Expand Up @@ -188,7 +188,7 @@ class AllReduceDepsPass : public ir::Pass {
}
}

std::map<int, std::vector<std::string>> GetSoredGradientsFromStaleProgram(
std::map<int, std::vector<std::string>> GetSortedGradientsFromStaleProgram(
const ir::Graph& graph) const {
std::map<int, std::vector<std::string>> vars;
auto ops =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ class BackWardOpDepsPass : public ir::Pass {
AddDep(graph, opt_handles[i - 1], opt_handles[i]);
}

VLOG(10) << "add deps between backward and optimze:";
VLOG(10) << "add deps between backward and optimize:";
AddDep(graph,
backward_op_handles[backward_op_handles.size() - 1],
opt_handles[0]);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,14 @@ namespace paddle {
namespace framework {
namespace ir {

class SSAGraghBuilderWithChecker : public ir::Pass {
class SSAGraphBuilderWithChecker : public ir::Pass {
protected:
void ApplyImpl(ir::Graph *graph) const override {
PADDLE_ENFORCE_EQ(
IsValidGraph(graph),
true,
platform::errors::InvalidArgument(
"In SSAGraghBuilderWithChecker, invalid Graph input."));
"In SSAGraphBuilderWithChecker, invalid Graph input."));
}

bool IsValidGraph(const ir::Graph *graph) const {
Expand Down Expand Up @@ -99,6 +99,6 @@ class SSAGraghBuilderWithChecker : public ir::Pass {
} // namespace paddle

REGISTER_PASS(multi_devices_check_pass,
paddle::framework::ir::SSAGraghBuilderWithChecker)
paddle::framework::ir::SSAGraphBuilderWithChecker)
.RequireGraphAttr(paddle::framework::details::kGraphVars)
.RequireGraphAttr(paddle::framework::details::kGraphDepVars);
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ namespace paddle {
namespace framework {
namespace ir {

class SSAGraghBuilderWithPrinterPass : public ir::Pass {
class SSAGraphBuilderWithPrinterPass : public ir::Pass {
protected:
void ApplyImpl(ir::Graph *graph) const override {
std::unique_ptr<std::ostream> fout(
Expand Down Expand Up @@ -102,5 +102,5 @@ void GraphvizSSAGraphPrinter::Print(const ir::Graph &graph,
} // namespace paddle

REGISTER_PASS(multi_devices_print_pass,
paddle::framework::ir::SSAGraghBuilderWithPrinterPass)
paddle::framework::ir::SSAGraphBuilderWithPrinterPass)
.RequirePassAttr(paddle::framework::ir::kGraphvizPath);
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ After the pass is applied:
scale---- add_layernorm_fusion ---- bias
/ | \ \
/ | \ \
variance | meam z_add
variance | mean z_add
Output
*/
struct AddLayernormXPUPattern : public PatternBase {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -525,7 +525,7 @@ int FusedMultiTransformerInt8XPUQuantPass::FusedMultiTransformerInt8(
id++;
}
};
// genereate input node
// generate input node
attr2weight(
"qkv_in_scale", &(input_max_nodes_vec[0]), &(input_max_names_vec[0]));
attr2weight("out_linear_in_scale",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ class MultiEncoderXPUAdaptiveSeqlenFusePass : public FusePassBase {
/*
adaptive seqlen V1, before:

inpu_var* mask_var*
input_var* mask_var*
| |
| |
embedding_xpu matmul
Expand All @@ -59,7 +59,7 @@ class MultiEncoderXPUAdaptiveSeqlenFusePass : public FusePassBase {

after:

inpu_var* mask_var*
input_var* mask_var*
\ /
\ /
embedding_xpu
Expand All @@ -81,7 +81,7 @@ class MultiEncoderXPUAdaptiveSeqlenFusePass : public FusePassBase {
/*
adaptive seqlen V2, before:

inpu_var* mask_var*
input_var* mask_var*
| |
| |
embedding_xpu not_equal
Expand Down Expand Up @@ -115,7 +115,7 @@ class MultiEncoderXPUAdaptiveSeqlenFusePass : public FusePassBase {

after:

inpu_var* mask_var*
input_var* mask_var*
\ /
\ /
embedding_xpu
Expand Down