2019-04-17 10:49:11 +08:00
|
|
|
//
|
|
|
|
// VulkanCommandPool.hpp
|
|
|
|
// MNN
|
|
|
|
//
|
|
|
|
// Created by MNN on 2019/01/31.
|
|
|
|
// Copyright © 2018, Alibaba Group Holding Limited
|
|
|
|
//
|
|
|
|
|
|
|
|
#ifndef VulkanCommandPool_hpp
|
|
|
|
#define VulkanCommandPool_hpp
|
|
|
|
|
2019-12-27 22:16:57 +08:00
|
|
|
#include "core/NonCopyable.hpp"
|
|
|
|
#include "backend/vulkan/component/VulkanDevice.hpp"
|
|
|
|
#include "backend/vulkan/vulkan/vulkan_wrapper.h"
|
2019-04-17 10:49:11 +08:00
|
|
|
namespace MNN {
|
|
|
|
class VulkanCommandPool : public NonCopyable {
|
|
|
|
public:
|
|
|
|
VulkanCommandPool(const VulkanDevice& dev);
|
|
|
|
virtual ~VulkanCommandPool();
|
|
|
|
|
|
|
|
class Buffer : public NonCopyable {
|
|
|
|
public:
|
|
|
|
Buffer(const VkCommandPool& pool, const VulkanDevice& dev);
|
|
|
|
virtual ~Buffer();
|
|
|
|
|
|
|
|
VkCommandBuffer get() const {
|
|
|
|
return mBuffer;
|
|
|
|
}
|
|
|
|
|
|
|
|
void begin(VkCommandBufferUsageFlags flags) const;
|
|
|
|
void end() const;
|
|
|
|
void barrierSource(VkBuffer source, size_t start, size_t end) const;
|
|
|
|
void barrierImage(VkImage source, VkImageLayout oldLayout, VkImageLayout newLayout) const;
|
|
|
|
|
|
|
|
private:
|
|
|
|
VkCommandBuffer mBuffer;
|
|
|
|
const VkCommandPool mPool;
|
|
|
|
const VulkanDevice& mDevice;
|
|
|
|
};
|
|
|
|
|
- dynamic computation graph (beta)
- add supports (/express)
- add tests
- add benchmarks with it (/benchmark/exprModels)
- Python
- MNN engine and tools were submitted to pip
- available on Windows/macOS/Linux
- Engine/Converter
- add supports for each op benchmarking
- refactor optimizer by separating steps
- CPU
- add supports for Conv3D, Pool3D, ELU, ReverseSequence
- fix ArgMax, Permute, Scale, BinaryOp, Slice, SliceTf
- OpenCL
- add half transform in CPU
- add broadcast supports for binary
- optimize Conv2D, Reshape, Eltwise, Gemm, etc.
- OpenGL
- add sub, real div supports for binary
- add supports for unary
- optimize Conv2D, Reshape
- Vulkan
- add max supports for eltwise
- Metal
- fix metallib missing problem
- Train/Quantization
- use express to refactor training codes
2019-09-26 21:02:07 +08:00
|
|
|
VulkanCommandPool::Buffer* allocBuffer() const;
|
2019-04-17 10:49:11 +08:00
|
|
|
|
|
|
|
VkCommandPool pool() const {
|
|
|
|
return mPool;
|
|
|
|
}
|
|
|
|
|
|
|
|
void submitAndWait(VkCommandBuffer buffer) const;
|
|
|
|
|
|
|
|
private:
|
|
|
|
const VulkanDevice& mDevice;
|
|
|
|
VkCommandPool mPool;
|
|
|
|
};
|
|
|
|
} // namespace MNN
|
|
|
|
#endif /* VulkanCommandPool_hpp */
|