-
Notifications
You must be signed in to change notification settings - Fork 5.7k
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 segment_sum function to math.py #21907
Changes from all commits
cc02bea
16f1fd6
85c6628
cc0424f
7238e07
263602d
8b11c42
ae97f86
530cf8f
36e0bee
e71e241
125b9dc
8edfec7
a4e5340
bbb0793
c96f16c
4f1d84d
7e5b24b
c196ef2
a5a0fb6
1c9a7d3
0f5b384
cfe8810
d5c6fa9
baca3df
55d364f
c3f214a
b78280b
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 |
---|---|---|
|
@@ -1940,6 +1940,43 @@ def test_tensorflow_rsqrt( | |
x=x[0], | ||
) | ||
|
||
#segment_sum | ||
@handle_frontend_test( | ||
fn_tree="tensorflow.math.segment_sum", | ||
dtype_and_data=helpers.dtype_and_values( | ||
available_dtypes=helpers.get_dtypes("numeric"), | ||
shape = (5, 6), | ||
), | ||
dtype_and_segment=helpers.dtype_and_values( | ||
available_dtypes=["int32", "int64"], | ||
shape = (5, ), | ||
min_value = 0, | ||
max_value = 4, | ||
), | ||
test_with_out=st.just(False), | ||
) | ||
def test_tensorflow_segment_sum( | ||
*, | ||
dtype_and_data, | ||
dtype_and_segment, | ||
frontend, | ||
test_flags, | ||
fn_tree, | ||
backend_fw, | ||
on_device, | ||
): | ||
data_dtype, data = dtype_and_data | ||
segment_dtype, segment_ids = dtype_and_segment | ||
helpers.test_frontend_function( | ||
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. The tests are still failing. It shows
To the kwarg |
||
input_dtypes=data_dtype + segment_dtype, | ||
frontend=frontend, | ||
backend_to_test=backend_fw, | ||
test_flags=test_flags, | ||
fn_tree=fn_tree, | ||
on_device=on_device, | ||
data=data[0], | ||
segment_ids=ivy.sort(segment_ids[0]), | ||
) | ||
|
||
# nextafter | ||
@handle_frontend_test( | ||
|
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.
Hello! The test is failing for all backends. You can see the stacktrace and error in the details section of the intelligent-tests (1)
Let me know if you have any questions!