-
Notifications
You must be signed in to change notification settings - Fork 5.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
动态图Tensor
、老IR Variable
、新IR OpResult
method 支持对照表
#58118
Labels
PFCC
Paddle Framework Contributor Club,https://github.com/PaddlePaddle/community/tree/master/pfcc
status/new-issue
新建
type/others
其他问题
Comments
记录一下生成的代码 import paddle
output_text = "\n> [!NOTE]\n> 请不要手动修改表格\n\n"
output_text += f"用于统计现阶段支持情况\n\n基于: {paddle.version.commit}"
all_dir = list(set(dir(paddle.Tensor) + dir(paddle.base.framework.Variable) + dir(paddle.base.libpaddle.pir.OpResult)))
all_dir.sort()
output_text += """
| math | 动态图Tensor | 老IR Variable | 新IR OpResult |
|:---------------------:|:--------------------------------------------------------:|:------------------------------------------------------:|:------------------------------------------------------:|
"""
print(len(all_dir))
for i in all_dir:
math_name = f"`{i}`" if "__" in i else i
temp_line = f"| {math_name} "
if i in dir(paddle.Tensor):
temp_line += "| ✅ "
else:
temp_line += "| ❌ "
if i in dir(paddle.base.framework.Variable):
temp_line += "| ✅ "
else:
temp_line += "| ❌ "
if i in dir(paddle.base.libpaddle.pir.OpResult):
# api 对应 pr 匹配规则
if i in paddle.tensor.tensor_method_func:
temp_line += "| #57857 |"
else:
match i:
case "place" | "ndimension" | "dim" | "ndim" | "item":
temp_line += "| #58042 |"
case "astype":
temp_line += "| #58026 |"
case "__div__" | "__truediv__" | "__rdiv__" | "__rtruediv__":
temp_line += "| #57997 |"
case "__rmul__" | "__mul__" | "__rsub__" | "__sub__" | "__radd__" | "__add__":
temp_line += "| #58106 |"
case "__pow__" | "__rpow__" | "__floordiv__" | "__mod__" | "__matmul__":
temp_line += "| #58219 |"
case "__ne__" | "__lt__" | "__le__" | "__gt__" | "__ge__" | "__and__" | "__or__" | "__xor__" | "__invert__":
temp_line += "| #58343 |"
case "clone":
temp_line += "| #59115 |"
case "append":
temp_line += "| #59220 |"
case "cpu" | "cuda":
temp_line += "| #59300 |"
case "__neg__":
temp_line += "| #60166 |"
case "__eq__":
temp_line += "| #58896 |"
case "T":
temp_line += "| #60515 |"
case _:
temp_line += "| ✅ |"
else:
temp_line += "| ❌ |"
output_text += temp_line + "\n"
with open("./method_compare.md","w") as file:
file.write(output_text) |
paddle-bot
bot
added
the
PFCC
Paddle Framework Contributor Club,https://github.com/PaddlePaddle/community/tree/master/pfcc
label
Oct 16, 2023
This was referenced Oct 19, 2023
This was referenced Nov 6, 2023
This was referenced Nov 14, 2023
This was referenced Nov 21, 2023
SigureMo
changed the title
动态图
动态图Feb 22, 2024
Tensor
、老IR Varialbe
、新IR OpResult
method 支持对照表Tensor
、老IR Variable
、新IR OpResult
method 支持对照表
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
PFCC
Paddle Framework Contributor Club,https://github.com/PaddlePaddle/community/tree/master/pfcc
status/new-issue
新建
type/others
其他问题
Note
请不要手动修改表格
用于统计现阶段支持情况
基于: 5fb978f
__add__
__and__
__array__
__array_ufunc__
__bool__
__class__
__deepcopy__
__delattr__
__dict__
__dir__
__div__
__doc__
__eq__
__float__
__floordiv__
__format__
__ge__
__getattribute__
__getitem__
__getstate__
__gt__
__hash__
__index__
__init__
__init_subclass__
__int__
__invert__
__le__
__len__
__long__
__lt__
__matmul__
__mod__
__module__
__mul__
__ne__
__neg__
__new__
__nonzero__
__or__
__pow__
__radd__
__rdiv__
__reduce__
__reduce_ex__
__repr__
__rmul__
__rpow__
__rsub__
__rtruediv__
__setattr__
__setitem__
__sizeof__
__str__
__sub__
__subclasshook__
__truediv__
__weakref__
__xor__
The text was updated successfully, but these errors were encountered: