Skip to content
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 plt api case, test=model #2948

Merged
merged 80 commits into from
Sep 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
80 commits
Select commit Hold shift + click to select a range
a3fe935
add plt export, test=model
Zeref996 Jul 11, 2024
54168e3
add plt export, test=model
Zeref996 Jul 11, 2024
b5c1730
add plt export, test=model
Zeref996 Jul 11, 2024
cdbe8e0
add plt export, test=model
Zeref996 Jul 11, 2024
d7c8369
add plt export, test=model
Zeref996 Jul 12, 2024
b57f7f4
add plt export, test=model
Zeref996 Jul 12, 2024
b3c1017
add plt export, test=model
Zeref996 Jul 15, 2024
4224630
add plt export, test=model
Zeref996 Jul 15, 2024
afc64f6
add plt export, test=model
Zeref996 Jul 15, 2024
dcb84ee
add plt export, test=model
Zeref996 Jul 15, 2024
8b393e5
add plt export, test=model
Zeref996 Jul 15, 2024
68ad191
add plt export, test=model
Zeref996 Jul 15, 2024
a363f8a
add plt export, test=model
Zeref996 Jul 15, 2024
835a6a1
add plt export, test=model
Zeref996 Jul 15, 2024
45d510e
add plt export, test=model
Zeref996 Jul 16, 2024
7013b7e
Merge remote-tracking branch 'upstream/develop' into plt-update-002
Zeref996 Jul 23, 2024
044c301
fix plt start, test=model
Zeref996 Jul 23, 2024
139a490
Merge remote-tracking branch 'upstream/develop' into plt-update-003
Zeref996 Jul 23, 2024
f52dc56
fix plt start, test=model
Zeref996 Jul 23, 2024
12b7ed6
fix plt start, test=model
Zeref996 Jul 23, 2024
513937f
fix plt start, test=model
Zeref996 Jul 23, 2024
8c4cf28
Merge remote-tracking branch 'upstream/develop' into plt-update-004
Zeref996 Aug 1, 2024
40a4a99
fix plt perf, test=model
Zeref996 Aug 1, 2024
3cdd124
Merge remote-tracking branch 'upstream/develop' into plt-update-004
Zeref996 Aug 5, 2024
7ce511d
add plt bm ignore, test=model
Zeref996 Aug 5, 2024
6c092a4
Merge remote-tracking branch 'upstream/develop' into plt-update-006
Zeref996 Aug 5, 2024
ea94ce8
update plt start.sh, test=model
Zeref996 Aug 5, 2024
c6ef08c
Merge remote-tracking branch 'upstream/develop' into plt-update-007
Zeref996 Aug 5, 2024
59430eb
update plt start.sh, test=model
Zeref996 Aug 5, 2024
eb8557c
Merge remote-tracking branch 'upstream/develop' into plt-update-008
Zeref996 Aug 8, 2024
d04932d
Merge remote-tracking branch 'upstream/develop' into plt-update-009
Zeref996 Aug 15, 2024
1ee0c40
add inputspec plt ci, test=model
Zeref996 Aug 15, 2024
9e90a82
add inputspec plt ci, test=model
Zeref996 Aug 15, 2024
7c537d8
Merge remote-tracking branch 'upstream/develop' into plt-update-009
Zeref996 Aug 19, 2024
b802922
update plt ci, test=model
Zeref996 Aug 19, 2024
55fc399
update plt ci, test=model
Zeref996 Aug 19, 2024
b9a0a8a
update plt ci, test=model
Zeref996 Aug 19, 2024
9ddd06c
update plt ci, test=model
Zeref996 Aug 20, 2024
3df68a8
update plt ci, test=model
Zeref996 Aug 20, 2024
8e8a5df
Merge remote-tracking branch 'upstream/develop' into plt-update-011
Zeref996 Aug 23, 2024
e06a669
update plt gsb, test=model
Zeref996 Aug 23, 2024
9c0d389
Merge remote-tracking branch 'upstream/develop' into plt-update-012
Zeref996 Aug 23, 2024
4ebc12f
fix plt statistic, test=model
Zeref996 Aug 23, 2024
7ca3088
Merge remote-tracking branch 'upstream/develop' into plt-update-013
Zeref996 Aug 28, 2024
aad05cd
plt update net instance, test=model
Zeref996 Aug 28, 2024
83accc5
plt update net instance, test=model
Zeref996 Aug 29, 2024
0bc98a2
plt update net instance, test=model
Zeref996 Aug 29, 2024
b4e3891
plt update net instance, test=model
Zeref996 Aug 29, 2024
57b98ad
plt update net instance, test=model
Zeref996 Aug 29, 2024
a501315
plt update net instance, test=model
Zeref996 Aug 29, 2024
f1922fa
plt update net instance, test=model
Zeref996 Aug 29, 2024
fd6284c
plt update net instance, test=model
Zeref996 Aug 30, 2024
3dddc7f
plt update net instance, test=model
Zeref996 Aug 30, 2024
849b2a8
plt update net instance, test=model
Zeref996 Aug 30, 2024
0c598c7
plt update net instance, test=model
Zeref996 Aug 30, 2024
5c017f9
plt update net instance, test=model
Zeref996 Aug 30, 2024
eed8461
plt update net instance, test=model
Zeref996 Aug 30, 2024
b59f018
plt update net instance, test=model
Zeref996 Aug 30, 2024
430e1ea
plt update net instance, test=model
Zeref996 Aug 30, 2024
b3efb14
plt update net instance, test=model
Zeref996 Aug 30, 2024
fb02edd
plt update net instance, test=model
Zeref996 Sep 2, 2024
8941680
plt update net instance, test=model
Zeref996 Sep 2, 2024
ce0c1e7
plt update net instance, test=model
Zeref996 Sep 2, 2024
e71139f
plt update net instance, test=model
Zeref996 Sep 3, 2024
ef875df
plt update net instance, test=model
Zeref996 Sep 3, 2024
ee1559c
plt update net instance, test=model
Zeref996 Sep 3, 2024
b154952
plt update net instance, test=model
Zeref996 Sep 3, 2024
25aaae1
plt update net instance, test=model
Zeref996 Sep 4, 2024
4a85e2d
plt update net instance, test=model
Zeref996 Sep 4, 2024
9755ebc
plt update net instance, test=model
Zeref996 Sep 4, 2024
d087c91
Merge remote-tracking branch 'upstream/develop' into plt-update-013
Zeref996 Sep 5, 2024
3cbc3a8
Merge remote-tracking branch 'upstream/develop' into develop
Zeref996 Sep 5, 2024
4472abd
fix plt tools, test=model
Zeref996 Sep 6, 2024
6e8dfc1
Merge branch 'pr_2936' into model-module-00
Zeref996 Sep 6, 2024
adf3a58
update ply add model case, test=model
Zeref996 Sep 6, 2024
1643378
update ply add model case, test=model
Zeref996 Sep 6, 2024
9cf3f9e
update ply add model case, test=model
Zeref996 Sep 6, 2024
f42e9ef
Merge remote-tracking branch 'upstream/develop' into model-module-01
Zeref996 Sep 11, 2024
8cf346f
fix plt api case, test=model
Zeref996 Sep 11, 2024
f9ddc99
fix plt api case, test=model
Zeref996 Sep 13, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import os
import glob

