'Reduce the instance for serialization.
Compiled definitions are serialized in PTX form.'

def __reduce__(self):

    glbls = serialize._get_function_globals_for_reduction(self.py_func)
    func_reduced = serialize._reduce_function(self.py_func, glbls)
    config = self._serialize_config()
    args = (self.__class__, func_reduced, self.bind, self.targetoptions, config)
    return (serialize._rebuild_reduction, args)
