文件最后提交记录最后更新时间
!17523 Add configuration for coverage rate. Merge pull request !17523 from yuhaiyan/master-dev2 1 年前
!17523 Add configuration for coverage rate. Merge pull request !17523 from yuhaiyan/master-dev2 1 年前
[test] compat(test): adapt test cases for torch 2.10/2.11 cross-version compatibility Co-authored-by: chz34<chenhaozhe1@huawei.com> # message auto-generated for no-merge-commit merge: !34505 merge compat/master-test into master [test] compat(test): adapt test cases for torch 2.10/2.11 cross-version compatibility Created-by: c_34 Commit-by: chz34 Merged-by: ascend-robot Description: <!-- PR描述模板更新日期:20260203 --> # 【合入来源】 > <font color="red">**如有社区issue,请关联issue链接**</font>\ > <font color="red">**请勿携带内部流程信息(需求链接、问题单、内部issue等)**</font> - [ ] 需求 - [ ] 问题单 - [ ] issue/工单 - [x] 重构优化 - [ ] 资料更新 基于多版本分支归一的方案,对应完成测试用例的修改 [#1688](https://gitcode.com/Ascend/pytorch/issues/1688) # 【修改方案】 > 请描述修改内容的具体实现,涉及哪些组件之间进行交互,可以用1、2、3、...进行罗列\ > 如果是需求或者重构类的PR,需要补充详细设计文档(说明上下游组件关系、时序图、类图、DFX能力等内容) compat(test): adapt test cases for torch 2.10/2.11 and Python 3.10/3.11+ compatibility Fix import typo MultiProcContinousTest -> MultiProcContinuousTest in pipelining tests and remove the unused TEST_MULTIGPU import from the CUDA module. Add the legacy flat cutedsl_grouped_gemm path back to test_public_bindings private_allowlist so it is exempted on torch 2.10/2.11 where the package restructure hasn't happened. Introduce per-version disabled-tests files (.pytorch-disabled-tests-2.10.json / -2.11.json) and update get_failed_ut_from_log.py to auto-select the right file via torch_npu._compat.version.CURRENT_VERSION. Add --torch parameter documentation to README, CONTRIBUTING, and ci/docker/README. Normalize Enum class signatures in test_compatibility.py to strip the boundary=None parameter added by Python 3.11+ via EnumMeta.__call__, ensuring schema comparisons remain consistent across Python 3.10 and 3.11+. # 【资料变更】 > 请确认是否涉及资料变更。如涉及,需要在PR中体现,并简要说明修改内容。如不涉及,需填写“不涉及” Add --torch description in README.md, CCONTRIBUTE.md, ci/docker/README.md # 【接口变更】 > 请确认是否涉及跨代码仓或者客户面可见的接口变更。如涉及,需要详细说明接口以及对应的变更内容,同时需要在资料中体现。如不涉及,需填写“不涉及” 不涉及 # 【功能验证】 > 说明测试场景,测试方法。如果本次测试方式与常规单元测试不同,请详细说明您的测试步骤\ > 新增/变更内容是否已新增/适配UT测试用例看护,并补充测试自验证截图 不涉及 # 【CheckList】 > PR提交人对以下CheckList自检项进行全量自检,自检通过或不涉及,均修改 [ ] 为 [x] - [x] 代码注释完备,正确记录错误日志 - [x] 代码实现进行了返回值、空指针等校验 - [x] PR标题正确使用类型标签,如:feat、fix、refactor、docs、test等 - [x] PR持续集成流水线(CI)执行通过,代码检查无异常 See merge request: Ascend/pytorch!345051 个月前
README.md

Ascend Pytorch Dockerfile Repository

This folder hosts the Dockerfile to build docker images with various platforms.

Build torch_npu from Docker container

Clone torch-npu

git clone https://gitcode.com/ascend/pytorch.git --depth 1

Build docker image

cd pytorch/ci/docker/{arch} # {arch} for X86 or ARM
docker build -t manylinux-builder:v1 .

If you want to configure the environment of LCOV, please build docker image like this:

cd pytorch/ci/docker/{arch} # {arch} for X86 or ARM
docker build -t manylinux-builder:v1 --build-arg CONFIG_FOR_LCOV=1 .

Enter docker Container

docker run -it -v /{code_path}/pytorch:/home/pytorch manylinux-builder:v1 bash
# {code_path} is the torch_npu source code path

Compile torch_npu

Take Python 3.9 as an example

cd /home/pytorch
bash ci/build.sh --python=3.9

Use --torch=<version> to target a specific PyTorch version (supported: 2.10.0, 2.11.0, 2.12.0). The installed PyTorch must match.

bash ci/build.sh --python=3.9 --torch=2.11.0