# 获取当前文件所在目录
current_dir = os.path.dirname(__file__)

# 获取当前目录下所有的 .py 文件路径
py_files = glob.glob(os.path.join(current_dir, "*.py"))

# 动态导入所有 .py 文件
for py_file in py_files:
# 获取文件名(不含扩展名)
module_name = os.path.basename(py_file)[:-3]
# 导入模块
__import__('layerApicase.inplace_stragtegy.' + module_name, globals(), locals(), [])
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ def forward(self, ):
forward
"""
out = paddle.broadcast_shape( x_shape=[2, 1, 3, 1, 4, 2, 3], y_shape=[1, 2, 1, 1, 3], )
out = paddle.to_tensor(out, stop_gradient=False)
return out


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ def forward(self, ):
forward
"""
out = paddle.broadcast_shape( x_shape=[2, 3, 4, 4, 1], y_shape=[2, 3, 1, 4, 3], )
out = paddle.to_tensor(out, stop_gradient=False)
return out


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ def forward(self, x, y, ):
"""
forward
"""
out = paddle.dist(x, y, p=-inf, )
out = paddle.dist(x, y, p=float("-inf"), )
return out


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ def forward(self, x, y, ):
"""
forward
"""
out = paddle.dist(x, y, p=inf, )
out = paddle.dist(x, y, p=float("inf"), )
return out


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ def forward(self, x, ):
"""
forward
"""
out = paddle.median(x, axis=1, keepdims=True, )
out = paddle.median(x, axis=1, keepdim=True, )
return out


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ def forward(self, x, ):
"""
forward
"""
out = paddle.median(x, axis=0, keepdims=False, )
out = paddle.median(x, axis=0, keepdim=False, )
return out


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ def forward(self, arr, ):
"""
forward
"""
out = paddle.put_along_axis(arr, indices=paddle.to_tensor([[[[2]]]], dtype='int32', stop_gradient=False), values=-4.0, axis=2, reduce='multiple', )
out = paddle.put_along_axis(arr, indices=paddle.to_tensor([[[[2]]]], dtype='int32', stop_gradient=False), values=-4.0, axis=2, reduce='multiply', )
return out


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ def forward(self, arr, ):
"""
forward
"""
out = paddle.put_along_axis(arr, indices=paddle.to_tensor([[[[0]]]], dtype='int32', stop_gradient=False), value=21.0, axis=0, )
out = paddle.put_along_axis(arr, indices=paddle.to_tensor([[[[0]]]], dtype='int32', stop_gradient=False), values=21.0, axis=0, )
return out


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,13 @@ def forward(self, data, ):
return out


