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 : {
23 2 : const ChipType_t g_chipType = static_cast<ChipType_t>(chip);
24 2 : switch (g_chipType) {
25 1 : case CHIP_ASCEND_910A:
26 : case CHIP_ASCEND_910B:
27 : case CHIP_ASCEND_950:
28 : case CHIP_ASCEND_350:
29 1 : return true;
30 1 : default:
31 1 : return false;
32 : }
33 : }
34 :
35 7 : bool QSFeatureCtrl::ShouldSetThreadFIFO(uint32_t deviceId)
36 : {
37 : (void)deviceId;
38 7 : return false;
39 : }
40 :
41 7 : bool QSFeatureCtrl::ShouldAddToCGroup(uint32_t deviceId)
42 : {
43 : (void)deviceId;
44 7 : return true;
45 : }
46 :
47 6 : bool QSFeatureCtrl::UseErrorLogThreshold(uint32_t deviceId)
48 : {
49 : (void)deviceId;
50 6 : return false;
51 : }
52 :
53 5 : bool QSFeatureCtrl::ShouldDisableRecvRequestEvent(uint32_t deviceId)
54 : {
55 : (void)deviceId;
56 5 : return false;
57 : }
58 :
59 5 : bool QSFeatureCtrl::ShouldSetPidPriority(uint32_t deviceId)
60 : {
61 : (void)deviceId;
62 5 : return false;
63 : }
64 : } // namespace bqs
|