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

added cos function in jax frontend #3488

Merged
merged 26 commits into from
Aug 26, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
c148815
added cos function in jax frontend
emekaokoli19 Aug 23, 2022
01824df
Merge branch 'master' into master
emekaokoli19 Aug 23, 2022
7cca7fe
Merge branch 'master' into master
emekaokoli19 Aug 23, 2022
73e5ea9
Merge branch 'unifyai:master' into master
emekaokoli19 Aug 23, 2022
e32b62b
Update ivy.iml
emekaokoli19 Aug 23, 2022
a58522d
Update misc.xml
emekaokoli19 Aug 23, 2022
5e322fd
Delete ivy.iml
emekaokoli19 Aug 23, 2022
2c76477
Create ivy.iml
emekaokoli19 Aug 23, 2022
2418721
Delete ivy.iml
emekaokoli19 Aug 23, 2022
302d4d3
Create ivy.iml
emekaokoli19 Aug 23, 2022
02dca2b
Merge branch 'master' into master
emekaokoli19 Aug 24, 2022
36d6353
Merge branch 'master' into master
emekaokoli19 Aug 24, 2022
176ae4d
Merge branch 'master' into master
emekaokoli19 Aug 24, 2022
6a6b8b1
Added .idea to gitignore
emekaokoli19 Aug 24, 2022
ca95af7
Merge branch 'master' into master
emekaokoli19 Aug 24, 2022
7038ac3
Merge branch 'master' into master
emekaokoli19 Aug 24, 2022
0bd8583
Merge branch 'master' of https://github.com/emekaokoli19/ivy
emekaokoli19 Aug 24, 2022
0f13a32
removing changes in idea
emekaokoli19 Aug 24, 2022
6eeca97
Merge branch 'unifyai:master' into master
emekaokoli19 Aug 24, 2022
57b81be
Update ivy.iml
emekaokoli19 Aug 24, 2022
5fe3134
Update .gitignore
emekaokoli19 Aug 24, 2022
dfa0524
Update misc.xml
emekaokoli19 Aug 24, 2022
14af3c1
Merge branch 'unifyai:master' into master
emekaokoli19 Aug 24, 2022
d54d74d
more changes
emekaokoli19 Aug 24, 2022
afbfba2
last fix
emekaokoli19 Aug 24, 2022
8b4d1ab
Merge branch 'master' into master
emekaokoli19 Aug 25, 2022
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
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@ with_time_logs/
.hypothesis
.array_api_tests_k_flag*
internal_automation_tools/
.vscode/*
.vscode/*
2 changes: 1 addition & 1 deletion .idea/ivy.iml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions ivy/functional/frontends/jax/lax/operators.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,13 @@ def atan(x):
atan.unsupported_dtypes = {"torch": ("float16",)}


def cos(x):
return ivy.cos(x)


cos.unsupported_dtypes = {"torch": ("float16",)}


def ceil(x):
return ivy.ceil(x)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1360,7 +1360,7 @@ def test_jax_lax_cosh(
fw,
):
input_dtype, x = dtype_and_x

helpers.test_frontend_function(
input_dtypes=input_dtype,
as_variable_flags=as_variable,
Expand Down Expand Up @@ -1503,3 +1503,34 @@ def test_jax_lax_gt(
x=xs[0],
y=xs[1],
)


# cos
@handle_cmd_line_args
@given(
dtype_and_x=helpers.dtype_and_values(available_dtypes=ivy_jax.valid_float_dtypes),
as_variable=st.booleans(),
num_positional_args=helpers.num_positional_args(
fn_name="ivy.functional.frontends.jax.lax.cos"
),
native_array=st.booleans(),
)
def test_jax_lax_cos(
dtype_and_x,
as_variable,
num_positional_args,
native_array,
fw,
):
input_dtype, x = dtype_and_x
helpers.test_frontend_function(
input_dtypes=input_dtype,
as_variable_flags=as_variable,
with_out=False,
num_positional_args=num_positional_args,
native_array_flags=native_array,
fw=fw,
frontend="jax",
fn_tree="lax.cos",
x=np.asarray(x, dtype=input_dtype),
)