Skip to content

转换规则修改#591

Merged
zhwesky2010 merged 3 commits intoPaddlePaddle:masterfrom
Xuxuanang:Xuxuanang6
Jun 11, 2025
Merged

转换规则修改#591
zhwesky2010 merged 3 commits intoPaddlePaddle:masterfrom
Xuxuanang:Xuxuanang6

Conversation

@Xuxuanang
Copy link
Contributor

PR Docs

PR APIs

torch.Tensor.bernoulli_
torch.Tensor.cholesky_inverse
torch.Tensor.ldexp
torch.Tensor.logaddexp
torch.bfloat16
torch.complex128
torch.cholesky_inverse
torch.complex64
torch.float16
torch.float32
torch.float64
torch.int16
torch.int32
torch.int64
torch.int8
torch.ldexp
torch.logaddexp
torch.uint8

@paddle-bot
Copy link

paddle-bot bot commented Jun 9, 2025

Thanks for your contribution!

@paddle-bot paddle-bot bot added the contributor External developers label Jun 9, 2025
Copy link
Collaborator

@zhwesky2010 zhwesky2010 left a comment

Choose a reason for hiding this comment

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

下个PR修改,先合入了

"torch.distributions.TransformedDistribution": "torch.distributions.transformed_distribution.TransformedDistribution",
"torch.distributions.Uniform": "torch.distributions.uniform.Uniform",
"torch.divide": "torch.div",
"torch.double": "torch.float64",
Copy link
Collaborator

Choose a reason for hiding this comment

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

还有一个torch.cfloat,下个PR统一加到文档与Matcher吧

import torch
src = torch.tensor([1., 2., 3., 4., 5., 6.])
result = src.bernoulli_(0.5)
result = src.bernoulli_(1.0)
Copy link
Collaborator

Choose a reason for hiding this comment

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

p=1.0和p=0的两个case,各来1个吧

同时p=1.0和p=0下,不用打开check_value=False,值应该是对齐的。通过这种形式注释单测:

# paddle.Tensor.bernoulli_ parameter p is different from torch, which has bug
def _test_case_1():
    ...

# paddle.Tensor.bernoulli_ parameter p is different from torch, which has bug
def _test_case_2():
    ...

obj.run(
pytorch_code,
["result"],
reason="paddle.logaddexp does not support different data type",
Copy link
Collaborator

Choose a reason for hiding this comment

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

这么描述:paddle.logaddexp does not support type promotion between int and float.

@zhwesky2010 zhwesky2010 merged commit 6cf204d into PaddlePaddle:master Jun 11, 2025
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

contributor External developers

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants