Skip to content

Commit e4ea639

Browse files
committed
[Fix] Refactors capturing flag initialization to fix error in eager mode
Signed-off-by: Yizhou Liu <[email protected]>
1 parent 344fa6d commit e4ea639

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

vllm_ascend/ascend_forward_context.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,10 @@ def set_ascend_forward_context(
5555

5656
forward_context.in_profile_run = in_profile_run
5757

58+
# NOTE: This cannot be set using set_forward_context
59+
# due to multiple warmups before actual capturing
60+
forward_context.capturing = False
61+
5862
dp_world_size = get_dp_group().world_size
5963
if dp_world_size > 1 and forward_context.dp_metadata is not None:
6064
forward_context.max_tokens_across_dp = forward_context.dp_metadata.max_tokens_across_dp_cpu.item(

vllm_ascend/compilation/piecewise_backend.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,6 @@ def update_attn_params(self, graph_params, forward_context, runtime_shape):
157157
def __call__(self, *args) -> Any:
158158
forward_context = get_forward_context()
159159
graph_params = get_graph_params()
160-
forward_context.capturing = False
161160

162161
if not self.first_run_finished:
163162
self.first_run_finished = True

0 commit comments

Comments
 (0)