mirror of https://github.com/alibaba/MNN.git
Vulkan:Bugfix: Fix bug for windows compile error
This commit is contained in:
parent
aee17faedf
commit
ee9fff2d6c
|
@ -541,6 +541,9 @@ float VulkanBackend::getPipelineTime(const VulkanPipeline* pipeline, std::shared
|
||||||
return time;
|
return time;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static bool checkInvalid(uint32_t x, uint32_t y, uint32_t z, uint32_t subgroupSize) {
|
||||||
|
return x * y * z > 4 * subgroupSize || x > 128 || y > 128 || z > 128;
|
||||||
|
}
|
||||||
|
|
||||||
std::vector<uint32_t> VulkanBackend::autoTunePipeline(SharedPtr<VulkanPipeline> pipeline, std::shared_ptr<VulkanLayout::DescriptorSet> des, const std::vector<uint32_t> gws, const uint32_t tuneDimension, std::vector<uint32_t> defaultLws,float * const minCostPtr) {
|
std::vector<uint32_t> VulkanBackend::autoTunePipeline(SharedPtr<VulkanPipeline> pipeline, std::shared_ptr<VulkanLayout::DescriptorSet> des, const std::vector<uint32_t> gws, const uint32_t tuneDimension, std::vector<uint32_t> defaultLws,float * const minCostPtr) {
|
||||||
bool isPrivate = !(pipeline->mTuneName.empty());
|
bool isPrivate = !(pipeline->mTuneName.empty());
|
||||||
|
@ -585,10 +588,6 @@ std::vector<uint32_t> VulkanBackend::autoTunePipeline(SharedPtr<VulkanPipeline>
|
||||||
|
|
||||||
bool tuneNormalFlag = (mRuntime->mGpuMode & MNNGpuMode::MNN_GPU_TUNING_WIDE);
|
bool tuneNormalFlag = (mRuntime->mGpuMode & MNNGpuMode::MNN_GPU_TUNING_WIDE);
|
||||||
|
|
||||||
auto checkInvalid = tuneNormalFlag
|
|
||||||
? [](uint32_t x, uint32_t y, uint32_t z, uint32_t subgroupSize) -> bool { return x * y * z > 4 * subgroupSize || x > 128 || y > 128 || z > 128 ; } // MNN_GPU_TUNING_WIDE
|
|
||||||
: [](uint32_t x, uint32_t y, uint32_t z, uint32_t subgroupSize) -> bool { return x * y * z > 16 * subgroupSize; }; // MNN_GPU_TUNING_HEAVY
|
|
||||||
|
|
||||||
for (uint32_t z = localSizeRangeZ.first; z <= localSizeRangeZ.second; z = z << 1) {
|
for (uint32_t z = localSizeRangeZ.first; z <= localSizeRangeZ.second; z = z << 1) {
|
||||||
for (uint32_t y = localSizeRangeY.first; y <= localSizeRangeY.second; y = y << 1) {
|
for (uint32_t y = localSizeRangeY.first; y <= localSizeRangeY.second; y = y << 1) {
|
||||||
for (uint32_t x = localSizeRangeX.first; x <= localSizeRangeX.second; x = x << 1) {
|
for (uint32_t x = localSizeRangeX.first; x <= localSizeRangeX.second; x = x << 1) {
|
||||||
|
|
Loading…
Reference in New Issue