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 path for PaddleNLP #3020

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
10 changes: 5 additions & 5 deletions framework/e2e/api_benchmark_new/debug_case/bilinear_0.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# -*- coding: utf-8 -*-
# encoding=utf-8 vi:ts=4:sw=4:expandtab:ft=python
"""
test bilinear_0
test Bilinear_0
"""
import timeit
from inspect import isclass
Expand Down Expand Up @@ -43,12 +43,12 @@ def _randtool(dtype, low, high, shape):
assert False, "dtype is not supported"


api = "paddle.nn.functional.bilinear"
api = "paddle.nn.Bilinear"
all_data = {
"x1": {"random": True, "type": "Tensor", "dtype": "float32", "shape": [1, 1], "range": [-1, 1]},
"x2": {"random": True, "type": "Tensor", "dtype": "float32", "shape": [1, 1], "range": [-1, 1]},
"data0": {"random": True, "type": "Tensor", "dtype": "float32", "shape": [1, 1], "range": [-1, 1]},
"data1": {"random": True, "type": "Tensor", "dtype": "float32", "shape": [1, 1], "range": [-1, 1]},
}
params = {"weight": {"random": True, "type": "Tensor", "dtype": "float32", "shape": [1, 1, 1], "range": [-1, 1]}}
params = {"in1_features": 1, "in2_features": 1, "out_features": 1}

inputs = {}
for data, v in all_data.items():
Expand Down
8 changes: 4 additions & 4 deletions framework/e2e/api_benchmark_new/debug_case/celu_0.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# -*- coding: utf-8 -*-
# encoding=utf-8 vi:ts=4:sw=4:expandtab:ft=python
"""
test celu_0
test CELU_0
"""
import timeit
from inspect import isclass
Expand Down Expand Up @@ -43,9 +43,9 @@ def _randtool(dtype, low, high, shape):
assert False, "dtype is not supported"


api = "paddle.nn.functional.celu"
all_data = {"x": {"random": True, "type": "Tensor", "dtype": "float32", "shape": [1, 1, 1, 1], "range": [-1, 1]}}
params = {"alpha": 1.0}
api = "paddle.nn.CELU"
all_data = {"data": {"random": True, "type": "Tensor", "dtype": "float32", "shape": [1, 1, 1], "range": [-1, 1]}}
params = {}

inputs = {}
for data, v in all_data.items():
Expand Down
14 changes: 9 additions & 5 deletions framework/e2e/api_benchmark_new/debug_case/conv1d_0.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# -*- coding: utf-8 -*-
# encoding=utf-8 vi:ts=4:sw=4:expandtab:ft=python
"""
test conv1d_0
test Conv1D_0
"""
import timeit
from inspect import isclass
Expand Down Expand Up @@ -43,13 +43,17 @@ def _randtool(dtype, low, high, shape):
assert False, "dtype is not supported"


api = "paddle.nn.functional.conv1d"
all_data = {"x": {"random": True, "type": "Tensor", "dtype": "float32", "shape": [1, 1, 1], "range": [-1, 1]}}
api = "paddle.nn.Conv1D"
all_data = {"x": {"random": True, "dtype": "float32", "shape": [1, 1, 1], "range": [-1, 1]}}
params = {
"weight": {"random": True, "type": "Tensor", "dtype": "float32", "shape": [1, 1, 1], "range": [-1, 1]},
"bias": {"random": True, "type": "Tensor", "dtype": "float32", "shape": [1], "range": [-1, 1]},
"in_channels": 1,
"out_channels": 1,
"kernel_size": 1,
"stride": 1,
"padding": 0,
"dilation": 1,
"groups": 1,
"padding_mode": "zeros",
}

inputs = {}
Expand Down
13 changes: 4 additions & 9 deletions framework/e2e/api_benchmark_new/debug_case/conv2d_0.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# -*- coding: utf-8 -*-
# encoding=utf-8 vi:ts=4:sw=4:expandtab:ft=python
"""
test conv2d_0
test Conv2D_0
"""
import timeit
from inspect import isclass
Expand Down Expand Up @@ -43,14 +43,9 @@ def _randtool(dtype, low, high, shape):
assert False, "dtype is not supported"


