ncnn
1// Tencent is pleased to support the open source community by making ncnn available.
2//
3// Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved.
4//
5// Licensed under the BSD 3-Clause License (the "License"); you may not use this file except
6// in compliance with the License. You may obtain a copy of the License at
7//
8// https://opensource.org/licenses/BSD-3-Clause
9//
10// Unless required by applicable law or agreed to in writing, software distributed
11// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
12// CONDITIONS OF ANY KIND, either express or implied. See the License for the
13// specific language governing permissions and limitations under the License.
14
15#include "option.h"16
17#include "cpu.h"18
19namespace ncnn {20
21Option::Option()22{
23lightmode = true;24num_threads = get_physical_big_cpu_count();25blob_allocator = 0;26workspace_allocator = 0;27
28#if NCNN_VULKAN29blob_vkallocator = 0;30workspace_vkallocator = 0;31staging_vkallocator = 0;32pipeline_cache = 0;33#endif // NCNN_VULKAN34
35openmp_blocktime = 20;36
37use_winograd_convolution = true;38use_sgemm_convolution = true;39use_int8_inference = true;40use_vulkan_compute = false; // TODO enable me41
42use_bf16_storage = false;43
44use_fp16_packed = true;45use_fp16_storage = true;46use_fp16_arithmetic = true;47use_int8_packed = true;48use_int8_storage = true;49use_int8_arithmetic = false;50
51use_packing_layout = true;52
53use_shader_pack8 = false;54
55use_subgroup_basic = false;56use_subgroup_vote = false;57use_subgroup_ballot = false;58use_subgroup_shuffle = false;59
60use_image_storage = false;61use_tensor_storage = false;62
63use_reserved_0 = false;64
65flush_denormals = 3;66
67use_local_pool_allocator = true;68
69use_shader_local_memory = true;70use_cooperative_matrix = true;71
72use_winograd23_convolution = true;73use_winograd43_convolution = true;74use_winograd63_convolution = true;75
76use_a53_a55_optimized_kernel = is_current_thread_running_on_a53_a55();77
78use_fp16_uniform = true;79use_int8_uniform = true;80}
81
82} // namespace ncnn83