提交 063f509a 编写于 作者: 刘琦

Merge branch 'fix-depth_to_space-bug' into 'master'

fix DepthToSpace bug

See merge request !391
...@@ -10,3 +10,5 @@ mace/codegen/tuning/ ...@@ -10,3 +10,5 @@ mace/codegen/tuning/
mace/codegen/version/ mace/codegen/version/
build/ build/
docs/_build/ docs/_build/
\.project/
...@@ -39,6 +39,8 @@ void DepthToSpaceOpFunctor<DeviceType::OPENCL, T>::operator()( ...@@ -39,6 +39,8 @@ void DepthToSpaceOpFunctor<DeviceType::OPENCL, T>::operator()(
output_height = input_height * block_size_; output_height = input_height * block_size_;
output_width = input_width * block_size_; output_width = input_width * block_size_;
output_depth = input_depth / (block_size_ * 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"; kernel_name = "depth_to_space";
gws[0] = static_cast<uint32_t>(RoundUpDiv4(output_depth)); gws[0] = static_cast<uint32_t>(RoundUpDiv4(output_depth));
...@@ -50,6 +52,8 @@ void DepthToSpaceOpFunctor<DeviceType::OPENCL, T>::operator()( ...@@ -50,6 +52,8 @@ void DepthToSpaceOpFunctor<DeviceType::OPENCL, T>::operator()(
output_height = input_height / block_size_; output_height = input_height / block_size_;
output_width = input_width / block_size_; output_width = input_width / block_size_;
output_depth = input_depth * block_size_ * 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"; kernel_name = "space_to_depth";
gws[0] = static_cast<uint32_t>(RoundUpDiv4(input_depth)); gws[0] = static_cast<uint32_t>(RoundUpDiv4(input_depth));
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册