* Copyright (c) 2025 Huawei Technologies Co., Ltd.
* This program is free software, you can redistribute it and/or modify it under the terms and conditions of
* CANN Open Software License Agreement Version 2.0 (the "License").
* Please refer to the License for details. You may not use this file except in compliance with the License.
* THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED,
* INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE.
* See LICENSE in the root of the software repository for the full text of the License.
*/
#ifndef H17C3CFE2_A674_4D31_8851_4024DEECEB04
#define H17C3CFE2_A674_4D31_8851_4024DEECEB04
#include "kernel/memory/type/mem_size.h"
#include "kernel/memory/span/span_layer_id.h"
namespace gert {
constexpr size_t MEMORY_SPECIFICATION_LEVEL_MAX = 2U;
constexpr size_t PAGE_SIZE_IDEM_DEFAULT = 16U;
constexpr MemSize HUGE_PAGE_MEMORY_DEFAULT = 2_MB;
constexpr MemSize PAGE_MEM_SIZE_THRESHOLD_DEFAULT[MEMORY_SPECIFICATION_LEVEL_MAX] = {30_GB, 60_GB};
constexpr MemSize PAGE_MEM_SIZE_IN_LAYER_THRESHOLD_DEFAULT = 8_GB;
constexpr size_t SPAN_COUNT_IN_LAYER_THRESHOLD_DEFAULT = 10240U;
constexpr size_t SPAN_PREPARED_COUNT_DEFAULT = 10240U;
constexpr size_t SPAN_LAYER_PREPARED_COUNT_DEFAULT = 4096U;
constexpr MemSize SPAN_UNSPLITABLE_MEM_SIZE_DEFAULT = 16_GB;
constexpr MemSize SPAN_UNCACHEABLE_MEM_SIZE_DEFAULT[MEMORY_SPECIFICATION_LEVEL_MAX] = {16_GB, 32_GB};
constexpr bool SPAN_LAYER_QUICK_MODE_ENABLE_DEFAULT = true;
constexpr size_t SPAN_LAYER_LIFT_LEVEL_DEFAULT = PAGE_LENGTH_INVALID;
}
#endif