Skip to content

Commit

Permalink
bitpack strategy
Browse files Browse the repository at this point in the history
  • Loading branch information
comaniac authored and icemelon committed Jan 9, 2020
1 parent ff0ca78 commit cf4fcec
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
6 changes: 1 addition & 5 deletions python/tvm/relay/op/nn/_nn.py
Original file line number Diff line number Diff line change
Expand Up @@ -645,11 +645,7 @@ def compute_bitpack(attrs, inputs, out_dtype):
name)
return [out]

# @reg.register_schedule("nn.bitpack")
# def schedule_bitpack(attrs, outs, target):
# with target:
# return topi.generic.schedule_bitpack(outs)

reg.register_schedule("nn.bitpack", strategy.schedule_bitpack)
reg.register_pattern("nn.bitpack", OpPattern.INJECTIVE)


Expand Down
6 changes: 6 additions & 0 deletions python/tvm/relay/op/strategy/generic.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,12 @@ def schedule_l2_normalize(attrs, outs, target):
with target:
return topi.generic.schedule_l2_normalize(outs)

# bitpack
@generic_func
def schedule_bitpack(attrs, outs, target):
with target:
return topi.generic.schedule_bitpack(outs)

# conv2d
def wrap_compute_conv2d(topi_compute, has_group=False):
"""Wrap conv2d topi compute"""
Expand Down
1 change: 0 additions & 1 deletion topi/python/topi/generic/nn.py
Original file line number Diff line number Diff line change
Expand Up @@ -550,7 +550,6 @@ def schedule_binarize_pack(outs):
return _default_schedule(outs, False)


@tvm.target.override_native_generic_func("schedule_bitpack")
def schedule_bitpack(outs):
"""Schedule for bitpack
Parameters
Expand Down

0 comments on commit cf4fcec

Please sign in to comment.