Skip to content

[WIP]add dynamic shape support and size specialization for dynamic shapes - #1

Open
honghaowang25 wants to merge 2 commits into
graph_automodel_adaptfrom
0929_newdynamic
Open

honghaowang25 wants to merge 2 commits into
graph_automodel_adaptfrom
0929_newdynamic

Conversation

@honghaowang25

Copy link
Copy Markdown
Owner

No description provided.

@honghaowang25 honghaowang25 changed the title [WIP]0929 newdynamic [WIP]add dynamic shape support and size specialization for dynamic shapes Oct 9, 2026
Comment thread dynamic_shape_development.md Outdated

当前实现可以在输入 batch size、sequence length 变化时复用同一份前向与反向联合 FX 图。已完成 CPU 数值对照、两进程 FSDP 验证,以及 NPU 上 Qwen3-0.6B 模型结构的 TP2 + FSDP2 动态文本训练验证。

这里的“静态图”表示算子拓扑被捕获并复用;图中的部分张量尺寸仍可通过 `SymInt` 表达。当前执行对象是经过并行 Pass 改写的 FX `GraphModule`,不能把“一次图捕获”理解为已经实现所有底层算子的融合编译、NPU Graph capture 或任意动态控制流。

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这两文件放issue里

# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

放tests/torch/compile

compile_sizes: Optional[List[int]] = None,
compile_size_input: Optional[str] = None,
compile_size_dim: Optional[int] = None,
max_specializations: Optional[int] = None,

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

换个名

from tests.common.mark_utils import arg_mark


@arg_mark(plat_marks=["cpu_linux", "cpu_macos"], level_mark="level1",

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

UT不带argmark

@honghaowang25
honghaowang25 force-pushed the graph_automodel_adapt branch 4 times, most recently from 327b1d5 to 84deba0 Compare October 11, 2026 06:44
@honghaowang25
honghaowang25 force-pushed the 0929_newdynamic branch 2 times, most recently from 5f17dc8 to 123b76b Compare October 13, 2026 11:16
@honghaowang25
honghaowang25 force-pushed the graph_automodel_adapt branch 11 times, most recently from 73110bd to 3f2aed1 Compare October 23, 2026 02:33
@honghaowang25
honghaowang25 force-pushed the graph_automodel_adapt branch 7 times, most recently from c1e22e5 to 0697c35 Compare October 30, 2026 01:50
@honghaowang25
honghaowang25 force-pushed the graph_automodel_adapt branch 5 times, most recently from 7d31a32 to 6ddd1e4 Compare November 2, 2026 03:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants