Skip to content
Draft
Show file tree
Hide file tree
Changes from 38 commits
Commits
Show all changes
60 commits
Select commit Hold shift + click to select a range
f7eb5b2
fix: advance vLLM main compatibility to 69d27bf8
zhao-stack Nov 4, 2026
464a311
fix: narrow main graph compatibility parameter types
zhao-stack Nov 4, 2026
05a9370
test: annotate main graph contract fixtures
zhao-stack Nov 4, 2026
076aef5
fix: align copied schedulers and CPU contracts with main
zhao-stack Nov 4, 2026
b042385
style: format legacy DSpark architecture guard
zhao-stack Nov 4, 2026
c72375d
test: follow native pipeline decode cadence config
zhao-stack Nov 4, 2026
ff9145e
fix: resolve main memory budgets and stacked linear state
zhao-stack Nov 4, 2026
0eb09bc
fix: accept main masked vocabulary resampling hint
zhao-stack Nov 4, 2026
ae86c73
fix: regenerate split graph sizes for Ascend defaults
zhao-stack Nov 4, 2026
e72af7b
fix: complete main graph shape adaptations for NPU drafting
zhao-stack Nov 4, 2026
5867569
fix: count standalone draft correction token once on main
zhao-stack Nov 4, 2026
f0118ca
test: initialize standalone speculator model config
zhao-stack Nov 4, 2026
4ebb361
fix: preserve split decode grids during TP graph alignment
zhao-stack Nov 4, 2026
dfb72f2
fix: size MC2 capacity from target capture grids
zhao-stack Nov 4, 2026
20456b0
fix: keep unsupported draft MoE shapes out of full graphs
zhao-stack Nov 4, 2026
fa399fb
docs: assign main pin release note to PR 21005
zhao-stack Nov 5, 2026
eada3f0
fix: advance main pin to ba15685a and adapt lifecycle APIs
zhao-stack Nov 6, 2026
a80e9fb
test: type main pin cache binding fixtures explicitly
zhao-stack Nov 6, 2026
dea42ca
test: parse version-compatible Mamba guard fixture
zhao-stack Nov 6, 2026
dcccd00
fix: preserve resolved merges in CI source snapshots
zhao-stack Nov 6, 2026
888ff63
test: align CPU fixtures with pinned vLLM contracts
zhao-stack Nov 6, 2026
82a0898
style: format rebase conflict resolutions
zhao-stack Nov 9, 2026
84f3f73
fix: pass main Mamba layer bindings during MRv2 context recreation
zhao-stack Nov 9, 2026
0a9f42b
fix: preserve main Mamba precopy temporal bias contract
zhao-stack Nov 9, 2026
a4a538a
test: type the dynamic Mamba precopy regression namespace
zhao-stack Nov 9, 2026
14a82c9
fix: initialize MRv2 ReplaySSM block-copy trackers
zhao-stack Nov 9, 2026
e5a219b
test: type the optional ReplaySSM tracker context
zhao-stack Nov 9, 2026
ef9a4a2
fix: initialize native Gemma4 multimodal encoder contracts
zhao-stack Nov 9, 2026
98be662
refactor: mark DyntraLB legacy prefix contract by vLLM version
zhao-stack Nov 9, 2026
ea96a96
test: follow official Mamba kernel relocation after rebase
zhao-stack Nov 9, 2026
41d7f3f
refactor: make vLLM release and main compatibility branches explicit
zhao-stack Nov 9, 2026
2486dc8
test: align compatibility fixtures with release and main APIs
zhao-stack Nov 9, 2026
4e21222
chore: merge official main for embedding fixture compatibility
zhao-stack Nov 9, 2026
6e28fdc
test: initialize target embedding capabilities for pinned main
zhao-stack Nov 9, 2026
2a735f2
chore: sync official Ascend main for Nov 10 pin upgrade
zhao-stack Nov 10, 2026
ae9c9ba
fix: advance verified vLLM main contracts to feb4cb01
zhao-stack Nov 10, 2026
86e5dc6
test: cover Nov 10 main API boundaries and preserve CPU fixtures
zhao-stack Nov 10, 2026
278af66
test: retain Score manager assertions after native metadata removal
zhao-stack Nov 10, 2026
67b2013
fix: reject async KV queue limits on copied schedulers
zhao-stack Nov 10, 2026
6f08ec2
fix: remove duplicate version import after upstream sync
zhao-stack Nov 10, 2026
9f2e3a3
fix: resolve release-only modules at runtime for main type checks
zhao-stack Nov 10, 2026
d74fc42
test: migrate removed MRv1 helpers and type contract fixtures
zhao-stack Nov 10, 2026
a4bbd84
fix: defer config hash imports until platform initialization completes
zhao-stack Nov 10, 2026
34fc93d
fix: align speculative PP auxiliary relay with native main
zhao-stack Nov 10, 2026
3026b26
fix: align CPU fixtures and remaining speculative main interfaces
zhao-stack Nov 10, 2026
49192bf
Merge official main to resolve Mamba CI trigger conflicts
zhao-stack Nov 10, 2026
0f9dddf
fix: complete Kimi main integration and CI fixture contracts
zhao-stack Nov 10, 2026
23e5824
fix: restore native main hardware decoding contracts
zhao-stack Nov 11, 2026
d7e142c
Merge official fixture fix to restore CI snapshot resolution
zhao-stack Nov 11, 2026
c626750
fix: align native hardware callbacks and sparse decoder contracts
zhao-stack Nov 11, 2026
8cf936a
merge: include official main snapshot 1544fe257 for CI source recovery
zhao-stack Nov 11, 2026
1cca899
merge: preserve resolved history on official CI base 1af7c5fc8
zhao-stack Nov 11, 2026
c8780f1
fix: initialize sparse SFA metadata without dense MLA prefill
zhao-stack Nov 12, 2026
eb37d04
merge: sync approved official CI base 5fca5453
zhao-stack Nov 12, 2026
c42e625
merge: recover main2main CI against official a8a5e2da
zhao-stack Nov 12, 2026
da03ab5
merge: sync official 77cf5826 while retaining example tests
zhao-stack Nov 12, 2026
ce6e0d6
[Test] Complete packed importer fixture after upstream sync
zhao-stack Nov 12, 2026
7cdd7ac
[Misc] Sync official docs base while retaining existing tests
zhao-stack Nov 12, 2026
e905030
fix: align verified main to November 12 and preserve MoE scale modes
zhao-stack Nov 12, 2026
c67e962
[Misc] Sync official base b27049dc while preserving upgrade tests
zhao-stack Nov 12, 2026
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
2 changes: 1 addition & 1 deletion .github/vllm-main-verified.commit
Original file line number Diff line number Diff line change
@@ -1 +1 @@
24420b7a341af37a9bc3186e6fc6062512e0aa58
feb4cb019f445b2b3cd2bd0ba0f258610100910e
5 changes: 4 additions & 1 deletion .github/workflows/_build_csrc_cache.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,10 @@ jobs:
fi
git fetch "$BASE_REMOTE" "$BASE_REF"
git cat-file -e "${BASE_SHA}^{commit}"
git rebase "$BASE_SHA"
# Preserve resolved merges when this exact base is already included.
if ! git merge-base --is-ancestor "$BASE_SHA" HEAD; then
git rebase "$BASE_SHA"
fi