api = "paddle.nn.functional.conv2d"
all_data = {"x": {"random": True, "type": "Tensor", "dtype": "float32", "shape": [1, 1, 1, 1], "range": [-1, 1]}}
params = {
"weight": {"random": True, "type": "Tensor", "dtype": "float32", "shape": [1, 1, 1, 1], "range": [-1, 1]},
"bias": {"random": True, "type": "Tensor", "dtype": "float32", "shape": [1], "range": [-1, 1]},
"stride": 1,
"padding": 0,
}
api = "paddle.nn.Conv2D"
all_data = {"x": {"random": True, "dtype": "float32", "shape": [1, 1, 1, 1], "range": [-1, 1]}}
params = {"in_channels": 1, "out_channels": 1, "kernel_size": 1, "stride": 1, "padding": 0, "dilation": 1, "groups": 1}

inputs = {}
for data, v in all_data.items():
Expand Down
14 changes: 9 additions & 5 deletions framework/e2e/api_benchmark_new/debug_case/conv3d_0.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# -*- coding: utf-8 -*-
# encoding=utf-8 vi:ts=4:sw=4:expandtab:ft=python
"""
test conv3d_0
test Conv3D_0
"""
import timeit
from inspect import isclass
Expand Down Expand Up @@ -43,13 +43,17 @@ def _randtool(dtype, low, high, shape):
assert False, "dtype is not supported"


api = "paddle.nn.functional.conv3d"
all_data = {"x": {"random": True, "type": "Tensor", "dtype": "float32", "shape": [1, 1, 1, 1, 1], "range": [-1, 1]}}
api = "paddle.nn.Conv3D"
all_data = {"x": {"random": True, "dtype": "float32", "shape": [1, 1, 1, 1, 1], "range": [-1, 1]}}
params = {
"weight": {"random": True, "type": "Tensor", "dtype": "float32", "shape": [1, 1, 1, 1, 1], "range": [-1, 1]},
"bias": {"random": True, "type": "Tensor", "dtype": "float32", "shape": [1], "range": [-1, 1]},
"in_channels": 1,
"out_channels": 1,
"kernel_size": 1,
"stride": 1,
"padding": 0,
"dilation": 1,
"groups": 1,
"padding_mode": "zeros",
}

inputs = {}
Expand Down
8 changes: 4 additions & 4 deletions framework/e2e/api_benchmark_new/debug_case/dropout2d_0.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# -*- coding: utf-8 -*-
# encoding=utf-8 vi:ts=4:sw=4:expandtab:ft=python
"""
test dropout2d_0
test Dropout2D_0
"""
import timeit
from inspect import isclass
Expand Down Expand Up @@ -43,9 +43,9 @@ def _randtool(dtype, low, high, shape):
assert False, "dtype is not supported"


api = "paddle.nn.functional.dropout2d"
all_data = {"x": {"random": True, "type": "Tensor", "dtype": "float32", "shape": [1, 1, 1, 1], "range": [-1, 1]}}
params = {"p": 0.5, "training": False}
api = "paddle.nn.Dropout2D"
all_data = {"x": {"random": True, "dtype": "float32", "shape": [1, 1, 1, 1], "range": [-1, 1]}}
params = {"p": 0.5}

inputs = {}
for data, v in all_data.items():
Expand Down
8 changes: 4 additions & 4 deletions framework/e2e/api_benchmark_new/debug_case/dropout3d_0.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# -*- coding: utf-8 -*-
# encoding=utf-8 vi:ts=4:sw=4:expandtab:ft=python
"""
test dropout3d_0
test Dropout3D_0
"""
import timeit
from inspect import isclass
Expand Down Expand Up @@ -43,9 +43,9 @@ def _randtool(dtype, low, high, shape):
assert False, "dtype is not supported"


api = "paddle.nn.functional.dropout3d"
all_data = {"x": {"random": True, "type": "Tensor", "dtype": "float32", "shape": [1, 1, 1, 1, 1], "range": [-1, 1]}}
params = {"p": 0.5, "training": False}
api = "paddle.nn.Dropout3D"
all_data = {"data": {"random": True, "type": "Tensor", "dtype": "float32", "shape": [1, 1, 1, 1, 1], "range": [-1, 1]}}
params = {"p": 0.5}

inputs = {}
for data, v in all_data.items():
Expand Down
4 changes: 2 additions & 2 deletions framework/e2e/api_benchmark_new/debug_case/dropout_0.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# -*- coding: utf-8 -*-
# encoding=utf-8 vi:ts=4:sw=4:expandtab:ft=python
"""
test dropout_0
test Dropout_0
"""
import timeit
from inspect import isclass
Expand Down Expand Up @@ -43,7 +43,7 @@ def _randtool(dtype, low, high, shape):
assert False, "dtype is not supported"


api = "paddle.nn.functional.dropout"
api = "paddle.nn.Dropout"
all_data = {"x": {"random": True, "dtype": "float32", "shape": [1, 1, 1, 1], "range": [-1, 1]}}
params = {"p": 0.5}

Expand Down
6 changes: 3 additions & 3 deletions framework/e2e/api_benchmark_new/debug_case/elu_0.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# -*- coding: utf-8 -*-
# encoding=utf-8 vi:ts=4:sw=4:expandtab:ft=python
"""
test elu_0
test ELU_0
"""
import timeit
from inspect import isclass
Expand Down Expand Up @@ -43,8 +43,8 @@ def _randtool(dtype, low, high, shape):
assert False, "dtype is not supported"


api = "paddle.nn.functional.elu"
all_data = {"x": {"random": True, "type": "Tensor", "dtype": "float32", "shape": [1, 1, 1, 1], "range": [-1, 1]}}
api = "paddle.nn.ELU"
all_data = {"x": {"random": True, "dtype": "float32", "shape": [1, 1, 1, 1], "range": [-1, 1]}}
params = {"alpha": 1.0}

inputs = {}
Expand Down
12 changes: 4 additions & 8 deletions framework/e2e/api_benchmark_new/debug_case/embedding_0.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# -*- coding: utf-8 -*-
# encoding=utf-8 vi:ts=4:sw=4:expandtab:ft=python
"""
test embedding_0
test Embedding_0
"""
import timeit
from inspect import isclass
Expand Down Expand Up @@ -43,13 +43,9 @@ def _randtool(dtype, low, high, shape):
assert False, "dtype is not supported"


api = "paddle.nn.functional.embedding"
all_data = {"x": {"random": True, "type": "Tensor", "dtype": "int32", "shape": [1, 1], "range": [0, 1]}}
params = {
"weight": {"random": True, "type": "Tensor", "dtype": "float32", "shape": [1, 1], "range": [-1, 1]},
"padding_idx": -1,
"sparse": False,
}
api = "paddle.nn.Embedding"
all_data = {"x": {"random": True, "dtype": "int32", "shape": [1, 1, 1, 1], "range": [0, 3]}}
params = {"num_embeddings": 4, "embedding_dim": 4, "padding_idx": None, "sparse": False}

inputs = {}
for data, v in all_data.items():
Expand Down
8 changes: 4 additions & 4 deletions framework/e2e/api_benchmark_new/debug_case/flatten_0.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# -*- coding: utf-8 -*-
# encoding=utf-8 vi:ts=4:sw=4:expandtab:ft=python
"""
test flatten_0
test Flatten_0
"""
import timeit
from inspect import isclass
Expand Down Expand Up @@ -43,9 +43,9 @@ def _randtool(dtype, low, high, shape):
assert False, "dtype is not supported"


api = "paddle.flatten"
all_data = {"x": {"random": True, "type": "Tensor", "dtype": "float32", "shape": [1, 1, 1, 1], "range": [-1, 1]}}
params = {}
api = "paddle.nn.Flatten"
all_data = {"x": {"random": True, "dtype": "float32", "shape": [1, 1, 1, 1], "range": [-1, 1]}}
params = {"start_axis": 1, "stop_axis": -1}

inputs = {}
for data, v in all_data.items():
Expand Down
8 changes: 4 additions & 4 deletions framework/e2e/api_benchmark_new/debug_case/gelu_0.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# -*- coding: utf-8 -*-
# encoding=utf-8 vi:ts=4:sw=4:expandtab:ft=python
"""
test gelu_0
test GELU_0
"""
import timeit
from inspect import isclass
Expand Down Expand Up @@ -43,9 +43,9 @@ def _randtool(dtype, low, high, shape):
assert False, "dtype is not supported"


api = "paddle.nn.functional.gelu"
all_data = {"x": {"random": True, "type": "Tensor", "dtype": "float32", "shape": [1, 1, 1, 1], "range": [-2, 5]}}
params = {"approximate": False}
api = "paddle.nn.GELU"
all_data = {"x": {"random": True, "dtype": "float32", "shape": [1, 1, 1, 1], "range": [-1, 1]}}
params = {}

inputs = {}
for data, v in all_data.items():
Expand Down
8 changes: 4 additions & 4 deletions framework/e2e/api_benchmark_new/debug_case/hardshrink_0.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# -*- coding: utf-8 -*-
# encoding=utf-8 vi:ts=4:sw=4:expandtab:ft=python
"""
test hardshrink_0
test Hardshrink_0
"""
import timeit
from inspect import isclass
Expand Down Expand Up @@ -43,9 +43,9 @@ def _randtool(dtype, low, high, shape):
assert False, "dtype is not supported"


