RemoteJIT.set_last_compile#

RemoteJIT.set_last_compile(compile_data)#

Save compile data.

The caller is responsible for discarding previous compiler data by calling discard_last_compile method.

Parameters:

compile_data (object) – Compile data can be any Python object. When None, it is interpreted as no compile data is available.

Notes

The have/discard/set_last_compile methods provide a way to avoid unnecessary compilations when the remote server supports registration of compiled functions. The corresponding register method is expected to use the following pattern:

def register(self):
    if self.have_last_compile:
        return
    <compile defined functions>
    self.set_last_compile(<compilation results>)

The discard_last_compile() method is called when the compile data becomes obsolete or needs to be discarded. For instance, the compile data will be discarded when calling the following methods: reset, add_caller. Note that the add_caller call is triggered when applying the remotejit decorator to a Python function to be compiled.