We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
We should make better fixtures that would automatically replicate shortfin tests across CPU / GPU / multi-gpu / etc
Using this pytest hack:
# Dynamic Parameterization for lsys Fixture def pytest_generate_tests(metafunc): if "generic_lsys" in metafunc.fixturenames: system = metafunc.config.getoption("--system") if system == "amdgpu": params = ["cpu", "amdgpu"] else: params = [system] metafunc.parametrize("generic_lsys", params, indirect=True)
We can make this fixture automatically test every test that uses it on not just CPU, but also GPU where available.
@pytest.fixture(scope="session") def generic_lsys(request): system_type = request.param if system_type == "cpu" or system_type == "hostcpu": sc = sf.host.CPUSystemBuilder() elif system_type == "amdgpu": sc = sf.amdgpu.SystemBuilder() lsys = sc.create_system() yield lsys lsys.shutdown()
The text was updated successfully, but these errors were encountered:
No branches or pull requests
We should make better fixtures that would automatically replicate shortfin tests across CPU / GPU / multi-gpu / etc
Using this pytest hack:
We can make this fixture automatically test every test that uses it on not just CPU, but also GPU where available.
The text was updated successfully, but these errors were encountered: