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

Fix engine not renamed to platform in some tests #535

Merged
merged 4 commits into from
Jan 19, 2022
Merged

Conversation

mlazzarin
Copy link
Contributor

In some tests the old engine member of JitCustomBackend was still used. I renamed it to platform.

Copy link
Member

@stavros11 stavros11 left a comment

Choose a reason for hiding this comment

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

The test_backends_agreement.py is already fixed in #533. benchmarks/main.py is not. Could you please merge this fix in #533?

@@ -50,7 +50,7 @@ def test_backend_methods_list(tested_backend, target_backend, method, args):
tested_func = getattr(tested_backend, method)
target_func = getattr(target_backend, method)
target_result = target_func(*args)
if tested_backend.name == "qibojit" and tested_backend.engine.name in ["cupy", "cuquantum"]: # pragma: no cover
if tested_backend.name == "qibojit" and tested_backend.platform.name in ["cupy", "cuquantum"]: # pragma: no cover
Copy link
Member

@stavros11 stavros11 Jan 19, 2022

Choose a reason for hiding this comment

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

This change is done in #533, in fact I completely removed this if and updated the casting below so that it works with all backends/platforms and we don't have to modify it every time we update something in qibojit.

Copy link
Member

@scarrazza scarrazza left a comment

Choose a reason for hiding this comment

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

Looks good to me, please merge in #533.

@mlazzarin mlazzarin changed the base branch from master to setplatform January 19, 2022 13:39
@mlazzarin mlazzarin merged commit 93434df into setplatform Jan 19, 2022
@scarrazza scarrazza deleted the fixplatform branch January 20, 2022 14:47
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