Skip to content
Merged
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
10 changes: 5 additions & 5 deletions deepspeed/pt/deepspeed_checkpointing.py
Original file line number Diff line number Diff line change
Expand Up @@ -602,11 +602,11 @@ def reset():
size_offsets = []


def _configure_using_config_file(deepspeed_config):
def _configure_using_config_file(deepspeed_config, mpu=None):
global num_layers, PARTITION_ACTIVATIONS, CONTIGUOUS_CHECKPOINTING, \
PA_TO_CPU, SYNCHRONIZE, PROFILE_TIME

config = DeepSpeedConfig(deepspeed_config).activation_checkpointing_config
config = DeepSpeedConfig(deepspeed_config, mpu=mpu).activation_checkpointing_config
logger.info(config.repr())
PARTITION_ACTIVATIONS = config.partition_activations
CONTIGUOUS_CHECKPOINTING = config.contiguous_memory_optimization
Expand Down Expand Up @@ -684,12 +684,12 @@ def configure(

_configure_defaults()

if deepspeed_config is not None:
_configure_using_config_file(deepspeed_config)

if mpu_ is not None:
mpu = mpu_

if deepspeed_config is not None:
_configure_using_config_file(deepspeed_config, mpu=mpu)

if partition_activations is not None:
PARTITION_ACTIVATIONS = partition_activations

Expand Down