2019-04-17 10:49:11 +08:00
|
|
|
//
|
|
|
|
// VulkanBatchToSpaceND.hpp
|
|
|
|
// MNN
|
|
|
|
//
|
|
|
|
// Created by MNN on 2019/01/31.
|
|
|
|
// Copyright © 2018, Alibaba Group Holding Limited
|
|
|
|
//
|
|
|
|
|
|
|
|
#ifndef VulkanBatchToSpaceND_hpp
|
|
|
|
#define VulkanBatchToSpaceND_hpp
|
|
|
|
|
|
|
|
#include <stdio.h>
|
2019-12-27 22:16:57 +08:00
|
|
|
#include "backend/vulkan/execution/VulkanBasicExecution.hpp"
|
2019-04-17 10:49:11 +08:00
|
|
|
|
|
|
|
namespace MNN {
|
|
|
|
|
|
|
|
class VulkanBatchToSpaceND : public VulkanBasicExecution {
|
|
|
|
public:
|
|
|
|
VulkanBatchToSpaceND(const Op* op, Backend* bn);
|
|
|
|
virtual ~VulkanBatchToSpaceND();
|
|
|
|
ErrorCode onEncode(const std::vector<Tensor*>& inputs, const std::vector<Tensor*>& outputs,
|
|
|
|
const VulkanCommandPool::Buffer* cmdBuffer) override;
|
|
|
|
|
|
|
|
private:
|
|
|
|
int mCropTop;
|
|
|
|
int mCropLeft;
|
|
|
|
int mBlockShapeHeight;
|
|
|
|
int mBlockShapeWidth;
|
|
|
|
std::shared_ptr<VulkanBuffer> mGpuParam;
|
|
|
|
const VulkanPipeline* mBatchToSpacePipeline;
|
|
|
|
std::shared_ptr<VulkanPipeline::DescriptorSet> mDescriptorSet;
|
|
|
|
const VulkanSampler* mSampler;
|
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace MNN
|
|
|
|
#endif /* VulkanBatchToSpaceND_hpp */
|