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

Paddlecreation2 #23049

Closed
wants to merge 54 commits into from
Closed
Show file tree
Hide file tree
Changes from 5 commits
Commits
Show all changes
54 commits
Select commit Hold shift + click to select a range
7286ad6
Update test_creation.py
Novendobi Sep 4, 2023
216ac86
Update creation.py
Novendobi Sep 4, 2023
046cc89
Merge branch 'unifyai:main' into paddlecreation2
Novendobi Sep 6, 2023
1928c37
Merge branch 'unifyai:main' into paddlecreation2
Novendobi Sep 6, 2023
10d2ca5
Update creation.py
Novendobi Sep 6, 2023
1129ad4
Update test_creation.py
Novendobi Sep 7, 2023
90db544
Merge branch 'unifyai:main' into paddlecreation2
Novendobi Sep 7, 2023
68dcb03
Update creation.py
Novendobi Sep 7, 2023
f4c6bf8
Update test_creation.py
Novendobi Sep 7, 2023
e5cf930
Update test_creation.py
Novendobi Sep 7, 2023
7844db8
Update test_creation.py
Novendobi Sep 7, 2023
eaeb6b5
Update test_creation.py
Novendobi Sep 7, 2023
6b1b9b4
Update creation.py
Novendobi Sep 7, 2023
f7731a7
Update test_creation.py
Novendobi Sep 7, 2023
1b1ee63
Update test_creation.py
Novendobi Sep 7, 2023
3abea84
Update creation.py
Novendobi Sep 7, 2023
9b9b9fe
Update creation.py
Novendobi Sep 7, 2023
6a538be
Update test_creation.py
Novendobi Sep 7, 2023
b8ba406
Update test_creation.py
Novendobi Sep 7, 2023
5208eec
Update test_creation.py
Novendobi Sep 7, 2023
532c797
Update test_creation.py
Novendobi Sep 7, 2023
c068074
Update test_creation.py
Novendobi Sep 7, 2023
b08de65
Update creation.py
Novendobi Sep 7, 2023
d62c13c
Update test_creation.py
Novendobi Sep 7, 2023
67e4e46
Update test_creation.py
Novendobi Sep 7, 2023
18fdcd7
Update test_creation.py
Novendobi Sep 7, 2023
c37a961
Update test_creation.py
Novendobi Sep 7, 2023
49fd82d
Update test_creation.py
Novendobi Sep 7, 2023
0339863
Update test_creation.py
Novendobi Sep 7, 2023
903dc21
Update test_creation.py
Novendobi Sep 7, 2023
40ef074
Merge branch 'unifyai:main' into paddlecreation2
Novendobi Sep 7, 2023
5d7af04
Update test_creation.py
Novendobi Sep 7, 2023
45c7c7b
Update test_creation.py
Novendobi Sep 7, 2023
e019f8f
Update test_creation.py
Novendobi Sep 7, 2023
8c6e874
Update test_creation.py
Novendobi Sep 8, 2023
44f9eb8
Update test_creation.py
Novendobi Sep 8, 2023
e680550
Update test_creation.py
Novendobi Sep 8, 2023
8b88892
Update test_creation.py
Novendobi Sep 8, 2023
292fb4b
Update test_creation.py
Novendobi Sep 8, 2023
3e72fe8
Update test_creation.py
Novendobi Sep 8, 2023
4e640f4
Update test_creation.py
Novendobi Sep 8, 2023
f121f1c
Update creation.py
Novendobi Sep 8, 2023
70aad7d
Update test_creation.py
Novendobi Sep 8, 2023
a327f17
Update test_creation.py
Novendobi Sep 8, 2023
2639519
Update creation.py
Novendobi Sep 8, 2023
79848eb
Update test_creation.py
Novendobi Sep 8, 2023
69447ee
Update creation.py
Novendobi Sep 8, 2023
8b7a9a4
Update test_creation.py
Novendobi Sep 8, 2023
ac7ef2e
Update creation.py
Novendobi Sep 8, 2023
c5baf5d
Update test_creation.py
Novendobi Sep 8, 2023
81a5f7f
Update creation.py
Novendobi Sep 8, 2023
c8c53d7
Update test_creation.py
Novendobi Sep 8, 2023
6ca5059
Update creation.py
Novendobi Sep 8, 2023
a8b5dca
Update test_creation.py
Novendobi Sep 8, 2023
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
12 changes: 12 additions & 0 deletions ivy/functional/frontends/paddle/tensor/creation.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,18 @@ def ones_like(x, /, *, dtype=None, name=None):
return ivy.ones_like(x, dtype=dtype)


# []-22965
@with_supported_dtypes(
{"2.5.1 and below": ("float32", "float64", "int32", "int64", "float16", "unint16")},
"paddle",
)
@to_ivy_arrays_and_back
def random_uniform(low, high, shape, device=None, dtype=None):
return ivy.random_uniform(
low=low, high=high, shape=shape, device=device, dtype=dtype
)


@to_ivy_arrays_and_back
def to_tensor(data, /, *, dtype=None, place=None, stop_gradient=True):
array = ivy.array(data, dtype=dtype, device=place)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -559,6 +559,37 @@ def test_paddle_ones_like(
)


# random_uniform
@handle_frontend_test(
fn_tree="paddle.random_uniform",
dtype_and_shape=helpers.dtype_and_values(
available_dtypes=helpers.get_dtypes("valid"), ret_shape=True
),
test_with_out=st.just(False),
)
def test_paddle_random_uniform(
*,
dtype_and_shape,
on_device,
fn_tree,
backend_fw,
frontend,
test_flags,
):
input_dtype, x, shape = dtype_and_shape

helpers.test_frontend_function(
input_dtypes=input_dtype,
backend_to_test=backend_fw,
frontend=frontend,
test_flags=test_flags,
fn_tree=fn_tree,
on_device=on_device,
test_values=False,
shape=shape,
)


# Tests #
# ----- #

Expand Down