-
Notifications
You must be signed in to change notification settings - Fork 53
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
Fix lu_factor_ex #268
Fix lu_factor_ex #268
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,7 +25,6 @@ def test_case_1(): | |
import torch | ||
x = torch.tensor([[1.0, 2.0], [3.0, 4.0], [5.0, 6.0]], dtype=torch.float64) | ||
LU, pivots, info = torch.linalg.lu_factor_ex(x) | ||
info = info.item() | ||
""" | ||
) | ||
obj.run(pytorch_code, ["LU", "pivots", "info"]) | ||
|
@@ -37,7 +36,6 @@ def test_case_2(): | |
import torch | ||
x = torch.tensor([[1.0, 2.0], [3.0, 4.0], [5.0, 6.0]], dtype=torch.float64) | ||
LU, pivots, info = torch.linalg.lu_factor_ex(A=x) | ||
info = info.item() | ||
""" | ||
) | ||
obj.run(pytorch_code, ["LU", "pivots", "info"]) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 这个只有一个shape的差异吗,先设置 check_shape=False 来测试吧,这个问题我们会在框架上修复,shape=[]的0D更合理 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. https://github.com/PaddlePaddle/PaConvert/blob/master/tests/apibase.py 参数不包括 check_shape There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 好吧,那暂时就先这样转吧,文档中说明下就可以,等修复0D这个问题后再删掉 |
||
|
@@ -49,7 +47,6 @@ def test_case_3(): | |
import torch | ||
x = torch.tensor([[1.0, 2.0], [3.0, 4.0], [5.0, 6.0]], dtype=torch.float64) | ||
LU, pivots, info = torch.linalg.lu_factor_ex(pivot=True, A=x) | ||
info = info.item() | ||
""" | ||
) | ||
obj.run(pytorch_code, ["LU", "pivots", "info"]) | ||
|
@@ -62,7 +59,6 @@ def test_case_4(): | |
x = torch.tensor([[1.0, 2.0], [3.0, 4.0], [5.0, 6.0]], dtype=torch.float64) | ||
out = (torch.tensor([], dtype=torch.float64), torch.tensor([], dtype=torch.int), torch.tensor([], dtype=torch.int)) | ||
LU, pivots, info = torch.linalg.lu_factor_ex(x, pivot=True, check_errors=False, out=out) | ||
info = info.item() | ||
""" | ||
) | ||
obj.run(pytorch_code, ["LU", "pivots", "info"]) | ||
|
@@ -75,7 +71,6 @@ def test_case_5(): | |
x = torch.tensor([[1.0, 2.0], [3.0, 4.0], [5.0, 6.0]], dtype=torch.float64) | ||
out = (torch.tensor([], dtype=torch.float64), torch.tensor([], dtype=torch.int), torch.tensor([], dtype=torch.int)) | ||
LU, pivots, info = torch.linalg.lu_factor_ex(A=x, pivot=True, check_errors=True, out=out) | ||
info = info.item() | ||
""" | ||
) | ||
obj.run(pytorch_code, ["LU", "pivots", "info"]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个功能 只是做一个cast为int32的类型变化吗
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shape会转换