- name: Update submodules
run: |
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/_ensure_csrc_cache.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,10 @@ jobs:
fi
git fetch "$BASE_REMOTE" "$BASE_REF"
git cat-file -e "${BASE_SHA}^{commit}"
git rebase "$BASE_SHA"
# Preserve resolved merges when this exact base is already included.
if ! git merge-base --is-ancestor "$BASE_SHA" HEAD; then
git rebase "$BASE_SHA"
fi

- name: Calculate csrc hash
id: hash
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/_selected_tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,10 @@ jobs:
BASE_SHA=$(git rev-parse FETCH_HEAD)
fi
git cat-file -e "${BASE_SHA}^{commit}"
git rebase "$BASE_SHA"
# Preserve resolved merges when this exact base is already included.
if ! git merge-base --is-ancestor "$BASE_SHA" HEAD; then
git rebase "$BASE_SHA"
fi
git submodule sync --recursive
git submodule update --init --recursive

Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/_selected_tests_upstream.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,10 @@ jobs:
BASE_SHA=$(git rev-parse FETCH_HEAD)
fi
git cat-file -e "${BASE_SHA}^{commit}"
git rebase "$BASE_SHA"
# Preserve resolved merges when this exact base is already included.
if ! git merge-base --is-ancestor "$BASE_SHA" HEAD; then
git rebase "$BASE_SHA"
fi
git submodule sync --recursive
git submodule update --init --recursive

Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/pr_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -531,7 +531,10 @@ jobs:
exit 1
fi

