From b42744b126c9f9c9dc7f3777dd5dd75143957b56 Mon Sep 17 00:00:00 2001 From: Zesen Liu Date: Sat, 4 Jul 2026 16:34:20 +0000 Subject: [PATCH 1/7] perf: optimize model loading speed --- atom/model_loader/loader.py | 159 +++++++++++++++++++++++++++++++-- atom/model_ops/moe.py | 173 ++++++++++++++++++++++++++++-------- 2 files changed, 286 insertions(+), 46 deletions(-) diff --git a/atom/model_loader/loader.py b/atom/model_loader/loader.py index 42b7fc1219..24c9bedc47 100644 --- a/atom/model_loader/loader.py +++ b/atom/model_loader/loader.py @@ -6,6 +6,7 @@ import os import logging import re +import threading import time from glob import glob from typing import Generator, Tuple @@ -401,11 +402,124 @@ def extract_expert_target_and_id(name: str) -> Tuple[str, int] | None: # rewritten name doesn't correspond to any model param. (orig, mapped) pairs. dropped_ckpt_keys: list[tuple[str, str]] = [] - with concurrent.futures.ThreadPoolExecutor() as executor: - futures = [] + staging_map: dict = {} # id(param) -> entry, one per in-flight fused param + fallback_pids: set = set() # params that opted out of batching + staging_lock = threading.Lock() + + moe_module_cache: dict = {} + param_batchable: dict = {} + + def _lookup_moe_module(full_param_name: str): + module_path = full_param_name.rsplit(".", 1)[0] + if module_path not in moe_module_cache: + moe_module_cache[module_path] = ( + model.get_submodule(module_path) if "." in full_param_name else None + ) + return moe_module_cache[module_path] + + def _param_is_batchable(param, full_param_name: str) -> bool: + pid = id(param) + if pid not in param_batchable: + moe = _lookup_moe_module(full_param_name) + expected = ( + moe.expected_batched_arrivals(param) + if moe is not None and hasattr(moe, "stage_expert_weight") + else None + ) + param_batchable[pid] = bool(expected) + return param_batchable[pid] + + def _do_flush(param, staging): + if staging.dtype != param.data.dtype: + param.data.view(torch.uint8).copy_(staging) + else: + param.data.copy_(staging) + + def _make_staging(param): + pin = torch.cuda.is_available() + + def _alloc(pinned): + try: + t = torch.empty( + param.data.shape, + dtype=param.data.dtype, + device="cpu", + pin_memory=pinned, + ) + t.zero_() + except NotImplementedError: + t = torch.empty( + param.data.shape, + dtype=torch.uint8, + device="cpu", + pin_memory=pinned, + ) + t.zero_() + return t + + try: + return _alloc(pin) + except RuntimeError as e: + logger.warning("Pinned staging alloc failed (%s); using unpinned.", e) + return _alloc(False) + + def _fallback(param, full_param_name, shard_id, global_expert_id, loaded_weight): + param.weight_loader( + param, loaded_weight, full_param_name, shard_id, global_expert_id + ) + + def _stage_task(param, full_param_name, shard_id, global_expert_id, loaded_weight): + pid = id(param) + with staging_lock: + if pid in fallback_pids: + _fallback( + param, full_param_name, shard_id, global_expert_id, loaded_weight + ) + return + entry = staging_map.get(pid) + if entry is None: + moe = _lookup_moe_module(full_param_name) + entry = staging_map[pid] = { + "staging": _make_staging(param), + "arrived": 0, + "expected": moe.expected_batched_arrivals(param), + "moe": moe, + "param": param, + "lock": threading.Lock(), + } + + moe = entry["moe"] + local_eid = moe._map_global_expert_id_to_local_expert_id(global_expert_id) + if local_eid == -1: + return + + ok = moe.stage_expert_weight( + param=param, + staging=entry["staging"], + loaded_weight=loaded_weight, + local_expert_id=local_eid, + shard_id=shard_id, + weight_name=full_param_name, + ) + if not ok: + with staging_lock: + fallback_pids.add(pid) + staging_map.pop(pid, None) + _fallback(param, full_param_name, shard_id, global_expert_id, loaded_weight) + return + + with entry["lock"]: + entry["arrived"] += 1 + flush_now = entry["arrived"] >= entry["expected"] + if flush_now: + _do_flush(param, entry["staging"]) + with staging_lock: + if staging_map.get(pid) is entry: + del staging_map[pid] + use_threadpool = envs.ATOM_LOADER_USE_THREADPOOL if use_threadpool: - executor = concurrent.futures.ThreadPoolExecutor() + executor = concurrent.futures.ThreadPoolExecutor(max_workers=16) else: executor = None futures = [] @@ -593,13 +707,24 @@ def _submit(fn, *args): if "mtp" in name and not spec_decode: matched = True break - try: - param = model.get_parameter(name) - except AttributeError: + param = params_dict.get(name) + if param is None: # Parameter absent from model (e.g. weight scales for # an unquantized drafter MTP block); skip silently. matched = True break + if _param_is_batchable(param, name): + _submit( + _stage_task, + param, + name, + shard_id, + expert_id, + weight_tensor, + ) + loaded_weights_record.add(prefix + name) + matched = True + break weight_loader = getattr(param, "weight_loader") _submit( weight_loader, @@ -657,9 +782,29 @@ def _submit(fn, *args): ) _submit(weight_loader, param, weight_tensor) loaded_weights_record.add(prefix + name) + + if executor is not None: + # Drain all tasks (surfacing errors) before the safety flush. + for future in concurrent.futures.as_completed(futures): + future.result() + + with staging_lock: + pending = list(staging_map.values()) + staging_map.clear() + if pending: + logger.warning( + "Batched-load safety flush: %d group(s) under-filled, flushing " + "partial data (missing experts left as zeros): %s", + len(pending), + [ + (tuple(e["param"].shape), e["arrived"], e["expected"]) + for e in pending + ], + ) + for entry in pending: + _do_flush(entry["param"], entry["staging"]) finally: if executor is not None: - concurrent.futures.wait(futures) executor.shutdown(wait=True) # Verify every model parameter actually got loaded from the checkpoint. diff --git a/atom/model_ops/moe.py b/atom/model_ops/moe.py index 37b4bc8b9e..c89e7ebf7e 100644 --- a/atom/model_ops/moe.py +++ b/atom/model_ops/moe.py @@ -3093,6 +3093,125 @@ def mxf4_merged_weight_loader( narrow_weight = loaded_weight target_param[: narrow_weight.shape[0]].copy_(narrow_weight) + def _copy_expert_shard( + self, + param: torch.nn.Parameter, + expert_data: torch.Tensor, + shard_id: str, + shard_dim: int, + loaded_weight: torch.Tensor, + weight_name: str, + ) -> bool: + """Copy one expert's shard into ``expert_data``. Shared by + ``weight_loader`` (GPU dest) and ``stage_expert_weight`` (CPU staging + dest) so the two paths can't drift. Returns False for cases the batched + path can't handle (per-Tensor scale, ``weight_shape``); caller falls back. + """ + # scales / zero-points / offset (group + per-channel) + if "scale" in weight_name or "zero" in weight_name or "offset" in weight_name: + quant_method = self.layer_quant_config.quant_type + if quant_method == QuantType.per_Token: + self._load_per_channel_weight_scale( + shard_id=shard_id, + shard_dim=shard_dim, + loaded_weight=loaded_weight, + expert_data=expert_data, + tp_rank=self.tp_rank, + ) + return True + if quant_method in (QuantType.per_1x128, QuantType.per_1x32): + self._load_model_weight_or_group_weight_scale( + shard_id=shard_id, + shard_dim=shard_dim, + loaded_weight=loaded_weight, + expert_data=expert_data, + tp_rank=self.tp_rank, + load_full=getattr(param, "load_full_w2", False), + ) + return True + return False + + # model weights; `weight_shape` shares the substring but isn't batchable + if "weight" in weight_name and "weight_shape" not in weight_name: + self._load_model_weight_or_group_weight_scale( + shard_id=shard_id, + shard_dim=shard_dim, + loaded_weight=loaded_weight, + expert_data=expert_data, + tp_rank=self.tp_rank, + ) + return True + + return False + + def stage_expert_weight( + self, + param: torch.nn.Parameter, + staging: torch.Tensor, + loaded_weight: torch.Tensor, + local_expert_id: int, + shard_id: str, + weight_name: str, + ) -> bool: + # Cases not handled by the batched path — caller falls back. + if ( + "input_scale" in weight_name + or "g_idx" in weight_name + or "weight_shape" in weight_name + or weight_name == "" + ): + return False + if shard_id not in ("w1", "w2", "w3"): + return False + + # compressed-tensors packed-weight flip (matches weight_loader) + if self.quant_method.__class__.__name__ in ( + "CompressedTensorsWNA16MarlinMoEMethod", + "CompressedTensorsWNA16MoEMethod", + ): + loaded_weight = loaded_weight.t().contiguous() + + SHARD_ID_TO_SHARDED_DIM = {"w1": 0, "w2": 1, "w3": 0} + is_transposed = getattr(param, "is_transposed", False) + shard_dim = SHARD_ID_TO_SHARDED_DIM[shard_id] + if is_transposed: + shard_dim = int(not shard_dim) + + if len(loaded_weight.shape) == 3: + return False + + expert_data = staging[local_expert_id] + + if ( + staging.dtype == torch.uint8 + and param.data.dtype == dtypes.fp4x2 + and loaded_weight.dtype == dtypes.fp4x2 + ): + loaded_weight = loaded_weight.view(torch.uint8) + + return self._copy_expert_shard( + param=param, + expert_data=expert_data, + shard_id=shard_id, + shard_dim=shard_dim, + loaded_weight=loaded_weight, + weight_name=weight_name, + ) + + def expected_batched_arrivals(self, param: torch.nn.Parameter) -> Optional[int]: + w13_params = [ + getattr(self, n, None) + for n in ("w13_weight", "w13_weight_scale", "w13_bias") + ] + w2_params = [ + getattr(self, n, None) for n in ("w2_weight", "w2_weight_scale", "w2_bias") + ] + if any(param is p for p in w13_params if p is not None): + return self.local_num_experts * 2 + if any(param is p for p in w2_params if p is not None): + return self.local_num_experts + return None + def weight_loader( self, param: torch.nn.Parameter, @@ -3172,35 +3291,22 @@ def weight_loader( ) return - # Case weight scales, zero_points and offset + # Group/per-channel scales and model weights share one copy path with + # the batched loader (_copy_expert_shard). + # TODO @dsikka: once hardened, refactor to use vLLM Parameters. + if self._copy_expert_shard( + param=param, + expert_data=expert_data, + shard_id=shard_id, + shard_dim=shard_dim, + loaded_weight=loaded_weight, + weight_name=weight_name, + ): + return + + # Case per-Tensor weight scale if "scale" in weight_name or "zero" in weight_name or "offset" in weight_name: - # load the weight scales and zp based on the quantization scheme - # supported weight scales/zp can be found in - # FusedMoeWeightScaleSupported - # TODO @dsikka: once hardened, refactor to use vLLM Parameters - # specific to each case - quant_method = self.layer_quant_config.quant_type - if quant_method == QuantType.per_Token: - self._load_per_channel_weight_scale( - shard_id=shard_id, - shard_dim=shard_dim, - loaded_weight=loaded_weight, - expert_data=expert_data, - tp_rank=self.tp_rank, - ) - elif quant_method in [ - QuantType.per_1x128, - QuantType.per_1x32, - ]: - self._load_model_weight_or_group_weight_scale( - shard_id=shard_id, - shard_dim=shard_dim, - loaded_weight=loaded_weight, - expert_data=expert_data, - tp_rank=self.tp_rank, - load_full=getattr(param, "load_full_w2", False), - ) - elif quant_method == QuantType.per_Tensor: + if self.layer_quant_config.quant_type == QuantType.per_Tensor: self._load_per_tensor_weight_scale( shard_id=shard_id, param=param, @@ -3217,17 +3323,6 @@ def weight_loader( ) return - # Case model weights - if "weight" in weight_name: - self._load_model_weight_or_group_weight_scale( - shard_id=shard_id, - shard_dim=shard_dim, - loaded_weight=loaded_weight, - expert_data=expert_data, - tp_rank=self.tp_rank, - ) - return - @staticmethod def select_experts( hidden_states: torch.Tensor, From d2155f432f41ead4eb405ee9035599a9e8d4915c Mon Sep 17 00:00:00 2001 From: Zesen Liu Date: Mon, 6 Jul 2026 06:45:19 +0000 Subject: [PATCH 2/7] chore: model load opt env var & cleanups --- atom/model_loader/loader.py | 59 ++++++++++++++++++++--------------- atom/utils/envs.py | 10 +++--- docs/environment_variables.md | 1 + 3 files changed, 39 insertions(+), 31 deletions(-) diff --git a/atom/model_loader/loader.py b/atom/model_loader/loader.py index 24c9bedc47..5f8ab37dbb 100644 --- a/atom/model_loader/loader.py +++ b/atom/model_loader/loader.py @@ -471,22 +471,33 @@ def _fallback(param, full_param_name, shard_id, global_expert_id, loaded_weight) def _stage_task(param, full_param_name, shard_id, global_expert_id, loaded_weight): pid = id(param) with staging_lock: - if pid in fallback_pids: + opted_out = pid in fallback_pids + entry = None if opted_out else staging_map.get(pid) + if opted_out: + _fallback(param, full_param_name, shard_id, global_expert_id, loaded_weight) + return + + if entry is None: + moe = _lookup_moe_module(full_param_name) + new_entry = { + "staging": _make_staging(param), + "arrived": 0, + "expected": moe.expected_batched_arrivals(param), + "moe": moe, + "param": param, + "lock": threading.Lock(), + } + with staging_lock: + opted_out = pid in fallback_pids + if not opted_out: + entry = staging_map.get(pid) + if entry is None: + entry = staging_map[pid] = new_entry + if opted_out: _fallback( param, full_param_name, shard_id, global_expert_id, loaded_weight ) return - entry = staging_map.get(pid) - if entry is None: - moe = _lookup_moe_module(full_param_name) - entry = staging_map[pid] = { - "staging": _make_staging(param), - "arrived": 0, - "expected": moe.expected_batched_arrivals(param), - "moe": moe, - "param": param, - "lock": threading.Lock(), - } moe = entry["moe"] local_eid = moe._map_global_expert_id_to_local_expert_id(global_expert_id) @@ -517,9 +528,9 @@ def _stage_task(param, full_param_name, shard_id, global_expert_id, loaded_weigh if staging_map.get(pid) is entry: del staging_map[pid] - use_threadpool = envs.ATOM_LOADER_USE_THREADPOOL - if use_threadpool: - executor = concurrent.futures.ThreadPoolExecutor(max_workers=16) + num_threads = envs.ATOM_LOADER_NUM_THREADS + if num_threads > 1: + executor = concurrent.futures.ThreadPoolExecutor(max_workers=num_threads) else: executor = None futures = [] @@ -713,7 +724,7 @@ def _submit(fn, *args): # an unquantized drafter MTP block); skip silently. matched = True break - if _param_is_batchable(param, name): + if executor is not None and _param_is_batchable(param, name): _submit( _stage_task, param, @@ -792,17 +803,13 @@ def _submit(fn, *args): pending = list(staging_map.values()) staging_map.clear() if pending: - logger.warning( - "Batched-load safety flush: %d group(s) under-filled, flushing " - "partial data (missing experts left as zeros): %s", - len(pending), - [ - (tuple(e["param"].shape), e["arrived"], e["expected"]) - for e in pending - ], + detail = [ + (tuple(e["param"].shape), e["arrived"], e["expected"]) for e in pending + ] + raise RuntimeError( + f"Batched loader: {len(pending)} MoE param group(s) under-filled " + f"Set ATOM_LOADER_NUM_THREADS=1 to use the per-expert loader." ) - for entry in pending: - _do_flush(entry["param"], entry["staging"]) finally: if executor is not None: executor.shutdown(wait=True) diff --git a/atom/utils/envs.py b/atom/utils/envs.py index 3bd2a53abb..43a239a33c 100644 --- a/atom/utils/envs.py +++ b/atom/utils/envs.py @@ -101,11 +101,11 @@ "ATOM_DISABLE_MMAP": lambda: ( os.getenv("ATOM_DISABLE_MMAP", "false").lower() == "true" ), - # Use a thread pool for weight loading instead of main-process sequential I/O. - # Set to 0 to disable if the thread pool causes hangs (e.g. on gfx1250). - "ATOM_LOADER_USE_THREADPOOL": lambda: ( - os.getenv("ATOM_LOADER_USE_THREADPOOL", "1") == "1" - ), + # Worker threads for weight loading. >1 (default 16) enables the batched + # parallel loader (per-fused-param CPU staging flushed with one H2D copy) + # with that many threads; set to 1 to fall back to the original sequential + # per-expert path. + "ATOM_LOADER_NUM_THREADS": lambda: int(os.getenv("ATOM_LOADER_NUM_THREADS", "16")), # --- Attention Backend --- # Use unified_attention (flash-style) for MHA paged/prefill attention instead # of pa_decode_gluon. Set to 1 to enable the unified_attention path. diff --git a/docs/environment_variables.md b/docs/environment_variables.md index b23724966f..b77159a8dc 100644 --- a/docs/environment_variables.md +++ b/docs/environment_variables.md @@ -21,6 +21,7 @@ This document describes the environment variables used in the ATOM project. | Variable | Type | Default | Description | |----------|------|---------|-------------| | **ATOM_DISABLE_MMAP** | bool | false | If set to `true`, disable memory-mapped file loading for model weights. Useful in containerized environments where mmap may cause issues. | +| **ATOM_LOADER_NUM_THREADS** | int | 16 | Worker threads for weight loading. `>1` (default `16`) enables the batched parallel loader (per-fused-param CPU staging flushed with a single H2D copy) with that many threads; set to `1` to fall back to the original sequential per-expert path. Raise on high-core hosts if loading is CPU-bound. | --- From 811f3350b06700f7cdaefefa2d4b940ab2621077 Mon Sep 17 00:00:00 2001 From: Zesen Liu Date: Mon, 6 Jul 2026 11:18:46 +0000 Subject: [PATCH 3/7] fix: eliminate redundant mem pin --- atom/model_ops/moe.py | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/atom/model_ops/moe.py b/atom/model_ops/moe.py index c89e7ebf7e..b0160bf188 100644 --- a/atom/model_ops/moe.py +++ b/atom/model_ops/moe.py @@ -3199,16 +3199,18 @@ def stage_expert_weight( ) def expected_batched_arrivals(self, param: torch.nn.Parameter) -> Optional[int]: - w13_params = [ - getattr(self, n, None) - for n in ("w13_weight", "w13_weight_scale", "w13_bias") - ] - w2_params = [ - getattr(self, n, None) for n in ("w2_weight", "w2_weight_scale", "w2_bias") - ] - if any(param is p for p in w13_params if p is not None): + w13_batchable = [getattr(self, "w13_weight", None)] + w2_batchable = [getattr(self, "w2_weight", None)] + if self.layer_quant_config.quant_type in ( + QuantType.per_Token, + QuantType.per_1x128, + QuantType.per_1x32, + ): + w13_batchable.append(getattr(self, "w13_weight_scale", None)) + w2_batchable.append(getattr(self, "w2_weight_scale", None)) + if any(param is p for p in w13_batchable if p is not None): return self.local_num_experts * 2 - if any(param is p for p in w2_params if p is not None): + if any(param is p for p in w2_batchable if p is not None): return self.local_num_experts return None From 9719c9a965e4bf7d262cd520ffc6737f241d31bc Mon Sep 17 00:00:00 2001 From: Zesen Liu Date: Mon, 6 Jul 2026 11:25:27 +0000 Subject: [PATCH 4/7] docs: update expert parallel loading docs --- docs/model_support_guide.md | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/docs/model_support_guide.md b/docs/model_support_guide.md index ec71e193aa..440cbb3d81 100644 --- a/docs/model_support_guide.md +++ b/docs/model_support_guide.md @@ -196,14 +196,21 @@ def load_model( ``` Each packed parameter has a `weight_loader` attribute that knows how to shard and place the weight into the correct slice. -4. **Expert parameter loading:** If the model has a `get_expert_mapping()` method, expert weights are loaded using `FusedMoE.make_expert_params_mapping()`, which generates (param_name, weight_name, expert_id, shard_id) tuples. This handles per-expert sharding across TP ranks. +4. **Expert parameter loading:** If the model has a `get_expert_mapping()` method, expert weights are loaded using `FusedMoE.make_expert_params_mapping()`, which generates (param_name, weight_name, expert_id, shard_id) tuples. This handles per-expert sharding across TP ranks. Each expert shard is then placed either through the per-expert `FusedMoE.weight_loader` or, when the parallel loader is enabled, the batched staging path (see [Batched Expert Staging](#batched-expert-staging)). 5. **TP sharding:** Parallel linear layers (`ColumnParallelLinear`, `RowParallelLinear`, `QKVParallelLinear`) have custom `weight_loader` methods that automatically select the correct shard for the current TP rank during loading. The default fallback `default_weight_loader` handles simple cases where weights need to be sliced by TP rank. -6. **Concurrent loading:** All weight loading calls are submitted to a `ThreadPoolExecutor` for parallel execution. +6. **Concurrent loading:** Controlled by `ATOM_LOADER_NUM_THREADS` (default `16`). A value `>1` runs loads on a `ThreadPoolExecutor` of that many workers and routes MoE expert weights through the batched staging path (see [Batched Expert Staging](#batched-expert-staging)); `1` loads sequentially and sends every expert through the per-expert `weight_loader` path. 7. **Post-processing:** After all weights are loaded, `process_weights_after_loading()` is called on each module (e.g., for weight pre-shuffling, scale computation), and `quant_method.process_weights_after_loading()` is invoked for quantized modules. For `FusedMoEMethodBase`, `init_prepare_finalize()` is also called. +### Batched Expert Staging + +On large MoE checkpoints each expert's weight arrives as a separate tensor, so the per-expert `weight_loader` issues one small H2D copy per (expert, shard). When the parallel loader is enabled (`ATOM_LOADER_NUM_THREADS > 1`), these are collapsed into one large copy per fused parameter: + +- Once a buffer has received all `expected_batched_arrivals` shards, it is flushed to the GPU parameter with a single H2D copy. +- If a staged group never reaches its expected count (some expert slots left unstaged), loading raises a `RuntimeError` rather than flushing a partially-zeroed parameter; set `ATOM_LOADER_NUM_THREADS=1` to fall back to the per-expert loader. + ### Layers Beyond `num_hidden_layers` Weights for layers with index >= `config.num_hidden_layers` are skipped during normal loading. These layers (MTP layers) are only loaded when `spec_decode=True`. From eecc787545025e744b1edfdeb0fbade659ca83c7 Mon Sep 17 00:00:00 2001 From: Zesen Liu Date: Wed, 8 Jul 2026 07:26:57 +0000 Subject: [PATCH 5/7] style: remove unused var --- atom/model_loader/loader.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/atom/model_loader/loader.py b/atom/model_loader/loader.py index 5f8ab37dbb..8c699c5ca2 100644 --- a/atom/model_loader/loader.py +++ b/atom/model_loader/loader.py @@ -803,9 +803,6 @@ def _submit(fn, *args): pending = list(staging_map.values()) staging_map.clear() if pending: - detail = [ - (tuple(e["param"].shape), e["arrived"], e["expected"]) for e in pending - ] raise RuntimeError( f"Batched loader: {len(pending)} MoE param group(s) under-filled " f"Set ATOM_LOADER_NUM_THREADS=1 to use the per-expert loader." From cb03a8058513f358380403a53fa1c2c990191367 Mon Sep 17 00:00:00 2001 From: Zesen Liu Date: Wed, 8 Jul 2026 18:43:32 +0800 Subject: [PATCH 6/7] ci: flip disable-mmap default to false Suggested-by: Lingpeng Jin <103567126+valarLip@users.noreply.github.com> --- .github/actions/setup-gpu-container/action.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/actions/setup-gpu-container/action.yml b/.github/actions/setup-gpu-container/action.yml index 1d59e8ca81..8dfa8b472b 100644 --- a/.github/actions/setup-gpu-container/action.yml +++ b/.github/actions/setup-gpu-container/action.yml @@ -52,11 +52,12 @@ inputs: default: "" disable-mmap: description: >- - When 'true' (default) inject `-e ATOM_DISABLE_MMAP=true`. Set 'false' for - callers whose container never set it (e.g. mmstar) to stay byte-for-byte - equivalent. + When 'true', inject `-e ATOM_DISABLE_MMAP=true` into the container. + Defaults to 'false' (mmap enabled) now that the batched parallel loader + makes the non-mmap load path unnecessary; set 'true' for callers that + still need mmap disabled. required: false - default: "true" + default: "false" runs: using: composite From 7ee73c76edc8cb741c0dafae34aad5d0df8f8ba9 Mon Sep 17 00:00:00 2001 From: Zesen Liu Date: Sat, 11 Jul 2026 11:54:11 +0000 Subject: [PATCH 7/7] Revert "ci: flip disable-mmap default to false" This reverts commit cb03a8058513f358380403a53fa1c2c990191367. --- .github/actions/setup-gpu-container/action.yml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/.github/actions/setup-gpu-container/action.yml b/.github/actions/setup-gpu-container/action.yml index 8dfa8b472b..1d59e8ca81 100644 --- a/.github/actions/setup-gpu-container/action.yml +++ b/.github/actions/setup-gpu-container/action.yml @@ -52,12 +52,11 @@ inputs: default: "" disable-mmap: description: >- - When 'true', inject `-e ATOM_DISABLE_MMAP=true` into the container. - Defaults to 'false' (mmap enabled) now that the batched parallel loader - makes the non-mmap load path unnecessary; set 'true' for callers that - still need mmap disabled. + When 'true' (default) inject `-e ATOM_DISABLE_MMAP=true`. Set 'false' for + callers whose container never set it (e.g. mmstar) to stay byte-for-byte + equivalent. required: false - default: "false" + default: "true" runs: using: composite