Skip to content

Clone your own voice on your own computer: speak any text in 60+ languages and dub videos into another language in your voice. Fully local. Early version.

759 B
Raw Blame
from mimvox_engine import config

AMD = {"device": {"backend": "cuda", "vendor": "amd"}}
NVIDIA = {"device": {"backend": "cuda", "vendor": "nvidia"}}
AMD_ON_CPU = {"device": {"backend": "cpu", "vendor": "amd"}}


def test_an_amd_gpu_skips_miopen_timing():
    environ = {}
    config.skip_miopen_timing(AMD, environ)
    assert environ == {"MIOPEN_FIND_MODE": "FAST"}


def test_a_find_mode_already_set_is_kept():
    environ = {"MIOPEN_FIND_MODE": "NORMAL"}
    config.skip_miopen_timing(AMD, environ)
    assert environ == {"MIOPEN_FIND_MODE": "NORMAL"}


def test_other_devices_leave_the_environment_alone():
    for runtime in (NVIDIA, AMD_ON_CPU, {}):
        environ = {}
        config.skip_miopen_timing(runtime, environ)
        assert environ == {}