RemoteJIT#

class rbc.remotejit.RemoteJIT(host='localhost', port=11532, local=False, debug=False)#

RemoteJIT is a decorator generator for user functions to be remotely JIT compiled.

To use, define

rjit = RemoteJIT(host='localhost', port=6274)

@rjit
def foo(a: int, b: int) -> int:
    return a + b

@rjit('double(double, double)',
      'int64(int64, int64)')
def bar(a, b):
    return a + b

# Finally, call
c = foo(1, 2) # c = 3
b = bar(7.0, 1.0) # b = 8.0

The sum will be evaluated in the remote host.

Attributes

RemoteJIT.client

Return remote host connection as Client instance.

RemoteJIT.default_remote_call_hold

RemoteJIT.have_last_compile

Check if compile data exists.

RemoteJIT.local

RemoteJIT.multiplexed

RemoteJIT.supports_local_caller

RemoteJIT.targets

Return device-target_info mapping of the remote server.

RemoteJIT.thrift_content

RemoteJIT.typesystem_aliases

Methods

RemoteJIT.__init__([host, port, local, debug])

Construct remote JIT function decorator.

RemoteJIT.add_caller(caller)

RemoteJIT.caller_signature(signature)

Return signature of a caller.

RemoteJIT.check_function_type_supports_device(...)

Check if function type can be supported by the specified device.

RemoteJIT.discard_last_compile()

Discard compile data.

RemoteJIT.format_type(typ)

Convert typesystem type to formatted string.

RemoteJIT.get_caller(name)

RemoteJIT.get_callers()

RemoteJIT.get_pending_names()

Return the names of functions that have not been registered to the remote server.

RemoteJIT.get_types(*values)

Convert values to the corresponding typesystem types.

RemoteJIT.normalize_function_type(ftype)

Apply RemoteJIT specific hooks to normalized function Type.

RemoteJIT.preprocess_callable(func)

Preprocess func to be used as a remotejit function definition.

RemoteJIT.python(statement)

Execute Python statement remotely.

RemoteJIT.remote_call(func, ftype, arguments)

Call function remotely on given arguments.

RemoteJIT.remote_compile(func, ftype, ...)

Remote compile function and signatures to machine code.

RemoteJIT.reset()

Drop all callers definitions and compilation results.

RemoteJIT.retrieve_targets()

Retrieve target device information from remote client.

RemoteJIT.set_last_compile(compile_data)

Save compile data.

RemoteJIT.start_server([background])

Start remotejit server from client.

RemoteJIT.stop_server()

Stop remotejit server from client.