git rebase "$BASE_SHA"
# Preserve resolved merges when this exact base is already included.
if ! git merge-base --is-ancestor "$BASE_SHA" HEAD; then
git rebase "$BASE_SHA"
fi
echo "base_sha=$BASE_SHA" >> "$GITHUB_OUTPUT"

- name: Validate test coverage config
Expand Down
6 changes: 6 additions & 0 deletions release_notes/fragments/21005.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
pr: 21005
entries:
- category: dependency
text: Advanced the verified vLLM main baseline to ba15685a with matching graph, speculative decoding, weight-loading, and KV offload compatibility while retaining v0.33.0 release support.
- category: bugfix
text: Fixed Gemma4 multimodal initialization with the verified main baseline, preserving configured encoder parallelism and input normalization.
4 changes: 4 additions & 0 deletions release_notes/fragments/21469.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
pr: 21469
entries:
- category: dependency
text: Aligned the verified vLLM main dependency to feb4cb01 (November 10, 2026), with compatibility updates for configuration hashing and Model Runner V2 interfaces. The release dependency remains v0.33.0.
6 changes: 4 additions & 2 deletions tests/ut/core/test_dyntra_lb_scheduler.py
Original file line number Diff line number Diff line change
Expand Up @@ -922,8 +922,10 @@ def test_dyntra_lb_async_v2_sets_pp_decode_cadence():
scheduler_output = scheduler.schedule()

assert request.request_id in scheduler_output.num_scheduled_tokens
assert scheduler.pp_size == 2
assert request.next_decode_eligible_step == scheduler.current_step + scheduler.pp_size
assert scheduler.parallel_config.pipeline_parallel_size == 2
assert (
request.next_decode_eligible_step == scheduler.current_step + scheduler.parallel_config.pipeline_parallel_size
)


def test_dyntra_lb_sync_skips_until_previous_output_arrives():
Expand Down
7 changes: 4 additions & 3 deletions tests/ut/core/test_profiling_chunk.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
from vllm_ascend.core.short_request_first_scheduler import (
ShortRequestFirstRequestQueue,
)
from vllm_ascend.utils import vllm_version_is

