def _callback(op, explicit_ops): attrs = Mock() attrs.inputs = inputs attrs.explicit_ops = explicit_ops attrs.outputs = [op.output(0)] attrs.scheduler = sch attrs.auto_config = cfg attrs.backend = backend attrs.ir = program attrs.options = options attrs.blend = '' attrs.get_extent = lambda axis: int(axis.dom.extent) AntaresGlobal.attrs = attrs do_native_scheduling(attrs)
def _callback(explicit_ops): attrs = Mock() attrs.device_props = get_device_props() attrs.inputs = list(inputs) attrs.outputs = list(outputs) attrs.explicit_ops = explicit_ops attrs.scheduler = sch attrs.auto_config = AntaresGlobal.auto_config attrs.backend = backend attrs.ir = program attrs.options = options attrs.blend = '' attrs.get_extent = lambda axis: int(axis.dom.extent) def get_lower(): return str(tvm.lower(sch, attrs.inputs + attrs.outputs, simple_mode=True)).split('#[metadata]')[0] attrs.get_lower = get_lower AntaresGlobal.attrs = attrs do_native_scheduling(attrs)