Skip to content
Merged
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
31 changes: 16 additions & 15 deletions mlperf_logging/compliance_checker/training_6.1.0/common.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -144,48 +144,49 @@
REQ: EXACTLY_ONE
CHECK: " v['value'] != '' "

# Optional keys
# Mandatory precision, parallelism, and run-config disclosure (v6.1+)
- KEY:
NAME: lowest_numerical_precision_in_linear
REQ: OPTIONAL
REQ: EXACTLY_ONE
CHECK: " v['value'] in ['fp64', 'fp32', 'tf32', 'fp16', 'fp8', 'nvfp4', 'mxfp4', 'bfloat16', 'Graphcore FLOAT 16.16', 'int8', 'uint8', 'int4', 'uint4'] "

- KEY:
NAME: lowest_numerical_precision_in_attn
REQ: OPTIONAL
REQ: EXACTLY_ONE
CHECK: " v['value'] in ['fp64', 'fp32', 'tf32', 'fp16', 'fp8', 'nvfp4', 'mxfp4', 'bfloat16', 'Graphcore FLOAT 16.16', 'int8', 'uint8', 'int4', 'uint4'] "

- KEY:
NAME: lowest_numerical_precision_in_comm
REQ: OPTIONAL
REQ: EXACTLY_ONE
CHECK: " v['value'] in ['fp64', 'fp32', 'tf32', 'fp16', 'fp8', 'nvfp4', 'mxfp4', 'bfloat16', 'Graphcore FLOAT 16.16', 'int8', 'uint8', 'int4', 'uint4'] "

- KEY:
NAME: tensor_parallelism
REQ: OPTIONAL
CHECK: " is_integer(v['value']) "
REQ: EXACTLY_ONE
CHECK: " is_integer(v['value']) and v['value'] >= 1 "

- KEY:
NAME: pipeline_parallelism
REQ: OPTIONAL
CHECK: " is_integer(v['value']) "
REQ: EXACTLY_ONE
CHECK: " is_integer(v['value']) and v['value'] >= 1 "

- KEY:
NAME: context_parallelism
REQ: OPTIONAL
CHECK: " is_integer(v['value']) "
REQ: EXACTLY_ONE
CHECK: " is_integer(v['value']) and v['value'] >= 1 "

- KEY:
NAME: expert_parallelism
REQ: OPTIONAL
CHECK: " is_integer(v['value']) "
REQ: EXACTLY_ONE
CHECK: " is_integer(v['value']) and v['value'] >= 1 "

- KEY:
NAME: micro_batch_size
REQ: OPTIONAL
CHECK: " is_integer(v['value']) "
REQ: EXACTLY_ONE
CHECK: " is_integer(v['value']) and v['value'] >= 1 "

- KEY:
NAME: config_filename
REQ: OPTIONAL
REQ: EXACTLY_ONE
CHECK: " v['value'] != '' "

5 changes: 5 additions & 0 deletions mlperf_logging/mllog/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,11 @@
CONVERTION_EFF = "conversion_eff"
INTERCONNECT_POWER_EST = "interconnect_power_est"

# Precision constants
LOWEST_NUMERICAL_PRECISION_IN_ATTN = "lowest_numerical_precision_in_attn"
LOWEST_NUMERICAL_PRECISION_IN_COMM = "lowest_numerical_precision_in_comm"
LOWEST_NUMERICAL_PRECISION_IN_LINEAR = "lowest_numerical_precision_in_linear"

# Parallelism constants
TENSOR_PARALLELISM = "tensor_parallelism"
PIPELINE_PARALLELISM = "pipeline_parallelism"
Expand Down
11 changes: 8 additions & 3 deletions mlperf_logging/mllog/examples/parallelism.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@


def parallelism_example():
"""Example usage of mllog with parallelism and config keys"""
"""Example usage of mllog with mandatory precision, parallelism, and config keys"""

mllogger = mllog.get_mllogger()

Expand All @@ -33,10 +33,15 @@ def parallelism_example():

mllogger.start(key=mllog.constants.RUN_START)

# Log the model config file used for this run
# Log the model config file used for this run. The name must match the submitted config.
mllogger.event(key=mllog.constants.CONFIG_FILENAME, value="llama31_405b_config.yaml")

# Log parallelism strategy
# Log lowest numerical precision used in linear, attention, and communication
mllogger.event(key=mllog.constants.LOWEST_NUMERICAL_PRECISION_IN_LINEAR, value="fp8")
mllogger.event(key=mllog.constants.LOWEST_NUMERICAL_PRECISION_IN_ATTN, value="bfloat16")
mllogger.event(key=mllog.constants.LOWEST_NUMERICAL_PRECISION_IN_COMM, value="fp8")

# Log parallelism strategy. Unused dimensions must still be logged as 1.
mllogger.event(key=mllog.constants.TENSOR_PARALLELISM, value=8)
mllogger.event(key=mllog.constants.PIPELINE_PARALLELISM, value=4)
mllogger.event(key=mllog.constants.CONTEXT_PARALLELISM, value=2)
Expand Down
Loading