MODEL = "Qwen/Qwen3-0.6B"
BLOCK_SIZE = 16
Expand Down Expand Up @@ -67,7 +68,7 @@ def make_output(scheduler):
sampled_token_ids = [[1000]] * len(scheduler.running)
return ModelRunnerOutput(
req_ids=req_ids,
req_id_to_index=req_id_to_index,
**({"req_id_to_index": req_id_to_index} if vllm_version_is("0.33.0") else {}),
sampled_token_ids=sampled_token_ids,
logprobs=None,
prompt_logprobs_dict={},
Expand Down Expand Up @@ -982,10 +983,10 @@ def test_v2_pp_sets_next_decode_eligible_step(self):
first_output = scheduler.schedule()

self.assertIn(request.request_id, first_output.num_scheduled_tokens)
self.assertEqual(scheduler.pp_size, scheduler.parallel_config.pipeline_parallel_size)
self.assertEqual(scheduler.parallel_config.pipeline_parallel_size, 2)
self.assertEqual(
request.next_decode_eligible_step,
scheduler.current_step + scheduler.pp_size,
scheduler.current_step + scheduler.parallel_config.pipeline_parallel_size,
)

# The next step is inside the PP cadence window: the request is skipped.
Expand Down
18 changes: 17 additions & 1 deletion tests/ut/core/test_score_encoder_cache_scheduler.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@

from tests.ut.kv_offload.utils import create_model_runner_output, create_scheduler, create_vllm_config
from vllm_ascend.ec_manager.score_ec_manager import ScoreEncoderCacheManager
from vllm_ascend.utils import vllm_version_is


def _make_scheduler(npu_slots: int = 8) -> Scheduler:
Expand All @@ -27,6 +28,18 @@ def _make_scheduler(npu_slots: int = 8) -> Scheduler:
config.ec_manager_config.manager_config = {"cpu_cache_slots": 8}
scheduler.encoder_cache_manager = ScoreEncoderCacheManager(npu_slots, config)
scheduler.max_num_encoder_input_tokens = 32
if not vllm_version_is("0.33.0"):
# Main removed MRv1's metadata transport. These CPU tests exercise the
# manager's scheduling decisions, so collect its real payload at the
# same boundary without claiming native MRv2 worker transport coverage.
native_schedule = scheduler.schedule

def schedule_with_manager_metadata():
output = native_schedule()
output.ec_manager_metadata = scheduler.encoder_cache_manager.get_manager_metadata()
return output

scheduler.schedule = schedule_with_manager_metadata
return scheduler


Expand Down Expand Up @@ -87,7 +100,10 @@ def _capacity(manager: ScoreEncoderCacheManager) -> tuple[int, int, int, int]:
def _assert_error_and_finish(scheduler: Scheduler, request: Request, scheduler_output) -> None:
assert scheduler_output.total_num_scheduled_tokens == 0
assert not scheduler_output.scheduled_encoder_inputs
outputs = scheduler.update_from_output(scheduler_output, ModelRunnerOutput(req_ids=[], req_id_to_index={}))
outputs = scheduler.update_from_output(
scheduler_output,
ModelRunnerOutput(req_ids=[], **({"req_id_to_index": {}} if vllm_version_is("0.33.0") else {})),
)
assert request.status == RequestStatus.FINISHED_ERROR
assert request.request_id not in scheduler.requests
assert request.request_id not in scheduler.encoder_cache_manager.request_cached_ids
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ def test_basic_lifecycle():
assert len(block_pool.cached_block_hash_to_block) == 0
blocks = scheduler.kv_cache_manager.coordinator.single_type_managers[0].req_to_blocks[request_id]
for block in blocks:
assert block._block_hash is None
assert block.block_hash is None

# (1b): forward()
model_runner_output = EMPTY_MODEL_RUNNER_OUTPUT
Expand Down Expand Up @@ -104,7 +104,7 @@ def test_basic_lifecycle():
blocks = scheduler.kv_cache_manager.coordinator.single_type_managers[0].req_to_blocks[request_id]
for block in blocks:
assert block.ref_cnt == 1
num_hashed_blocks += 1 if block._block_hash is not None else 0
num_hashed_blocks += 1 if block.block_hash is not None else 0
assert num_hashed_blocks == NUM_EXTERNAL_FULL_BLOCKS

scheduled_req = scheduler_output.scheduled_new_reqs[0]
Expand Down
25 changes: 20 additions & 5 deletions tests/ut/distributed/weight_transfer/test_hccl_engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,10 @@
def _npu_context():
with (
patch.object(
torch, "npu", SimpleNamespace(device=lambda _: nullcontext(), current_stream=MagicMock()), create=True
torch,
"npu",
SimpleNamespace(device=lambda _: nullcontext(), current_stream=MagicMock(), empty_cache=MagicMock()),
create=True,
),
patch("torch.accelerator.current_device_index", return_value=0),
):
Expand All @@ -43,13 +46,18 @@ def _make_engine():
engine.model_config = MagicMock()
engine.device = torch.device("cpu")
engine._last_hccl_update_info = {}
# Match the upstream constructor's disabled load-plan state.
engine._plan_metadata = None
engine._plan_manifest = None
engine._plan = None
return engine


def test_start_weight_update_initializes_layerwise_reload():
engine = _make_engine()

with patch("vllm.model_executor.model_loader.reload.initialize_layerwise_reload") as initialize:
start = "initialize_layerwise_reload" if vllm_version_is("0.33.0") else "start_reload"
with patch(f"vllm.model_executor.model_loader.reload.{start}") as initialize:
engine.start_weight_update()

initialize.assert_called_once_with(engine.model)
Expand All @@ -58,10 +66,14 @@ def test_start_weight_update_initializes_layerwise_reload():
def test_finish_weight_update_finalizes_layerwise_reload():
engine = _make_engine()

with patch("vllm.model_executor.model_loader.reload.finalize_layerwise_reload") as finalize:
finish = "finalize_layerwise_reload" if vllm_version_is("0.33.0") else "finish_reload"
with patch(f"vllm.model_executor.model_loader.reload.{finish}") as finalize:
engine.finish_weight_update()

finalize.assert_called_once_with(engine.model, engine.model_config)
args: tuple[Any, ...] = (engine.model, engine.model_config)
if not vllm_version_is("0.33.0"):
args += (engine.device,)
finalize.assert_called_once_with(*args)


def test_shutdown_closes_session_once():
Expand Down Expand Up @@ -109,7 +121,10 @@ def test_init_info_preserves_upstream_payload_contract():

assert isinstance(init_info, NCCLWeightTransferInitInfo)
assert HCCLWeightTransferEngine.init_info_cls is HCCLWeightTransferInitInfo
assert worker_init_payload(init_info) == dict(master_address="host", master_port=1234, rank_offset=1, world_size=2)
expected = dict(master_address="host", master_port=1234, rank_offset=1, world_size=2)
if not vllm_version_is("0.33.0"):
expected["use_load_plan"] = False
assert worker_init_payload(init_info) == expected
restored = HCCLWeightTransferInitInfo(**worker_init_payload(init_info))
assert restored == init_info
assert restored.packed is None
Expand Down
9 changes: 8 additions & 1 deletion tests/ut/distributed/weight_transfer/test_npu_ipc_engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@
NPUIPCTrainerWeightTransferEngine,
NPUIPCWeightTransferEngine,
)
from vllm_ascend.utils import vllm_version_is

