Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Fuse Pass Configuration #1035

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from
Open
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
5 changes: 5 additions & 0 deletions ppfleetx/configs/nlp/gpt/auto/pretrain_gpt_base.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,11 @@ Engine:
ckpt_dir:


FusedPasses:
enable: False
fused_passes_list: []


Model:
module: "GPTModuleAuto"
name: "GPT"
Expand Down
5 changes: 5 additions & 0 deletions ppfleetx/utils/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -579,6 +579,11 @@ def process_auto_strategy(config):
tuning.run_after_tuning = tuning_cfg.get('run_after_tuning', True)
tuning.debug = tuning_cfg.get('debug', True)

fused_passes_cfg = config.get('FusedPasses', {})
fused_passes = strategy.fused_passes
fused_passes.enable = fused_passes_cfg.get('enable', False)
fused_passes.fused_passes_list = fused_passes_cfg.get('fused_passes_list', [])

engine_cfg = config['Engine']
engine_cfg['strategy'] = strategy

Expand Down