Skip to content

Commit

Permalink
enable custom device to use silu_fuse_pass
Browse files Browse the repository at this point in the history
  • Loading branch information
engineer1109 committed Jan 5, 2024
1 parent 116c892 commit 8d2441c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion paddle/fluid/framework/ir/silu_fuse_pass.cc
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ namespace ir {
void SiluFusePass::ApplyImpl(ir::Graph* graph) const {
// This pass is used for cutlass, because cutlass can fuse conv + bias + silu
bool cutlass_enable = Get<bool>("use_cutlass");
if (!cutlass_enable) {
bool use_custom_device = Get<bool>("use_custom_device");
if (!cutlass_enable && !use_custom_device) {
return;
}

Expand Down
1 change: 1 addition & 0 deletions paddle/fluid/inference/analysis/ir_pass_manager.cc
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ void IRPassManager::CreatePasses(Argument *argument,
"mixed_white_list",
new std::unordered_set<std::string>(argument->mixed_white_list()));
pass->Set("enable_gpu_mixed", new bool(argument->enable_gpu_mixed()));
pass->Set("use_custom_device", new bool(argument->use_custom_device()));
pass->Set("enable_custom_device_mixed",
new bool(argument->enable_custom_device_mixed()));
pass->Set("mixed_precision_mode",
Expand Down

0 comments on commit 8d2441c

Please sign in to comment.