-
Notifications
You must be signed in to change notification settings - Fork 270
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
skip fp8 CI on non-H100 GPUs #465
Changes from 30 commits
8d00b73
68d9f61
4cd5f74
05a4a06
f48a82e
14aabfb
b88aee9
2b4e0c2
ad63aba
71d4dc6
23536e9
bdb0fd0
ef0e843
c294f6a
b58b07b
7df10ae
f674012
7dd788c
faefe27
7aad066
5040c31
cee653e
e164285
22c71ea
595f83d
68e9f19
9de67ff
367507f
de3de0e
1ed8dab
2be380d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,7 +27,7 @@ | |
from torchtitan.checkpoint import CheckpointManager | ||
from torchtitan.config_manager import JobConfig | ||
from torchtitan.datasets import build_hf_data_loader, create_tokenizer | ||
from torchtitan.float8_linear import build_fp8_linear | ||
from torchtitan.float8_linear import build_fp8_linear, SM90OrLater | ||
from torchtitan.logging_utils import init_logger, logger | ||
from torchtitan.lr_scheduling import get_lr_schedulers | ||
from torchtitan.metrics import build_gpu_memory_monitor, build_metric_logger | ||
|
@@ -216,7 +216,7 @@ def loss_fn(pred, labels): | |
whole_model = model_cls.from_model_args(model_config) | ||
|
||
# apply fp8 linear module swap | ||
if job_config.training.enable_fp8_linear: | ||
if SM90OrLater and job_config.training.enable_fp8_linear: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. hmmm I think we don't need to expose this to train.py? We can try to check this directly in There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. got you. will move it to fp8 api with warnings There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Alternatively you could consider calling it There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. created |
||
build_fp8_linear(whole_model, job_config, parallel_dims.dp_enabled) | ||
|
||
# log model size | ||
|
@@ -399,7 +399,8 @@ def loss_fn(pred, labels): | |
lr_schedulers.step() | ||
|
||
if ( | ||
job_config.training.enable_fp8_linear | ||
SM90OrLater | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. For a quick fix, you can have a return value |
||
and job_config.training.enable_fp8_linear | ||
and job_config.training.enable_fsdp_fp8_all_gather | ||
and job_config.training.precompute_float8_dynamic_scale_for_fsdp | ||
): | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
borrowed from
torch/testing/_internal/common_cuda.py
https://github.com/pytorch/pytorch/blob/main/torch/testing/_internal/common_cuda.py#L32I want to avoid dependency on
torch/testing
, so copied it here