Skip to content

Add and/or reduce support to VMLA - #3896

Merged
rsuderman merged 2 commits into
iree-org:mainfrom
rsuderman:test_342988240
Nov 19, 2020
Merged

rsuderman merged 2 commits into
iree-org:mainfrom
rsuderman:test_342988240

Conversation

@rsuderman

Copy link
Copy Markdown
Collaborator

Handles the tf.math.reduce_any and tf.math.reduce_all operations.
Added a reduce_test.py file to check all reductions.

@GMNGeoffrey

Copy link
Copy Markdown
Member

@phoenix-meadowlark is there a pithier way to write TF tests now?

@phoenix-meadowlark

phoenix-meadowlark commented Nov 18, 2020 •

Copy link
Copy Markdown
Contributor

Yes, though all of these tests are auto-generated by #3826 and I'll delete them in a merge commit as soon as they land, so there's probably not much point in changing them 😅

It does make writing tests like these a lot less tedious though. See:

@rsuderman

Copy link
Copy Markdown
Collaborator Author

Yes, though all of these tests are auto-generated by #3826 and I'll delete them in a merge commit as soon as they land, so there's probably not much point in changing them

It does make writing tests like these a lot less tedious though. See:

I assume you feed random data as an input? For min/max/sum I can see this working but guaranteeing coverage on binary operation seems a little trickier.

@phoenix-meadowlark

phoenix-meadowlark commented Nov 18, 2020 •

Copy link
Copy Markdown
Contributor

Yes, though all of these tests are auto-generated by #3826 and I'll delete them in a merge commit as soon as they land, so there's probably not much point in changing them
It does make writing tests like these a lot less tedious though. See:

I assume you feed random data as an input? For min/max/sum I can see this working but guaranteeing coverage on binary operation seems a little trickier.

Good point! You can specify input_args as well, so for any and all I'll add tests of all false and all true respectively. tf.math.reduce_any(uniform([2] * 7, np.bool), axis=1) is pretty unlikely to not return any False values, but best to not let our coverage depend on the seed.

rsuderman and others added 2 commits November 18, 2020 17:14
Handles the tf.math.reduce_any and tf.math.reduce_all operations.
Added a reduce_test.py file to check all reductions.
@rsuderman
rsuderman merged commit 5c70bcc into iree-org:main Nov 19, 2020
@rsuderman
rsuderman deleted the test_342988240 branch November 19, 2020 18:52
bjacob pushed a commit to bjacob/iree that referenced this pull request Nov 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants