bridge.perf_recipes.gpt_oss.common#

Common helpers for gpt_oss performance recipes.

Module Contents#

Functions#

_enable_ncclep_bf16

Swap the recipe’s flex dispatcher for eager NCCL EP on BF16.

_apply_gpt_oss_120b_full_iter_fp8mx_configs

Apply legacy GPT-OSS 120B FP8-MX full-iteration CUDA graph settings.

_gpt_oss_20b_fp8mx_precision

Return legacy GPT-OSS 20B MXFP8 perf precision settings.

_gpt_oss_20b_nvfp4_precision

Return legacy GPT-OSS 20B NVFP4 perf precision settings.

_apply_gpt_oss_20b_common_configs

Apply legacy GPT-OSS 20B perf defaults.

_apply_gpt_oss_20b_transformer_engine_graph_configs

Apply GPT-OSS 20B Transformer Engine graph capture defaults.

_apply_gpt_oss_20b_local_graph_configs

Apply GPT-OSS 20B local full-iteration graph capture defaults.

API#

bridge.perf_recipes.gpt_oss.common._enable_ncclep_bf16(
cfg: megatron.bridge.training.config.ConfigContainer,
) → None#

Swap the recipe’s flex dispatcher for eager NCCL EP on BF16.

Only the dispatch stack changes. Parallelism, batch sizes, precision, recompute and the CUDA graph mode are left exactly as the parent recipe set them. The calling recipe builder still declares its own cfg.env_vars mapping inline, so the launched environment stays readable next to the recipe instead of being derived here.

bridge.perf_recipes.gpt_oss.common._apply_gpt_oss_120b_full_iter_fp8mx_configs(
cfg: megatron.bridge.training.config.ConfigContainer,
) → None#

Apply legacy GPT-OSS 120B FP8-MX full-iteration CUDA graph settings.

bridge.perf_recipes.gpt_oss.common._gpt_oss_20b_fp8mx_precision()#

Return legacy GPT-OSS 20B MXFP8 perf precision settings.

bridge.perf_recipes.gpt_oss.common._gpt_oss_20b_nvfp4_precision()#

Return legacy GPT-OSS 20B NVFP4 perf precision settings.

bridge.perf_recipes.gpt_oss.common._apply_gpt_oss_20b_common_configs(
cfg: megatron.bridge.training.config.ConfigContainer,
) → None#

Apply legacy GPT-OSS 20B perf defaults.

bridge.perf_recipes.gpt_oss.common._apply_gpt_oss_20b_transformer_engine_graph_configs(
cfg: megatron.bridge.training.config.ConfigContainer,
) → None#

Apply GPT-OSS 20B Transformer Engine graph capture defaults.

bridge.perf_recipes.gpt_oss.common._apply_gpt_oss_20b_local_graph_configs(
cfg: megatron.bridge.training.config.ConfigContainer,
) → None#

Apply GPT-OSS 20B local full-iteration graph capture defaults.