diff --git a/.gitignore b/.gitignore index 27ab66f9ec8071c47b818c68404a9b73c924108d..060f9f206b7333eebdb8bd6c94f24bef176fac77 100644 --- a/.gitignore +++ b/.gitignore @@ -10,3 +10,5 @@ mace/codegen/tuning/ mace/codegen/version/ build/ docs/_build/ + +\.project/ diff --git a/mace/kernels/opencl/depth_to_space_opencl.cc b/mace/kernels/opencl/depth_to_space_opencl.cc index 4c84ab147eb33c51a7dc09f9cee464180d9444a1..56e1e106f3a33c7ca2dd448dcf35f7ca49fb9745 100644 --- a/mace/kernels/opencl/depth_to_space_opencl.cc +++ b/mace/kernels/opencl/depth_to_space_opencl.cc @@ -39,6 +39,8 @@ void DepthToSpaceOpFunctor::operator()( output_height = input_height * block_size_; output_width = input_width * block_size_; output_depth = input_depth / (block_size_ * block_size_); + MACE_CHECK(output_depth % 4 == 0, "output channel not support:") + << output_depth; kernel_name = "depth_to_space"; gws[0] = static_cast(RoundUpDiv4(output_depth)); @@ -50,6 +52,8 @@ void DepthToSpaceOpFunctor::operator()( output_height = input_height / block_size_; output_width = input_width / block_size_; output_depth = input_depth * block_size_ * block_size_; + MACE_CHECK(input_depth % 4 == 0, "input channel not support:") + << input_depth; kernel_name = "space_to_depth"; gws[0] = static_cast(RoundUpDiv4(input_depth));