def create_inputspec():
inputspec = (
paddle.static.InputSpec(shape=(-1, -1, -1), dtype=paddle.float32, stop_gradient=False),
)
return inputspec


def create_tensor_inputs():
"""
paddle tensor
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,18 +20,23 @@ def forward(self, data, ):
return out


def create_inputspec():
inputspec = (
paddle.static.InputSpec(shape=(-1, -1, -1), dtype=paddle.float32, stop_gradient=False),
)
return inputspec


def create_tensor_inputs():
"""
paddle tensor
numpy array
"""
inputs = ()
inputs = (paddle.to_tensor([[[0.6964692, 0.28613934, 0.22685145]], [[0.5513148, 0.71946895, 0.42310646]]], dtype='float32', stop_gradient=False), )
return inputs


def create_numpy_inputs():
"""
numpy array
"""
inputs = (paddle.to_tensor([[[0.6964692, 0.28613934, 0.22685145]], [[0.5513148, 0.71946895, 0.42310646]]], dtype='float32', stop_gradient=False), )
inputs = (np.array([[[0.6964692, 0.28613934, 0.22685145]], [[0.5513148, 0.71946895, 0.42310646]]]).astype('float32'), )
return inputs

Original file line number Diff line number Diff line change
Expand Up @@ -20,18 +20,25 @@ def forward(self, data, ):
return out


def create_inputspec():
inputspec = (
paddle.static.InputSpec(shape=(-1, -1), dtype=paddle.float32, stop_gradient=False),
)
return inputspec


def create_tensor_inputs():
"""
paddle tensor
"""
inputs = ()
inputs = (paddle.to_tensor([[0.6964692], [0.28613934]], dtype='float32', stop_gradient=False),)
return inputs


def create_numpy_inputs():
"""
numpy array
"""
inputs = (paddle.to_tensor([[0.6964692], [0.28613934]], dtype='float32', stop_gradient=False), )
inputs = (np.array([[0.6964692], [0.28613934]]).astype('float32'), )
return inputs

Original file line number Diff line number Diff line change
Expand Up @@ -20,18 +20,25 @@ def forward(self, data, ):
return out


def create_inputspec():
inputspec = (
paddle.static.InputSpec(shape=(-1, -1, -1), dtype=paddle.float32, stop_gradient=False),
)
return inputspec


def create_tensor_inputs():
"""
paddle tensor
"""
inputs = ()
inputs = (paddle.to_tensor([[[0.6964692, 0.28613934, 0.22685145]], [[0.5513148, 0.71946895, 0.42310646]]], dtype='float32', stop_gradient=False), )
return inputs


def create_numpy_inputs():
"""
numpy array
"""
inputs = (paddle.to_tensor([[[0.6964692, 0.28613934, 0.22685145]], [[0.5513148, 0.71946895, 0.42310646]]], dtype='float32', stop_gradient=False), )
inputs = (np.array([[[0.6964692, 0.28613934, 0.22685145]], [[0.5513148, 0.71946895, 0.42310646]]]).astype('float32'), )
return inputs

Original file line number Diff line number Diff line change
Expand Up @@ -20,18 +20,25 @@ def forward(self, data, ):
return out


def create_inputspec():
inputspec = (
paddle.static.InputSpec(shape=(-1, -1), dtype=paddle.float32, stop_gradient=False),
)
return inputspec


def create_tensor_inputs():
"""
paddle tensor
"""
inputs = ()
inputs = (paddle.to_tensor([[0.6964692], [0.28613934]], dtype='float32', stop_gradient=False), )
return inputs


def create_numpy_inputs():
"""
numpy array
"""
inputs = (paddle.to_tensor([[0.6964692], [0.28613934]], dtype='float32', stop_gradient=False), )
inputs = (np.array([[0.6964692], [0.28613934]]).astype('float32'), )
return inputs

Original file line number Diff line number Diff line change
Expand Up @@ -20,18 +20,25 @@ def forward(self, data, ):
return out


def create_inputspec():
inputspec = (
paddle.static.InputSpec(shape=(-1, -1, -1), dtype=paddle.float32, stop_gradient=False),
)
return inputspec


def create_tensor_inputs():
"""
paddle tensor
"""
inputs = ()
inputs = (paddle.to_tensor([[[0.6964692, 0.28613934, 0.22685145]], [[0.5513148, 0.71946895, 0.42310646]]], dtype='float32', stop_gradient=False), )
return inputs


def create_numpy_inputs():
"""
numpy array
"""
inputs = (paddle.to_tensor([[[0.6964692, 0.28613934, 0.22685145]], [[0.5513148, 0.71946895, 0.42310646]]], dtype='float32', stop_gradient=False), )
inputs = (np.array([[[0.6964692, 0.28613934, 0.22685145]], [[0.5513148, 0.71946895, 0.42310646]]]).astype('float32'), )
return inputs

Original file line number Diff line number Diff line change
Expand Up @@ -20,18 +20,25 @@ def forward(self, data, ):
return out


def create_inputspec():
inputspec = (
paddle.static.InputSpec(shape=(-1, -1), dtype=paddle.float32, stop_gradient=False),
)
return inputspec


def create_tensor_inputs():
"""
paddle tensor
"""
inputs = ()
inputs = (paddle.to_tensor([[0.6964692], [0.28613934]], dtype='float32', stop_gradient=False), )
return inputs


def create_numpy_inputs():
"""
numpy array
"""
inputs = (paddle.to_tensor([[0.6964692], [0.28613934]], dtype='float32', stop_gradient=False), )
inputs = (np.array([[0.6964692], [0.28613934]]).astype('float32'), )
return inputs

Original file line number Diff line number Diff line change
Expand Up @@ -20,18 +20,25 @@ def forward(self, data, ):
return out


def create_inputspec():
inputspec = (
paddle.static.InputSpec(shape=(-1, -1, -1), dtype=paddle.float32, stop_gradient=False),
)
return inputspec


def create_tensor_inputs():
"""
paddle tensor
"""
inputs = ()
inputs = (paddle.to_tensor([[[0.6964692, 0.28613934, 0.22685145]], [[0.5513148, 0.71946895, 0.42310646]]], dtype='float32', stop_gradient=False), )
return inputs


def create_numpy_inputs():
"""
numpy array
"""
inputs = (paddle.to_tensor([[[0.6964692, 0.28613934, 0.22685145]], [[0.5513148, 0.71946895, 0.42310646]]], dtype='float32', stop_gradient=False), )
inputs = (np.array([[[0.6964692, 0.28613934, 0.22685145]], [[0.5513148, 0.71946895, 0.42310646]]]).astype('float32'), )
return inputs

Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,13 @@ def forward(self, data, ):
return out


def create_inputspec():
inputspec = (
paddle.static.InputSpec(shape=(-1, -1), dtype=paddle.float32, stop_gradient=False),
)
return inputspec


def create_tensor_inputs():
"""
paddle tensor
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,18 +20,25 @@ def forward(self, data, ):
return out


