Skip to content

Commit

Permalink
add check
Browse files Browse the repository at this point in the history
Signed-off-by: Jimmy Zhang <jiemingz@nvidia.com>
  • Loading branch information
jiemingz committed Sep 9, 2024
1 parent 9ba156c commit ce5e712
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2115,6 +2115,12 @@ def build_transformer_config(self) -> TransformerConfig:
else:
raise ValueError(f"fp8 enabled but fp8_format (fp8_e4m3 | fp8_hybrid) is not set.")

if self.cfg.get('enable_cuda_graph', False):
assert HAVE_TE, "Transformer Engine is required for cudagraphs."
assert self.cfg.get('use_te_rng_tracker', False), \
"Transformer engine's RNG tracker is required for cudagraphs, this can be enabled with \
'use_te_rng_tracker=True'."

# any configs that are not in the nemo model config will be added here
model_specific_configs = {
'layernorm_zero_centered_gamma': layernorm_zero_centered_gamma,
Expand Down

0 comments on commit ce5e712

Please sign in to comment.