Exemplo n.º 1
0
def rjit(request):
    local = False
    rjit = RemoteJIT(debug=not True, local=local)
    if not local:
        rjit.start_server(background=True)
        request.addfinalizer(rjit.stop_server)
        atexit.register(rjit.stop_server)
    return rjit
Exemplo n.º 2
0
def with_localjit(test_func):
    ljit = RemoteJIT(local=True)
    device = tuple(ljit.targets)[0]
    target_info = ljit.targets[device]

    def test_func_():
        with target_info:
            return test_func(ljit)
    return test_func_
Exemplo n.º 3
0
def ljit(request):
    ljit = RemoteJIT(debug=not True, local=True)
    return ljit
Exemplo n.º 4
0
def rjit(request):
    rjit = RemoteJIT(debug=True)
    rjit.start_server(background=True)
    request.addfinalizer(rjit.stop_server)
    atexit.register(rjit.stop_server)
    return rjit
Exemplo n.º 5
0
def djit():
    """
    Debug JIT: a RemoteJIT() which automatically uses tracing_allocator and
    detects memory leaks
    """
    return RemoteJIT(local=True, debug=True, use_tracing_allocator=True)