Line data Source code
1 : /**
2 : * Copyright (c) 2025 Huawei Technologies Co., Ltd.
3 : * This program is free software, you can redistribute it and/or modify it under the terms and conditions of
4 : * CANN Open Software License Agreement Version 2.0 (the "License").
5 : * Please refer to the License for details. You may not use this file except in compliance with the License.
6 : * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED,
7 : * INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE.
8 : * See LICENSE in the root of the software repository for the full text of the License.
9 : */
10 : #include "queue_schedule_feature_ctrl.h"
11 :
12 : namespace bqs {
13 : using ChipType_t = enum {
14 : CHIP_ASCEND_910A = 1,
15 : CHIP_ASCEND_910B = 5,
16 : CHIP_ASCEND_950 = 15,
17 : CHIP_CLOUD_V5 = 16,
18 : CHIP_ASCEND_350 = 19,
19 : };
20 :
21 2 : bool QSFeatureCtrl::IsSupportSetVisibleDevices(int64_t chip) {
22 2 : const ChipType_t g_chipType = static_cast<ChipType_t>(chip);
23 2 : switch (g_chipType) {
24 1 : case CHIP_ASCEND_910A:
25 : case CHIP_ASCEND_910B:
26 : case CHIP_ASCEND_950:
27 : case CHIP_ASCEND_350:
28 1 : return true;
29 1 : default:
30 1 : return false;
31 : }
32 : }
33 :
34 7 : bool QSFeatureCtrl::ShouldSetThreadFIFO(uint32_t deviceId) {
35 : (void)deviceId;
36 7 : return false;
37 : }
38 :
39 7 : bool QSFeatureCtrl::ShouldAddToCGroup(uint32_t deviceId) {
40 : (void)deviceId;
41 7 : return true;
42 : }
43 :
44 6 : bool QSFeatureCtrl::UseErrorLogThreshold(uint32_t deviceId) {
45 : (void)deviceId;
46 6 : return false;
47 : }
48 :
49 5 : bool QSFeatureCtrl::ShouldDisableRecvRequestEvent(uint32_t deviceId) {
50 : (void)deviceId;
51 5 : return false;
52 : }
53 :
54 5 : bool QSFeatureCtrl::ShouldSetPidPriority(uint32_t deviceId) {
55 : (void)deviceId;
56 5 : return false;
57 : }
58 : }
|