Skip to content

Commit 0e2b303

Browse files
committed
remove ownership_tokens logic
1 parent badd7c1 commit 0e2b303

4 files changed

Lines changed: 7 additions & 8 deletions

File tree

torchtitan/distributed/dual_pipe_v.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -295,11 +295,11 @@ def run_forward():
295295
arg_mbs[forward_mb_index],
296296
kwarg_mbs[forward_mb_index],
297297
)
298-
# TODO its error prone to have this logic scattered inside and outside the runtime file..
299-
# this goes along with the patch to pytorch: https://github.com/pytorch/pytorch/pull/167002/
300-
key = f"{forward_stage.stage_index}_{forward_mb_index}"
301-
assert key not in schedule.ownership_tokens
302-
schedule.ownership_tokens[key] = output.view_as(output).grad_fn
298+
# # TODO its error prone to have this logic scattered inside and outside the runtime file..
299+
# # this goes along with the patch to pytorch: https://github.com/pytorch/pytorch/pull/167002/
300+
# key = f"{forward_stage.stage_index}_{forward_mb_index}"
301+
# assert key not in schedule.ownership_tokens
302+
# schedule.ownership_tokens[key] = output.view_as(output).grad_fn
303303
schedule._maybe_compute_loss(
304304
forward_stage, output, ctx.target_mbs, forward_mb_index
305305
)

torchtitan/distributed/pipeline_parallel.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111

1212
import torch
1313
import torch.nn as nn
14-
from torch._subclasses.fake_tensor import FakeTensorMode
1514
from torch.distributed.device_mesh import DeviceMesh
1615
from torch.distributed.pipelining import PipelineStage
1716
from torch.distributed.pipelining.schedules import (

torchtitan/models/deepseek_v3/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@
9797
qk_rope_head_dim=64,
9898
v_head_dim=128,
9999
mscale=0.70,
100-
attn_type="flex",
100+
# attn_type="flex",
101101
# attn_mask_type="block_causal",
102102
),
103103
"236B": DeepSeekV3ModelArgs(

torchtitan/models/deepseek_v3/train_configs/debug_model.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ export_dtype = "float32"
6565
async_mode = "disabled" # ["disabled", "async", "async_with_pinned_mem"]
6666

6767
[activation_checkpoint]
68-
mode = "none" # ["none", "selective", "full"]
68+
mode = "selective" # ["none", "selective", "full"]
6969
selective_ac_option = 'op' # 'int' = ac every positive int layer or 'op', ac based on ops policy
7070

7171
[compile]

0 commit comments

Comments
 (0)