| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
migrate-benchmarks-to-master Co-authored-by: LG<luguang6@huawei.com> # message auto-generated for no-merge-commit merge: !40570 merge migrate-benchmarks-v2.7.1-to-master into master migrate-benchmarks-to-master Created-by: Lu_G Commit-by: LG Merged-by: ascend-robot Description: <!-- PR描述模板更新日期:20260203 --> # 【合入来源】 > <font color="red">**如有社区issue,请关联issue链接**</font>\ https://gitcode.com/Ascend/pytorch/issues/2999 > <font color="red">**请勿携带内部流程信息(需求链接、问题单、内部issue等)**</font> - [ ] 需求 - [ ] 问题单 - [x] issue/工单 - [ ] 重构优化 - [ ] 资料更新 # 【修改方案】 > 请描述修改内容的具体实现,涉及哪些组件之间进行交互,可以用1、2、3、...进行罗列\ > 如果是需求或者重构类的PR,需要补充详细设计文档(说明上下游组件关系、时序图、类图、DFX能力等内容) # 【资料变更】 > 请确认是否涉及资料变更。如涉及,需要在PR中体现,并简要说明修改内容。如不涉及,需填写“不涉及” # 【接口变更】 > 请确认是否涉及跨代码仓或者客户面可见的接口变更。如涉及,需要详细说明接口以及对应的变更内容,同时需要在资料中体现。如不涉及,需填写“不涉及” # 【功能验证】 > 说明测试场景,测试方法。如果本次测试方式与常规单元测试不同,请详细说明您的测试步骤\ > 新增/变更内容是否已新增/适配UT测试用例看护,并补充测试自验证截图 # 【CheckList】 > PR提交人对以下CheckList自检项进行全量自检,自检通过或不涉及,均修改 [ ] 为 [x] - [ ] 代码注释完备,正确记录错误日志 - [ ] 代码实现进行了返回值、空指针等校验 - [ ] PR标题正确使用类型标签,如:feat、fix、refactor、docs、test等 - [ ] PR持续集成流水线(CI)执行通过,代码检查无异常 See merge request: Ascend/pytorch!40570 | 3 个月前 | |
fix(benchmark): restrict remote model code execution Co-authored-by: liuyutong_bury<liuyutong25@huawei.com> # message auto-generated for no-merge-commit merge: !46978 merge codex/llm-remove-remote-code-master into master fix(benchmark): restrict remote model code execution Created-by: liuyutong_bury Commit-by: liuyutong_bury Merged-by: ascend-robot Description: <!-- PR描述模板更新日期:20260203 --> # 【合入来源】 > <font color="red">**如有社区issue,请关联issue链接**</font>\ > <font color="red">**请勿携带内部流程信息(需求链接、问题单、内部issue等)**</font> - [ ] 需求 - [ ] 问题单 - [x] issue/工单 - [ ] 重构优化 - [x] 资料更新 关联 Issue:Fixes #5082 https://gitcode.com/Ascend/pytorch/issues/5082 # 【修改方案】 1. 删除 Transformers 4.57.1 已原生支持模型的 trust_remote_code=True,避免默认执行模型仓自定义 Python 代码。 2. Baichuan2 保留架构所需能力,但改为默认关闭的 --trust-remote-code 显式开关;远程仓启用时必须通过 --revision 固定完整 commit hash,本地模型目录不强制 revision。 3. 删除 Mamba2 和 Qwen2VL 样例中的个人绝对模型路径,改为必填参数。 4. 更新 Baichuan2/GLM4 README,说明远程代码风险、可信来源要求以及原生 GLM4 模型要求。 5. 修复本次涉及文件的尾随空格和 EOF 换行问题。 # 【资料变更】 涉及。Baichuan2 README 新增远程代码执行风险声明与固定 revision 要求;GLM4 README 说明使用 Transformers 内置实现,不执行模型仓自定义代码。 # 【接口变更】 涉及命令行参数变更: - Baichuan2 新增 --trust-remote-code,默认关闭。 - Baichuan2 新增 --revision;远程模型开启远程代码时必须提供完整的 40 位 commit hash。 - Mamba2 的 --model_path 和 Qwen2VL 的 --model_name_or_path 改为必填参数。 # 【功能验证】 - transformers==4.57.1 环境下完成 Mamba2、Qwen3、Qwen2VL、Llama3、GPT-OSS 原生配置/tokenizer/processor 加载 smoke 验证。 - Baichuan2 参数默认值验证为 trust_remote_code=False;远程路径开启开关但未提供固定 revision 时,会在模型加载前拒绝执行。 - 42 个分支相关 Python 文件通过 py_compile。 - 6 个 Baichuan2 启动脚本通过 bash -n。 - git diff --check、EOF 换行、尾随空格、Tab、120 字符行长及硬编码 trust_remote_code=True 扫描通过。 - 未执行完整模型训练,待 PR 流水线进一步验证。 # 【CheckList】 > PR提交人对以下CheckList自检项进行全量自检,自检通过或不涉及,均修改 [ ] 为 [x] - [x] 代码注释完备,正确记录错误日志 - [x] 代码实现进行了返回值、空指针等校验 - [x] PR标题正确使用类型标签,如:feat、fix、refactor、docs、test等 - [ ] PR持续集成流水线(CI)执行通过,代码检查无异常 See merge request: Ascend/pytorch!46978 | 1 个月前 | |
[bugfix][torchbench] Fix dictionary inputs being passed as positional arguments Co-authored-by: taochong<2636757099@qq.com> # message auto-generated for no-merge-commit merge: !47249 merge fix/torchbench-dict-inputs into master [bugfix][torchbench] Fix dictionary inputs being passed as positional arguments Created-by: taochong Commit-by: taochong Merged-by: ascend-robot Description: ## What does this PR do? This PR fixes dictionary-input dispatch in the TorchBench forward model-dispatch path for official-framework models. - When inputs is a dictionary, TorchBenchmarkRunner.forward_pass now invokes the model with mod(**inputs). - Tuple/list inputs continue to use the existing mod(*inputs) behavior. - The change is limited to the forward model-dispatch call site; other benchmark paths remain unchanged. ## Observed Moondream symptom The official TorchBench Moondream benchmark previously failed when example_inputs was a dictionary. The runner called mod(*inputs), so Python expanded dictionary keys as positional arguments instead of passing the associated tensors as keyword arguments. The observed failure was: text embedding(): argument 'indices' must be Tensor, not str This is a benchmark input-dispatch issue, not a Moondream model or NPU operator issue. ## Root cause Dictionary inputs require keyword expansion (mod(**inputs)), while tuple/list inputs require positional expansion (mod(*inputs)). The previous forward path assumed all inputs were positional collections. ## Performance validation | Metric | Value | Notes | |---|---:|---| | Eager step time | **125.35 ms/step** | Official TorchBench, FP32, batch size 4, steps 16-40 average | | Graph-mode step time | **106.82 ms/step** | Inductor + Triton Experimental NPU backend, same measurement scope | | Same-run speedup | **1.17x** | Eager divided by graph-mode step time | ## Accuracy validation | Item | Value | |---|---| | Verdict | **pass_accuracy** | ## Does this PR introduce any user-facing change? No. This is a TorchBench input-dispatch compatibility fix. Existing positional-input models retain their previous behavior, and the backward benchmark path is unchanged. ## Validation results - Applied the patch cleanly. - git diff --check: passed. - Python syntax compilation passed for benchmarks/torchbench/torchbench.py. - The official Moondream workflow completed with pass_accuracy. - GitCode pre-push hooks passed. - Full benchmark matrix validation was not run in this environment. See merge request: Ascend/pytorch!47249 | 18 天前 | |
migrate-benchmarks-to-master Co-authored-by: LG<luguang6@huawei.com> # message auto-generated for no-merge-commit merge: !40570 merge migrate-benchmarks-v2.7.1-to-master into master migrate-benchmarks-to-master Created-by: Lu_G Commit-by: LG Merged-by: ascend-robot Description: <!-- PR描述模板更新日期:20260203 --> # 【合入来源】 > <font color="red">**如有社区issue,请关联issue链接**</font>\ https://gitcode.com/Ascend/pytorch/issues/2999 > <font color="red">**请勿携带内部流程信息(需求链接、问题单、内部issue等)**</font> - [ ] 需求 - [ ] 问题单 - [x] issue/工单 - [ ] 重构优化 - [ ] 资料更新 # 【修改方案】 > 请描述修改内容的具体实现,涉及哪些组件之间进行交互,可以用1、2、3、...进行罗列\ > 如果是需求或者重构类的PR,需要补充详细设计文档(说明上下游组件关系、时序图、类图、DFX能力等内容) # 【资料变更】 > 请确认是否涉及资料变更。如涉及,需要在PR中体现,并简要说明修改内容。如不涉及,需填写“不涉及” # 【接口变更】 > 请确认是否涉及跨代码仓或者客户面可见的接口变更。如涉及,需要详细说明接口以及对应的变更内容,同时需要在资料中体现。如不涉及,需填写“不涉及” # 【功能验证】 > 说明测试场景,测试方法。如果本次测试方式与常规单元测试不同,请详细说明您的测试步骤\ > 新增/变更内容是否已新增/适配UT测试用例看护,并补充测试自验证截图 # 【CheckList】 > PR提交人对以下CheckList自检项进行全量自检,自检通过或不涉及,均修改 [ ] 为 [x] - [ ] 代码注释完备,正确记录错误日志 - [ ] 代码实现进行了返回值、空指针等校验 - [ ] PR标题正确使用类型标签,如:feat、fix、refactor、docs、test等 - [ ] PR持续集成流水线(CI)执行通过,代码检查无异常 See merge request: Ascend/pytorch!40570 | 3 个月前 |