def create_inputspec():
inputspec = (
paddle.static.InputSpec(shape=(-1, -1), dtype=paddle.float32, stop_gradient=False),
)
return inputspec


def create_tensor_inputs():
"""
paddle tensor
"""
inputs = ()
inputs = (paddle.to_tensor([[0.6964692], [0.28613934]], dtype='float32', stop_gradient=False), )
return inputs


def create_numpy_inputs():
"""
numpy array
"""
inputs = (paddle.to_tensor([[0.6964692], [0.28613934]], dtype='float32', stop_gradient=False), )
inputs = (np.array([[0.6964692], [0.28613934]]).astype('float32'), )
return inputs

Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,13 @@ def forward(self, data, ):
return out


def create_inputspec():
inputspec = (
paddle.static.InputSpec(shape=(-1, -1, -1, -1), dtype=paddle.float32, stop_gradient=False),
)
return inputspec


def create_tensor_inputs():
"""
paddle tensor
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,13 @@ def forward(self, data, ):
return out


def create_inputspec():
inputspec = (
paddle.static.InputSpec(shape=(-1, -1, -1, -1), dtype=paddle.float32, stop_gradient=False),
)
return inputspec


def create_tensor_inputs():
"""
paddle tensor
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,13 @@ def forward(self, data, ):
return out


def create_inputspec():
inputspec = (
paddle.static.InputSpec(shape=(-1, -1, -1, -1), dtype=paddle.float32, stop_gradient=False),
)
return inputspec


def create_tensor_inputs():
"""
paddle tensor
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,13 @@ def forward(self, data, ):
return out


def create_inputspec():
inputspec = (
paddle.static.InputSpec(shape=(-1, -1, -1, -1), dtype=paddle.float32, stop_gradient=False),
)
return inputspec


def create_tensor_inputs():
"""
paddle tensor
Expand Down
Loading
Loading