From c64a33ed8bf70d75e8e0c8eba13f1ebc950eb7ee Mon Sep 17 00:00:00 2001 From: hlu1 <14827759+hlu1@users.noreply.github.com> Date: Fri, 19 Apr 2019 17:50:34 -0700 Subject: [PATCH] [Bugfix] Fix winograd nnpack fp16 (#3046) --- topi/python/topi/arm_cpu/conv2d.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/topi/python/topi/arm_cpu/conv2d.py b/topi/python/topi/arm_cpu/conv2d.py index caa735b3..9f08f686 100644 --- a/topi/python/topi/arm_cpu/conv2d.py +++ b/topi/python/topi/arm_cpu/conv2d.py @@ -569,7 +569,7 @@ def conv2d_arm_cpu_winograd_nnpack( assert N == 1 with tvm.tag_scope("winograd_nnpack_conv2d_weight_transform"): transformed_kernel = tvm.contrib.nnpack.convolution_inference_weight_transform( - kernel, algorithm=tvm.contrib.nnpack.ConvolutionAlgorithm.WT_8x8) + kernel, algorithm=cfg['winograd_nnpack_algorithm'].val) if autotvm.GLOBAL_SCOPE.in_tuning: transformed_kernel = tvm.compute(transformed_kernel.shape, lambda *args: 0.0) @@ -653,7 +653,7 @@ def conv2d_winograd_nnpack_ww(cfg, data, transformed_kernel, bias, strides, bias=bias, padding=[HPAD, HPAD, WPAD, WPAD], stride=[HSTR, WSTR], - algorithm=tvm.contrib.nnpack.ConvolutionAlgorithm.WT_8x8) + algorithm=cfg['winograd_nnpack_algorithm'].val) # we have to manually assign effective GFLOP for winograd cfg.add_flop(2 * N * CI * H * W * KH * KW * CO)