Skip to content

Conversation

@zhanghonggeng
Copy link
Contributor

PR Docs

新增nn.Module,nn.ModuleList,nn,ModuleDict和torch.meshgrid
其中nn.Module.zero_grad中不支持直接将p.grad设置为None,当前使用clear_gradient代替。

PR APIs

torch.nn.Module
torch.nn.ModuleList
torch.nn.ModuleDict
torch.meshgrid

@paddle-bot
Copy link

paddle-bot bot commented Nov 13, 2025

Thanks for your contribution!



def test_case_1():
def _test_case_1():
Copy link
Collaborator

@zhwesky2010 zhwesky2010 Nov 14, 2025

Choose a reason for hiding this comment

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

这个地方能对齐吗,是框架API有问题吗

@PaddlePaddle PaddlePaddle locked and limited conversation to collaborators Nov 17, 2025
@PaddlePaddle PaddlePaddle unlocked this conversation Nov 17, 2025
@zhanghonggeng zhanghonggeng force-pushed the api1 branch 2 times, most recently from 9c8d6e9 to eb54811 Compare November 20, 2025 07:24
@PaddlePaddle PaddlePaddle locked and limited conversation to collaborators Nov 21, 2025
@PaddlePaddle PaddlePaddle unlocked this conversation Nov 21, 2025
import pytest
from apibase import APIBase

# 本地测试通过,paconvert中api_mapping中会将torch.Tensor.cuda进行转换,导致出现不存在参数device_id
Copy link
Collaborator

Choose a reason for hiding this comment

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

这个是因为torch.Tensor.cuda未对齐的原因吗

if self.get_paddle_api():
new_paddle_api = re.sub(
"paddle.Tensor|paddle.nn.Layer|paddle.optimizer.Optimizer|paddle.distribution.Distribution|paddle.autograd.PyLayerContext|paddle.profiler.Profiler",
"paddle.Tensor|paddle.nn.Layer|paddle.nn.Module|paddle.optimizer.Optimizer|paddle.distribution.Distribution|paddle.autograd.PyLayerContext|paddle.profiler.Profiler",
Copy link
Collaborator

Choose a reason for hiding this comment

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

infoflow 2025-11-24 17-16-03

PaConvert里所有的paddle.nn.Layer后续都可以不维护了,统一都更新到paddle.nn.Module吧



def _test_case_1():
def test_case_1():
Copy link
Collaborator

Choose a reason for hiding this comment

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

确认一下所有能打开的单测都打开了

"torch.Tensor.sub",
"torch.Tensor.sub_",
"torch.Tensor.random_",
"torch.meshgrid",
Copy link
Collaborator

Choose a reason for hiding this comment

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

确认下:所有能对齐的都填上了吧,另外都存在单测吧

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