def set_backend(name, unsafe=False):
    if (backend.is_unified() == False and unsafe == False):
        raise RuntimeError("Can not change backend after loading %s" % name)

    if (backend.is_unified()):
        safe_call(backend.get().af_set_backend(backend.get_id(name)))
    else:
        backend.set_unsafe(name)
    return
Set a specific backend by name
dataset/ETHPy150Open arrayfire/arrayfire-python/arrayfire/library.py/set_backend