'Reduce the instance for serialization.
Compiled definitions are serialized in PTX form.
Type annotation are discarded.
Thread, block and shared memory configuration are serialized.
Stream information is discarded.'

def __reduce__(self):

    config = self._serialize_config()
    args = (self.__class__, self.entry_name, self.argument_types, self._func, self.linking, self.debug, self.call_helper, config)
    return (serialize._rebuild_reduction, args)
