Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[TOPI] Bitserial low-precision convolution #1332

Merged
merged 16 commits into from
Jul 23, 2018
Merged
Show file tree
Hide file tree
Changes from 13 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion HalideIR
51 changes: 51 additions & 0 deletions topi/python/topi/generic/nn.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,22 @@ def schedule_conv2d_nhwc(outs):
"""
return _default_schedule(outs, False)

@tvm.target.generic_func
def schedule_qdense(outs):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

qdense->bitserial_dense?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

qdense->bitserial_dense

"""Schedule for qdense

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

Returns
-------
sch: Schedule
The computation schedule for the op.
"""
return _default_schedule(outs, False)

@tvm.target.generic_func
def schedule_conv2d_NCHWc(num_filter, kernel_size, strides, padding, outs):
Expand Down Expand Up @@ -132,6 +148,41 @@ def schedule_depthwise_conv2d_nhwc(outs):
"""
return _default_schedule(outs, False)

@tvm.target.generic_func
def schedule_bitserial_conv2d_nchw(outs):
"""Schedule for qconv2d_nchw
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

qconv2d->bitserial_conv2d, do a search over qconv2d and replace by bitserial_conv2d


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

Returns
-------
sch: Schedule
The computation schedule for the op.
"""
return _default_schedule(outs, False)


@tvm.target.generic_func
def schedule_bitserial_conv2d_nhwc(outs):
"""Schedule for qconv2d_nhwc
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

qconv2d -> bitserial, maybe try to do a search for qconv2d and rename


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

Returns
-------
sch: Schedule
The computation schedule for the op.
"""
return _default_schedule(outs, False)


@tvm.target.override_native_generic_func("schedule_reduce")
def schedule_reduce(outs):
Expand Down
1 change: 1 addition & 0 deletions topi/python/topi/nn/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,5 @@
from .bnn import *
from .upsampling import *
from .local_response_norm import *
from .bitserial_conv2d import *
from .l2_normalize import *
Loading