_MODULE = "vllm_ascend.distributed.weight_transfer.npu_ipc_engine"

Expand All @@ -76,6 +77,8 @@ def _patch_reload_module(*, initialize=None, finalize=None):
fake_mod = types.ModuleType("vllm.model_executor.model_loader.reload")
fake_mod.initialize_layerwise_reload = initialize or MagicMock() # type: ignore[attr-defined]
fake_mod.finalize_layerwise_reload = finalize or MagicMock() # type: ignore[attr-defined]
fake_mod.start_reload = fake_mod.initialize_layerwise_reload # type: ignore[attr-defined]
fake_mod.finish_reload = fake_mod.finalize_layerwise_reload # type: ignore[attr-defined]
return patch.dict(
sys.modules,
{"vllm.model_executor.model_loader.reload": fake_mod},
Expand Down Expand Up @@ -196,13 +199,17 @@ def test_finish_weight_update():
engine = object.__new__(NPUIPCWeightTransferEngine)
engine.model = MagicMock()
engine.model_config = MagicMock()
engine.device = torch.device("cpu")
engine._packed_importer = MagicMock()
mock_finalize = MagicMock()

with _patch_reload_module(finalize=mock_finalize):
engine.finish_weight_update()

mock_finalize.assert_called_once_with(engine.model, engine.model_config)
if vllm_version_is("0.33.0"):
mock_finalize.assert_called_once_with(engine.model, engine.model_config)
else:
mock_finalize.assert_called_once_with(engine.model, engine.model_config, engine.device)
engine._packed_importer.close.assert_called_once_with()


Expand Down
4 changes: 4 additions & 0 deletions tests/ut/kv_offload/test_dspark_transfer_cancellation.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,12 +147,16 @@ def _fixture(names=("cancel",), *, admit=True):
upstream.waiting = Mock()
upstream.skipped_waiting = Mock()
upstream.kv_holding_waiting = Mock()
upstream.async_kv_waiting = Mock()
upstream._aborted_kv_loads = set()
upstream.deferred_waiting = set()
upstream.finished_recving_kv_req_ids = set()
upstream.failed_recving_kv_req_ids = set()
upstream.finished_req_ids = set()
upstream.finished_req_ids_dict = None
upstream._inflight_prefills = set()
upstream._parked_reservations = {}
upstream._parked_reserved_blocks = 0
upstream._kv_fetch_stages = None
upstream.aux_output_connector = None
upstream.ec_connector = None
Expand Down
5 changes: 4 additions & 1 deletion tests/ut/kv_offload/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@
from vllm.v1.request import Request
from vllm.v1.structured_output import StructuredOutputManager

from vllm_ascend.utils import vllm_version_is

EOS_TOKEN_ID = 50256


Expand Down Expand Up @@ -59,6 +61,7 @@ def _fake_opt_model_info() -> SimpleNamespace:
"""Static ModelInfo for OPT fake weights; avoids registry subprocess inspect."""
return SimpleNamespace(
architecture="OPTForCausalLM",
speculator_config_class=None,
is_text_generation_model=True,
is_pooling_model=False,
attn_type="decoder",
Expand Down Expand Up @@ -257,7 +260,7 @@ def create_model_runner_output(

model_runner_output = ModelRunnerOutput(
req_ids=req_ids,
req_id_to_index=req_id_to_index,
**({"req_id_to_index": req_id_to_index} if vllm_version_is("0.33.0") else {}),
sampled_token_ids=sampled_token_ids,
logprobs=None,
prompt_logprobs_dict={},
Expand Down
25 changes: 25 additions & 0 deletions tests/ut/ops/test_linear.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import unittest
from contextlib import contextmanager
from types import SimpleNamespace
from typing import Any
from unittest import mock
from unittest.mock import MagicMock, patch

Expand All @@ -14,13 +15,15 @@
from vllm_ascend.ops.linear import (
AscendDCPGroupColumnParallelLinear,
AscendMergedColumnParallelLinear,
AscendQKVParallelLinear,
AscendReplicatedLinear,
AscendRowParallelLinear,
AscendUnquantizedLinearMethod,
)
from vllm_ascend.ops.linear_op import DCPGroupColumnParallelOp
from vllm_ascend.quantization.method_adapters import AscendLinearMethod
from vllm_ascend.quantization.methods.w8a8.w8a8_dynamic import AscendW8A8DynamicLinearMethod
from vllm_ascend.utils import vllm_version_is


class BaseLinearTest(unittest.TestCase):
Expand Down Expand Up @@ -227,6 +230,28 @@ def test_oproj_tp(self, mock_get_current_vllm_config):


class TestAscendMergedColumnParallelLinear(BaseLinearTest):
@unittest.skipIf(vllm_version_is("0.33.0"), "Stacked shard tracking was added after v0.33")
def test_custom_allocations_preserve_missing_shard_validation(self):
layers: tuple[Any, ...] = (
AscendMergedColumnParallelLinear(input_size=8, output_sizes=[4, 4], bias=False, disable_tp=True),
AscendQKVParallelLinear(hidden_size=8, head_size=2, total_num_heads=2, bias=False, disable_tp=True),
)
for layer in layers:
with self.subTest(layer=type(layer).__name__):
shards = layer.shard_ids
first = shards[0]
size = layer._get_shard_size_mapping(first)
layer.weight_loader(layer.weight, torch.ones(size, 8), first)
self.assertEqual(layer.pop_missing_shards(), [f"weight.{shard}" for shard in shards[1:]])
# A new complete load must start fresh and cover every shard.
for shard in shards:
size = layer._get_shard_size_mapping(shard)
layer.weight_loader(layer.weight, torch.ones(size, 8), shard)
self.assertEqual(layer.pop_missing_shards(), [])
torch.testing.assert_close(layer.weight, torch.ones_like(layer.weight))
with self.assertRaises(ValueError):
layer.validate_shard_id("invalid", layer.weight)

def test_merged_mlp_tp_init(self):
ascend_config._ASCEND_CONFIG = MagicMock()
ascend_config._ASCEND_CONFIG.scheduler_config.recompute_scheduler_enable = False
Expand Down
Loading
Loading