api = "paddle.nn.functional.hardshrink"
all_data = {"x": {"random": True, "type": "Tensor", "dtype": "float32", "shape": [1, 1, 1, 1], "range": [-1, 1]}}
params = {"threshold": 0.75}
api = "paddle.nn.Hardshrink"
all_data = {"data": {"random": False, "type": "Tensor", "dtype": "float32", "value": [-1, 0.3, 2.5]}}
params = {}

inputs = {}
for data, v in all_data.items():
Expand Down
8 changes: 4 additions & 4 deletions framework/e2e/api_benchmark_new/debug_case/hardsigmoid_0.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# -*- coding: utf-8 -*-
# encoding=utf-8 vi:ts=4:sw=4:expandtab:ft=python
"""
test hardsigmoid_0
test Hardsigmoid_0
"""
import timeit
from inspect import isclass
Expand Down Expand Up @@ -43,9 +43,9 @@ def _randtool(dtype, low, high, shape):
assert False, "dtype is not supported"


api = "paddle.nn.functional.hardsigmoid"
all_data = {"x": {"random": True, "type": "Tensor", "dtype": "float32", "shape": [1, 1, 1, 1], "range": [-2, 5]}}
params = {"slope": 0.1666667, "offset": 0.5}
api = "paddle.nn.Hardsigmoid"
all_data = {"data": {"random": True, "type": "Tensor", "dtype": "float32", "shape": [1, 1], "range": [-1, 1]}}
params = {}

inputs = {}
for data, v in all_data.items():
Expand Down
6 changes: 3 additions & 3 deletions framework/e2e/api_benchmark_new/debug_case/hardswish_0.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# -*- coding: utf-8 -*-
# encoding=utf-8 vi:ts=4:sw=4:expandtab:ft=python
"""
test hardswish_0
test Hardswish_0
"""
import timeit
from inspect import isclass
Expand Down Expand Up @@ -43,8 +43,8 @@ def _randtool(dtype, low, high, shape):
assert False, "dtype is not supported"


api = "paddle.nn.functional.hardswish"
all_data = {"x": {"random": True, "type": "Tensor", "dtype": "float32", "shape": [1, 1, 1, 1], "range": [-2, 5]}}
api = "paddle.nn.Hardswish"
all_data = {"data": {"random": True, "type": "Tensor", "dtype": "float32", "shape": [1, 1, 1], "range": [-1, 1]}}
params = {}

inputs = {}
Expand Down
8 changes: 4 additions & 4 deletions framework/e2e/api_benchmark_new/debug_case/hardtanh_0.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# -*- coding: utf-8 -*-
# encoding=utf-8 vi:ts=4:sw=4:expandtab:ft=python
"""
test hardtanh_0
test Hardtanh_0
"""
import timeit
from inspect import isclass
Expand Down Expand Up @@ -43,9 +43,9 @@ def _randtool(dtype, low, high, shape):
assert False, "dtype is not supported"


api = "paddle.nn.functional.hardtanh"
all_data = {"x": {"random": True, "type": "Tensor", "dtype": "float32", "shape": [1, 1, 1, 1], "range": [-1, 1]}}
params = {"min": -1.0, "max": 1.0}
api = "paddle.nn.Hardtanh"
all_data = {"data": {"random": False, "type": "Tensor", "dtype": "float32", "value": [-1.5, 0.3, 2.5]}}
params = {}

inputs = {}
for data, v in all_data.items():
Expand Down
11 changes: 4 additions & 7 deletions framework/e2e/api_benchmark_new/debug_case/linear_0.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# -*- coding: utf-8 -*-
# encoding=utf-8 vi:ts=4:sw=4:expandtab:ft=python
"""
test linear_0
test Linear_0
"""
import timeit
from inspect import isclass
Expand Down Expand Up @@ -43,12 +43,9 @@ def _randtool(dtype, low, high, shape):
assert False, "dtype is not supported"


api = "paddle.nn.functional.linear"
all_data = {"x": {"random": True, "type": "Tensor", "dtype": "float32", "shape": [1, 1], "range": [-1, 1]}}
params = {
"weight": {"random": True, "type": "Tensor", "dtype": "float32", "shape": [1, 1], "range": [-1, 1]},
"bias": {"random": True, "type": "Tensor", "dtype": "float32", "shape": [1], "range": [-1, 1]},
}
api = "paddle.nn.Linear"
all_data = {"x": {"random": True, "dtype": "float32", "shape": [1, 1], "range": [-1, 1]}}
params = {"in_features": 1, "out_features": 1}

inputs = {}
for data, v in all_data.items():
Expand Down
Loading