nnvm/tvm/topi/python/topi/rasp/depthwise_conv2d.py
def schedule_depthwise_conv2d(outs):
    """Schedule for depthwise_conv2d nchw forward.

    Parameters
    ----------
    outs: Array of Tensor
        The computation graph description of depthwise_conv2d
        in the format of an array of tensors.

    Returns
    -------
    s: Schedule
        The computation schedule for depthwise_conv2d nchw.
    """
    outs = [outs] if isinstance(outs, tvm.tensor.Tensor) else outs
    s = tvm.create_schedule([x.op for x in outs])

    def traverse(op):
        # inline all one-to-one-mapping operators except the last stage (output)
        if tag.is_broadcast(op.tag):
            if op not in s.outputs:
                s[op].compute_inline()
            for tensor in op.input_tensors:
                if tensor.op.input_tensors:
                    traverse(tensor.op)
        # schedule depthwise_conv2d
        if op.tag == 'depthwise_conv2d_nchw':
            output = op.output(0)
            kernel = op.input_tensors[1]
            data = op.input_tensors[0]
            data_pad = None
            if isinstance(data.op, tvm.tensor.ComputeOp) and "pad" in data.op.tag:
                data_pad = data
                data = data_pad.op.input_tensors[0]
            _schedule(s, data, data_pad, kernel, output, outs[0])

    traverse(outs[0].op)
    return s
Schedule for depthwise_conv2d nchw forward.

    Parameters
    ----------
    outs: Array of Tensor
        The computation graph description of depthwise_conv2d
        in the format of an array of tensors.

    Returns
    -------
    s: Schedule
        The computation schedule for depthwise_conv2d nchw.
    
Schedule for depthwise_conv2d nchw forward.
Parameters

Array of Tensor
The computation graph description of depthwise_conv2d
in the format of an array of tensors.

Returns

Schedule
The computation schedule for depthwise_conv2d nchw.
Schedule for depthwise_conv2d nchw forward . Parameters Array of Tensor The computation graph description of depthwise_conv2d in the format of an array of tensors . Returns Schedule The computation schedule for depthwise_conv2d nchw .
def schedule_depthwise_conv2d(outs):
    outs = [outs] if isinstance(outs, tvm.tensor.Tensor) else outs
    s = tvm.create_schedule([x.op for x in outs])
    def traverse(op):
        if tag.is_broadcast(op.tag):
            if op not in s.outputs:
                s[op].compute_inline()
            for tensor in op.input_tensors:
                if tensor.op.input_tensors:
                    traverse(tensor.op)
        if op.tag == 'depthwise_conv2d_nchw':
            output = op.output(0)
            kernel = op.input_tensors[1]
            data = op.input_tensors[0]
            data_pad = None
            if isinstance(data.op, tvm.tensor.ComputeOp) and "pad" in data.op.tag:
                data_pad = data
                data = data_pad.op.input_tensors[0]
            _schedule(s, data, data_pad, kernel, output, outs[0])
    traverse(outs[0].op)
    return s
def schedule_depthwise_conv2d ( outs ) : outs = [ outs ] if isinstance ( outs , tvm . tensor . Tensor ) else outs s = tvm . create_schedule ( [ x . op for x in outs ] ) def traverse ( op ) : if tag . is_broadcast ( op . tag ) : if op not in s . outputs : s [ op ] . compute_inline ( ) for tensor in op . input_tensors : if tensor . op . input_tensors : traverse ( tensor . op ) if op . tag == 'depthwise_conv2d_nchw' : output = op . output ( 0 ) kernel = op . input_tensors [ 1 ] data = op . input_tensors [ 0 ] data_pad = None if isinstance ( data . op , tvm . tensor . ComputeOp ) and "pad" in data . op . tag : data_pad = data data = data_pad . op . input_tensors [ 0 ] _schedule ( s , data , data_pad , kernel , output , outs [ 0 ] ) traverse ( outs [ 0 ] . op ) return s
Schedule for depthwise_conv2d nchw forward.
Schedule for depthwise_conv2d nchw forward .
"""Schedule for depthwise_conv2d nchw forward.

    Parameters
    ----------
    outs: Array of Tensor
        The computation graph description of depthwise_conv2d
        in the format of an array of tensors.

    Returns
    -------
    s: Schedule
        The computation schedule for depthwise_conv2d nchw.
    """ # inline all one-to-one-mapping operators except the last stage (output) # schedule depthwise_conv2d
outs