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
Return remote host connection as Client instance.
Check if compile data exists.
Return device-target_info mapping of the remote server.
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.
Check if function type can be supported by the specified device.
Discard compile data.
Convert typesystem type to formatted string.
RemoteJIT.get_caller
(name)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.
Apply RemoteJIT specific hooks to normalized function Type.
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.
Drop all callers definitions and compilation results.
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.
Stop remotejit server from client.