From aeb29997debe8a608f88c75b4ec4b4624c0eee3c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=8F=B2=E4=BD=B3=E9=A6=A8?= Date: Mon, 28 Jul 2025 11:27:18 +0800 Subject: [PATCH] Modify the default value section of the npu_transpose interface documentation. --- codegen/templates/_op_plugin_docs.py | 2 +- .../\357\274\210beta\357\274\211torch_npu-npu_transpose.md" | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/codegen/templates/_op_plugin_docs.py b/codegen/templates/_op_plugin_docs.py index 30583080a..4efeb508a 100644 --- a/codegen/templates/_op_plugin_docs.py +++ b/codegen/templates/_op_plugin_docs.py @@ -3170,7 +3170,7 @@ torch_npu.npu_transpose(self, perm, require_contiguous=True) -> Tensor 参数说明 self (Tensor) - 输入张量。 perm (ListInt) - 对应维度排列。 -require_contiguous(Bool,默认值为True) - 用户是否显式指定npu_contiguous算子适配需要对输入Tensor做转连续。默认为False,低性能模式。用户明确知道输入Tensor为连续Tensor或转置Tensor时,才能设置为True使用高性能模式。 +require_contiguous(Bool,默认值为True) - 用户是否需要对输入Tensor做转连续。设置为False时,表示不对输入Tensor做转连续。用户明确输入Tensor为连续Tensor或转置Tensor时,才能设置为True。 示例 >>> x = torch.randn(2, 3, 5).npu() >>> x.shape diff --git "a/docs/context/\357\274\210beta\357\274\211torch_npu-npu_transpose.md" "b/docs/context/\357\274\210beta\357\274\211torch_npu-npu_transpose.md" index f09463a56..72dbc770a 100644 --- "a/docs/context/\357\274\210beta\357\274\211torch_npu-npu_transpose.md" +++ "b/docs/context/\357\274\210beta\357\274\211torch_npu-npu_transpose.md" @@ -14,7 +14,7 @@ torch_npu.npu_transpose(self, perm, require_contiguous=True) -> Tensor - self (Tensor) - 输入张量。 - perm (ListInt) - 对应维度排列。 -- require_contiguous(Bool,默认值为True) - 用户是否显式指定npu_contiguous算子适配需要对输入Tensor做转连续。默认为False,低性能模式。用户明确知道输入Tensor为连续Tensor或转置Tensor时,才能设置为True使用高性能模式。 +- require_contiguous(Bool,默认值为True) - 用户是否需要对输入Tensor做转连续。设置为False时,表示不对输入Tensor做转连续。用户明确输入Tensor为连续Tensor或转置Tensor时,才能设置为True。 ## 支持的型号 -- Gitee