Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
comaniac committed Jul 25, 2020
1 parent 1711442 commit 735a1de
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions python/tvm/autotvm/task/space.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
import numpy as np

from tvm.te import schedule, thread_axis
from tvm.tir import expr
from tvm.autotvm.util import get_const_int

Axis = namedtuple('Axis', ['space', 'index'])
Expand Down Expand Up @@ -736,9 +737,9 @@ def add_flop(self, flop):
flop: int or float or IntImm or FloatImm
number of float operations
"""
if not isinstance(flop, (int, float)):
if isinstance(flop, (expr.IntImm, expr.FloatImm)):
flop = flop.value
self.flop += flop
self.flop += float(flop)

def raise_error(self, msg):
"""register error in config
Expand Down
2 changes: 1 addition & 1 deletion topi/python/topi/cuda/conv2d.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ def conv2d_cudnn(cfg, data, kernel, strides, padding, dilation, groups=1,
[dilation_h, dilation_w],
conv_mode=1,
tensor_format=tensor_format,
algo=cfg['algo'],
algo=cfg['algo'].val,
conv_dtype=dtype,
groups=groups)

Expand Down

0 comments on commit 735a1de

Please sign in to comment.