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

Add tests for logical operations #14

Merged
merged 3 commits into from
Nov 21, 2024
Merged

Add tests for logical operations #14

merged 3 commits into from
Nov 21, 2024

Conversation

mmanzoorTT
Copy link
Contributor

@mmanzoorTT mmanzoorTT commented Oct 31, 2024

  • Update backend to convert unsupported types to supported types for hardware
  • Update testing infrastructure to generate boolean inputs
  • Add tests for logical operations (and, not, or, xor)

@mmanzoorTT mmanzoorTT force-pushed the mmanzoor/logical-tests branch 3 times, most recently from 8b13262 to fe2cf05 Compare November 5, 2024 21:52
@mmanzoorTT mmanzoorTT force-pushed the mmanzoor/logical-tests branch from fe2cf05 to 6e889cc Compare November 8, 2024 01:12
tests/test_compare.py Outdated Show resolved Hide resolved
@@ -314,6 +314,14 @@ def run_gm_op_by_op(self, *inputs):
return outputs

def __call__(self, *inputs):
new_inputs = ()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm sure we'll need more of these conversions. Can you make a dict outside of the scope of this function that makes it clear what we're converting to what?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the suggestion. I have added a dictionary for type conversions. Currently, I am only adding boolean->bflaot16; we can add more type conversions later. We only need to add entries in the dictionary.

@mmanzoorTT mmanzoorTT force-pushed the mmanzoor/logical-tests branch 3 times, most recently from 8ed2f62 to 6efc4a7 Compare November 21, 2024 18:32
@mmanzoorTT mmanzoorTT force-pushed the mmanzoor/logical-tests branch from 6efc4a7 to 4a2baba Compare November 21, 2024 18:34
@mmanzoorTT mmanzoorTT changed the title Add unit tests Add tests for logical operations Nov 21, 2024
@mmanzoorTT mmanzoorTT enabled auto-merge (rebase) November 21, 2024 18:43
@mmanzoorTT mmanzoorTT merged commit 7438c45 into main Nov 21, 2024
4 checks passed
@mmanzoorTT mmanzoorTT deleted the mmanzoor/logical-tests branch November 21, 2024 18:57
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.

2 participants