forked from alibaba/MNN
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathVulkanNormalize.hpp
More file actions
36 lines (32 loc) · 1.06 KB
/
Copy pathVulkanNormalize.hpp
File metadata and controls
36 lines (32 loc) · 1.06 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
//
// VulkanNormalize.hpp
// MNN
//
// Created by MNN on 2019/01/31.
// Copyright © 2018, Alibaba Group Holding Limited
//
#ifndef VulkanNormalize_hpp
#define VulkanNormalize_hpp
#include "VulkanBasicExecution.hpp"
namespace MNN {
class VulkanNormalize : public VulkanBasicExecution {
public:
VulkanNormalize(const Op* op, Backend* bn);
virtual ~VulkanNormalize();
ErrorCode onEncode(const std::vector<Tensor*>& inputs, const std::vector<Tensor*>& outputs,
const VulkanCommandPool::Buffer* cmdBuffer) override;
private:
std::shared_ptr<VulkanBuffer> mParamBuffer;
const VulkanPipeline* mVulkanNormalizePipeline;
const VulkanPipeline* mVulkanScalePipeline;
std::shared_ptr<VulkanPipeline::DescriptorSet> mNormalizeDescriptorSet;
std::shared_ptr<VulkanPipeline::DescriptorSet> mScaleDescriptorSet;
std::shared_ptr<VulkanBuffer> mScale;
std::shared_ptr<VulkanBuffer> mBias;
float mEps;
Tensor mTempTensor;
const VulkanSampler* mSampler;
const VulkanBackend* mVkBackend;
};
} // namespace MNN
#endif