26
csrc/common/stub/op_api/level0/add.h
Normal file
26
csrc/common/stub/op_api/level0/add.h
Normal file
@@ -0,0 +1,26 @@
|
||||
/**
|
||||
* 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.
|
||||
*/
|
||||
|
||||
/*!
|
||||
* \file add.h
|
||||
* \brief
|
||||
*/
|
||||
|
||||
#ifndef OP_API_INC_LEVEL0_OP_ADD_OP_H_
|
||||
#define OP_API_INC_LEVEL0_OP_ADD_OP_H_
|
||||
|
||||
#include "opdev/op_executor.h"
|
||||
|
||||
namespace l0op {
|
||||
const aclTensor* Add(const aclTensor* self, const aclTensor* other, aclOpExecutor* executor);
|
||||
|
||||
}
|
||||
|
||||
#endif // OP_API_INC_LEVEL0_OP_ADD_OP_H_
|
||||
26
csrc/common/stub/op_api/level0/arange.h
Normal file
26
csrc/common/stub/op_api/level0/arange.h
Normal file
@@ -0,0 +1,26 @@
|
||||
/**
|
||||
* 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.
|
||||
*/
|
||||
|
||||
/*!
|
||||
* \file arange.h
|
||||
* \brief
|
||||
*/
|
||||
|
||||
#ifndef PTA_NPU_OP_API_INC_LEVEL0_OP_ARANGE_OP_H_
|
||||
#define PTA_NPU_OP_API_INC_LEVEL0_OP_ARANGE_OP_H_
|
||||
|
||||
#include "opdev/op_executor.h"
|
||||
|
||||
namespace l0op {
|
||||
const aclTensor* Arange(const aclScalar* start, const aclScalar* end, const aclScalar* step, const aclTensor* out,
|
||||
const bool isClosed, aclOpExecutor* executor);
|
||||
}
|
||||
|
||||
#endif
|
||||
26
csrc/common/stub/op_api/level0/axpy.h
Normal file
26
csrc/common/stub/op_api/level0/axpy.h
Normal file
@@ -0,0 +1,26 @@
|
||||
/**
|
||||
* 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.
|
||||
*/
|
||||
|
||||
/*!
|
||||
* \file axpy.h
|
||||
* \brief
|
||||
*/
|
||||
|
||||
#ifndef OP_API_INC_LEVEL0_OP_AXPY_OP_H_
|
||||
#define OP_API_INC_LEVEL0_OP_AXPY_OP_H_
|
||||
|
||||
#include "opdev/op_executor.h"
|
||||
|
||||
namespace l0op {
|
||||
const aclTensor* Axpy(const aclTensor* self, const aclTensor* other, float alpha, aclOpExecutor* executor);
|
||||
|
||||
}
|
||||
|
||||
#endif // OP_API_INC_LEVEL0_OP_AXPY_OP_H_
|
||||
45
csrc/common/stub/op_api/level0/batch_norm_backward.h
Normal file
45
csrc/common/stub/op_api/level0/batch_norm_backward.h
Normal file
@@ -0,0 +1,45 @@
|
||||
/**
|
||||
* 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 PTA_NPU_OP_API_INC_LEVEL0_OP_BATCH_NORM_GRAD_OP_H_
|
||||
#define PTA_NPU_OP_API_INC_LEVEL0_OP_BATCH_NORM_GRAD_OP_H_
|
||||
|
||||
#include "opdev/op_executor.h"
|
||||
|
||||
namespace l0op {
|
||||
const std::array<aclTensor*, 2> BNTrainingUpdateGrad(const aclTensor* gradOut, const aclTensor* x,
|
||||
const aclTensor* saveMean, const aclTensor* saveInvstd, float eps,
|
||||
aclOpExecutor* executor);
|
||||
const std::array<aclTensor*, 2> BN3DTrainingUpdateGrad(const aclTensor* gradOut, const aclTensor* x,
|
||||
const aclTensor* saveMean, const aclTensor* saveInvstd,
|
||||
float eps, aclOpExecutor* executor);
|
||||
|
||||
const aclTensor* BNTrainingReduceGrad(const aclTensor* gradOut, const aclTensor* x, const aclTensor* gradWeight,
|
||||
const aclTensor* gradBias, const aclTensor* weight, const aclTensor* saveMean,
|
||||
const aclTensor* saveInvstd, float eps, aclOpExecutor* executor);
|
||||
const aclTensor* BN3DTrainingReduceGrad(const aclTensor* gradOut, const aclTensor* x, const aclTensor* gradWeight,
|
||||
const aclTensor* gradBias, const aclTensor* weight, const aclTensor* saveMean,
|
||||
const aclTensor* saveInvstd, float eps, aclOpExecutor* executor);
|
||||
|
||||
const aclTensor* BNInferGrad(const aclTensor* gradOut, const aclTensor* weight, const aclTensor* runningVar, float eps,
|
||||
aclOpExecutor* executor);
|
||||
|
||||
constexpr size_t BN_GRAD_V3_OUTPUT_NUM = 3;
|
||||
const std::array<aclTensor*, BN_GRAD_V3_OUTPUT_NUM> BatchNormGradV3(const aclTensor* gradOut,
|
||||
const aclTensor* input,
|
||||
const aclTensor* weight,
|
||||
const aclTensor* runningMean,
|
||||
const aclTensor* runningVar,
|
||||
const aclTensor* saveMean,
|
||||
const aclTensor* saveInvstd,
|
||||
bool training, float eps,
|
||||
aclOpExecutor* executor);
|
||||
} // namespace l0op
|
||||
|
||||
#endif // PTA_NPU_OP_API_INC_LEVEL0_OP_BATCH_NORM_GRAD_OP_H_
|
||||
28
csrc/common/stub/op_api/level0/broadcast_to.h
Normal file
28
csrc/common/stub/op_api/level0/broadcast_to.h
Normal file
@@ -0,0 +1,28 @@
|
||||
/**
|
||||
* 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.
|
||||
*/
|
||||
|
||||
/*!
|
||||
* \file broadcast_to.h
|
||||
* \brief
|
||||
*/
|
||||
|
||||
#ifndef OP_API_INC_LEVEL0_BROADCAST_TO_H
|
||||
#define OP_API_INC_LEVEL0_BROADCAST_TO_H
|
||||
|
||||
# include "opdev/op_def.h"
|
||||
|
||||
namespace l0op {
|
||||
|
||||
const aclTensor *BroadcastTo(const aclTensor *x, const aclTensor *y, const aclTensor *shape, aclOpExecutor *executor);
|
||||
const aclTensor *BroadcastTo(const aclTensor *x, const aclIntArray *shape, aclOpExecutor *executor);
|
||||
|
||||
} // l0op
|
||||
|
||||
#endif // OP_API_INC_LEVEL0_BROADCAST_TO_H
|
||||
21
csrc/common/stub/op_api/level0/dilation.h
Normal file
21
csrc/common/stub/op_api/level0/dilation.h
Normal file
@@ -0,0 +1,21 @@
|
||||
/**
|
||||
* 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 OP_API_OP_API_COMMON_INC_LEVEL0_OP_DILATION_OP_H_
|
||||
#define OP_API_OP_API_COMMON_INC_LEVEL0_OP_DILATION_OP_H_
|
||||
|
||||
#include "opdev/op_executor.h"
|
||||
|
||||
namespace l0op {
|
||||
// Dilation
|
||||
const aclTensor *Dilation(const aclTensor *x, const aclIntArray *dilations, const aclIntArray *pads,
|
||||
float paddingValue, aclOpExecutor *executor);
|
||||
} // namespace l0op
|
||||
|
||||
#endif // OP_API_OP_API_COMMON_INC_LEVEL0_OP_DILATION_OP_H_
|
||||
20
csrc/common/stub/op_api/level0/div.h
Normal file
20
csrc/common/stub/op_api/level0/div.h
Normal file
@@ -0,0 +1,20 @@
|
||||
/**
|
||||
* 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 PTA_NPU_OP_API_INC_LEVEL0_OP_DIV_OP_H_
|
||||
#define PTA_NPU_OP_API_INC_LEVEL0_OP_DIV_OP_H_
|
||||
|
||||
#include "opdev/op_executor.h"
|
||||
|
||||
namespace l0op {
|
||||
const aclTensor *Div(const aclTensor *self, const aclTensor *other, aclOpExecutor *executor);
|
||||
|
||||
}
|
||||
|
||||
#endif // PTA_NPU_OP_API_INC_LEVEL0_OP_ADD_OP_H_
|
||||
27
csrc/common/stub/op_api/level0/dot.h
Normal file
27
csrc/common/stub/op_api/level0/dot.h
Normal file
@@ -0,0 +1,27 @@
|
||||
/**
|
||||
* 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.
|
||||
*/
|
||||
|
||||
/*!
|
||||
* \file dot.h
|
||||
* \brief
|
||||
*/
|
||||
|
||||
#ifndef OP_API_INC_LEVEL0_DOT_H_
|
||||
#define OP_API_INC_LEVEL0_DOT_H_
|
||||
|
||||
#include "opdev/op_executor.h"
|
||||
|
||||
namespace l0op {
|
||||
|
||||
const aclTensor *Dot(const aclTensor *self, const aclTensor *tensor, aclOpExecutor *executor);
|
||||
|
||||
}
|
||||
|
||||
#endif // OP_API_INC_LEVEL0_DOT_H_
|
||||
25
csrc/common/stub/op_api/level0/expand.h
Normal file
25
csrc/common/stub/op_api/level0/expand.h
Normal file
@@ -0,0 +1,25 @@
|
||||
/**
|
||||
* 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.
|
||||
*/
|
||||
|
||||
/*!
|
||||
* \file expand.h
|
||||
* \brief
|
||||
*/
|
||||
#ifndef PTA_NPU_OP_API_INC_LEVEL0_OP_EXPAND_OP_H_
|
||||
#define PTA_NPU_OP_API_INC_LEVEL0_OP_EXPAND_OP_H_
|
||||
|
||||
#include "opdev/op_executor.h"
|
||||
#include "opdev/make_op_executor.h"
|
||||
|
||||
namespace l0op {
|
||||
const aclTensor *Expand(const aclTensor *self, const aclIntArray *shape, aclOpExecutor *executor);
|
||||
}
|
||||
|
||||
#endif // PTA_NPU_OP_API_INC_LEVEL0_OP_EXPAND_OP_H_
|
||||
20
csrc/common/stub/op_api/level0/fault_injection.h
Normal file
20
csrc/common/stub/op_api/level0/fault_injection.h
Normal file
@@ -0,0 +1,20 @@
|
||||
/**
|
||||
* 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 OP_API_INC_LEVEL0_FAULT_INJECTION_H_
|
||||
#define OP_API_INC_LEVEL0_FAULT_INJECTION_H_
|
||||
|
||||
#include "opdev/op_executor.h"
|
||||
|
||||
namespace l0op {
|
||||
const aclTensor* FaultInjection(const aclTensor *injectObj, const aclTensor *injectPara, aclTensor *out, aclOpExecutor *executor);
|
||||
} // namespace l0op
|
||||
|
||||
#endif // OP_API_INC_LEVEL0_FAULT_INJECTION_H_
|
||||
26
csrc/common/stub/op_api/level0/fill.h
Normal file
26
csrc/common/stub/op_api/level0/fill.h
Normal file
@@ -0,0 +1,26 @@
|
||||
/**
|
||||
* 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.
|
||||
*/
|
||||
|
||||
/*!
|
||||
* \file fill.h
|
||||
* \brief
|
||||
*/
|
||||
|
||||
#ifndef OP_API_INC_LEVEL0_OP_FILL_OP_H_
|
||||
#define OP_API_INC_LEVEL0_OP_FILL_OP_H_
|
||||
|
||||
#include "opdev/op_executor.h"
|
||||
|
||||
namespace l0op {
|
||||
const aclTensor *Fill(const aclTensor *dims, const aclTensor *value, const aclIntArray *outShape,
|
||||
aclOpExecutor *executor);
|
||||
}
|
||||
|
||||
#endif
|
||||
27
csrc/common/stub/op_api/level0/gather_elements.h
Normal file
27
csrc/common/stub/op_api/level0/gather_elements.h
Normal file
@@ -0,0 +1,27 @@
|
||||
/**
|
||||
* 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.
|
||||
*/
|
||||
|
||||
/*!
|
||||
* \file gather_elements.h
|
||||
* \brief
|
||||
*/
|
||||
#ifndef OP_API_INC_LEVEL0_OP_GATHER_ELEMENTS_H_
|
||||
#define OP_API_INC_LEVEL0_OP_GATHER_ELEMENTS_H_
|
||||
|
||||
#include "opdev/op_executor.h"
|
||||
|
||||
namespace l0op {
|
||||
const aclTensor *GatherElements(const aclTensor *self,
|
||||
const int64_t dim,
|
||||
const aclTensor *index,
|
||||
aclOpExecutor *executor);
|
||||
} // l0op
|
||||
|
||||
#endif // OP_API_INC_LEVEL0_OP_GATHER_ELEMENTS_H_
|
||||
25
csrc/common/stub/op_api/level0/gather_v2.h
Normal file
25
csrc/common/stub/op_api/level0/gather_v2.h
Normal file
@@ -0,0 +1,25 @@
|
||||
/**
|
||||
* 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 OP_API_INC_LEVEL0_OP_GATHER_V2_H_
|
||||
#define OP_API_INC_LEVEL0_OP_GATHER_V2_H_
|
||||
|
||||
#include "opdev/op_executor.h"
|
||||
|
||||
namespace l0op {
|
||||
|
||||
const aclTensor *GatherV2(const aclTensor *self, int64_t axis, const aclTensor *indices, aclOpExecutor *executor,
|
||||
int batchDims = 0, bool negativeIndexSupport = false);
|
||||
|
||||
const aclTensor *GatherV2WithImplMode(const aclTensor *self, int64_t axis, const aclTensor *indices, int64_t implMode,
|
||||
aclOpExecutor *executor, int batchDims = 0, bool negativeIndexSupport = false);
|
||||
|
||||
}
|
||||
|
||||
#endif // OP_API_INC_LEVEL0_OP_GATHER_V2_H_
|
||||
23
csrc/common/stub/op_api/level0/gather_v3.h
Normal file
23
csrc/common/stub/op_api/level0/gather_v3.h
Normal file
@@ -0,0 +1,23 @@
|
||||
/**
|
||||
* 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 COMMON_INC_EXTERNAL_ACLNN_KERNELS_GATHER_V3_H
|
||||
#define COMMON_INC_EXTERNAL_ACLNN_KERNELS_GATHER_V3_H
|
||||
|
||||
#include "opdev/op_executor.h"
|
||||
|
||||
namespace l0op {
|
||||
|
||||
const aclTensor *GatherV3(const aclTensor *self, int64_t axis, const aclTensor *indices, aclOpExecutor *executor,
|
||||
int batchDims = 0, bool negativeIndexSupport = false);
|
||||
|
||||
}
|
||||
|
||||
#endif // COMMON_INC_EXTERNAL_ACLNN_KERNELS_GATHER_V3_H
|
||||
34
csrc/common/stub/op_api/level0/inplace_index_add.h
Normal file
34
csrc/common/stub/op_api/level0/inplace_index_add.h
Normal file
@@ -0,0 +1,34 @@
|
||||
/**
|
||||
* 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.
|
||||
*/
|
||||
|
||||
/*!
|
||||
* \file inplace_index_add.h
|
||||
* \brief
|
||||
*/
|
||||
#ifndef OP_API_INC_LEVEL0_OP_INDEX_ADD_H_
|
||||
#define OP_API_INC_LEVEL0_OP_INDEX_ADD_H_
|
||||
|
||||
#include "opdev/op_executor.h"
|
||||
|
||||
namespace l0op {
|
||||
const aclTensor *InplaceIndexAddAiCore(const aclTensor *self, const int64_t dim, const aclTensor *index,
|
||||
const aclTensor *source, const aclTensor *alphaTensor,
|
||||
aclOpExecutor *executor);
|
||||
|
||||
const aclTensor *InplaceIndexAddAiCpu(const aclTensor *self, const int64_t dim, const aclTensor *index,
|
||||
const aclTensor *source, const aclTensor *alphaTensor,
|
||||
aclOpExecutor *executor);
|
||||
|
||||
const aclTensor *InplaceIndexAddWithSorted(const aclTensor *self, const int64_t dim, const aclTensor *sortedIndices,
|
||||
const aclTensor *pos, const aclTensor *value, const aclTensor *alphaTensor,
|
||||
aclOpExecutor *executor);
|
||||
}
|
||||
|
||||
#endif
|
||||
25
csrc/common/stub/op_api/level0/masked_scatter.h
Normal file
25
csrc/common/stub/op_api/level0/masked_scatter.h
Normal file
@@ -0,0 +1,25 @@
|
||||
/**
|
||||
* 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.
|
||||
*/
|
||||
|
||||
/*!
|
||||
* \file masked_scatter.h
|
||||
* \brief
|
||||
*/
|
||||
#ifndef PTA_NPU_OP_API_INC_LEVEL0_OP_MASKED_SCATTER_OP_H_
|
||||
#define PTA_NPU_OP_API_INC_LEVEL0_OP_MASKED_SCATTER_OP_H_
|
||||
|
||||
#include "opdev/op_executor.h"
|
||||
|
||||
namespace l0op {
|
||||
const aclTensor* MaskedScatter(const aclTensor* self, const aclTensor* mask, const aclTensor* source,
|
||||
aclOpExecutor* executor);
|
||||
}
|
||||
|
||||
#endif // PTA_NPU_OP_API_INC_LEVEL0_OP_MASKED_SCATTER_OP_H_
|
||||
22
csrc/common/stub/op_api/level0/matmul_v2tov3.h
Normal file
22
csrc/common/stub/op_api/level0/matmul_v2tov3.h
Normal file
@@ -0,0 +1,22 @@
|
||||
/**
|
||||
* 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 PTA_NPU_OP_API_INC_LEVEL0_OP_MATMUL_V2TOV3_H_
|
||||
#define PTA_NPU_OP_API_INC_LEVEL0_OP_MATMUL_V2TOV3_H_
|
||||
|
||||
#include "opdev/op_executor.h"
|
||||
|
||||
namespace l0op {
|
||||
|
||||
bool MmCheckHitV3Shape(const aclTensor* x1, const aclTensor* x2, const aclTensor* bias,
|
||||
const bool transposeX1, const bool transposeX2, op::Format mat2_format, bool supportSplitK);
|
||||
}
|
||||
|
||||
#endif // PTA_NPU_OP_API_INC_LEVEL0_OP_MATMUL_V2TOV3_H_
|
||||
26
csrc/common/stub/op_api/level0/maximum.h
Normal file
26
csrc/common/stub/op_api/level0/maximum.h
Normal file
@@ -0,0 +1,26 @@
|
||||
/**
|
||||
* 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.
|
||||
*/
|
||||
|
||||
/*!
|
||||
* \file maximum.h
|
||||
* \brief
|
||||
*/
|
||||
|
||||
#ifndef OP_API_INC_LEVEL0_OP_MAXIMUM_OP_H_
|
||||
#define OP_API_INC_LEVEL0_OP_MAXIMUM_OP_H_
|
||||
|
||||
#include "opdev/op_executor.h"
|
||||
|
||||
namespace l0op {
|
||||
const aclTensor* Maximum(const aclTensor* self, const aclTensor* other, aclOpExecutor* executor);
|
||||
|
||||
}
|
||||
|
||||
#endif // OP_API_INC_LEVEL0_OP_MAXIMUM_OP_H_
|
||||
25
csrc/common/stub/op_api/level0/minimum.h
Normal file
25
csrc/common/stub/op_api/level0/minimum.h
Normal file
@@ -0,0 +1,25 @@
|
||||
/**
|
||||
* 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.
|
||||
*/
|
||||
|
||||
/*!
|
||||
* \file minimum.h
|
||||
* \brief
|
||||
*/
|
||||
|
||||
#ifndef OP_API_INC_LEVEL0_OP_MINIMUM_OP_H_
|
||||
#define OP_API_INC_LEVEL0_OP_MINIMUM_OP_H_
|
||||
|
||||
#include "opdev/op_executor.h"
|
||||
|
||||
namespace l0op {
|
||||
const aclTensor* Minimum(const aclTensor* self, const aclTensor* other, aclOpExecutor* executor);
|
||||
}
|
||||
|
||||
#endif // OP_API_INC_LEVEL0_OP_MINIMUM_OP_H_
|
||||
26
csrc/common/stub/op_api/level0/mul.h
Normal file
26
csrc/common/stub/op_api/level0/mul.h
Normal file
@@ -0,0 +1,26 @@
|
||||
/**
|
||||
* 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.
|
||||
*/
|
||||
|
||||
/*!
|
||||
* \file mul.h
|
||||
* \brief
|
||||
*/
|
||||
|
||||
#ifndef OP_API_INC_LEVEL0_MUL_H_
|
||||
#define OP_API_INC_LEVEL0_MUL_H_
|
||||
|
||||
#include "opdev/op_executor.h"
|
||||
|
||||
namespace l0op {
|
||||
const aclTensor *Mul(const aclTensor *self, const aclTensor *other, aclOpExecutor *executor);
|
||||
|
||||
}
|
||||
|
||||
#endif // OP_API_INC_LEVEL0_MUL_H_
|
||||
28
csrc/common/stub/op_api/level0/muls.h
Normal file
28
csrc/common/stub/op_api/level0/muls.h
Normal file
@@ -0,0 +1,28 @@
|
||||
/**
|
||||
* 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.
|
||||
*/
|
||||
|
||||
/*!
|
||||
* \file muls.h
|
||||
* \brief
|
||||
*/
|
||||
|
||||
#ifndef PTA_NPU_OP_API_INC_LEVEL0_OP_MULS_OP_H_
|
||||
#define PTA_NPU_OP_API_INC_LEVEL0_OP_MULS_OP_H_
|
||||
|
||||
#include "opdev/op_executor.h"
|
||||
|
||||
namespace l0op {
|
||||
const aclTensor *Muls(const aclTensor *self,
|
||||
float alpha,
|
||||
aclOpExecutor *executor);
|
||||
|
||||
}
|
||||
|
||||
#endif // PTA_NPU_OP_API_INC_LEVEL0_OP_MULS_OP_H_
|
||||
27
csrc/common/stub/op_api/level0/ones_like.h
Normal file
27
csrc/common/stub/op_api/level0/ones_like.h
Normal file
@@ -0,0 +1,27 @@
|
||||
/**
|
||||
* 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 PTA_NPU_OP_API_INC_LEVEL0_OP_ONES_LIKE_OP_H_
|
||||
#define PTA_NPU_OP_API_INC_LEVEL0_OP_ONES_LIKE_OP_H_
|
||||
|
||||
#include "opdev/op_executor.h"
|
||||
|
||||
namespace l0op {
|
||||
static const std::initializer_list<op::DataType> AICPU_DTYPE_SUPPORT_LIST = {
|
||||
op::DataType::DT_BOOL, op::DataType::DT_FLOAT, op::DataType::DT_FLOAT16, op::DataType::DT_INT8,
|
||||
op::DataType::DT_INT16, op::DataType::DT_UINT16, op::DataType::DT_UINT8, op::DataType::DT_INT32,
|
||||
op::DataType::DT_INT64, op::DataType::DT_DOUBLE, op::DataType::DT_COMPLEX64, op::DataType::DT_COMPLEX128,
|
||||
op::DataType::DT_BF16};
|
||||
const aclTensor *OnesLike(const aclTensor *self, aclOpExecutor *executor);
|
||||
inline static bool IsAiCpuSupport(const aclTensor *self) {
|
||||
return op::CheckType(self->GetDataType(), AICPU_DTYPE_SUPPORT_LIST);
|
||||
}
|
||||
} // namespace l0op
|
||||
|
||||
#endif // PTA_NPU_OP_API_INC_LEVEL0_OP_ONES_LIKE_OP_H_
|
||||
25
csrc/common/stub/op_api/level0/padv3.h
Normal file
25
csrc/common/stub/op_api/level0/padv3.h
Normal file
@@ -0,0 +1,25 @@
|
||||
/**
|
||||
* 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.
|
||||
*/
|
||||
|
||||
/*!
|
||||
* \file padv3.h
|
||||
* \brief
|
||||
*/
|
||||
#ifndef PTA_NPU_OP_API_INC_LEVEL0_OP_PADV3_OP_H_
|
||||
#define PTA_NPU_OP_API_INC_LEVEL0_OP_PADV3_OP_H_
|
||||
|
||||
#include "opdev/op_executor.h"
|
||||
#include "opdev/make_op_executor.h"
|
||||
|
||||
namespace l0op {
|
||||
const aclTensor *PadV3(const aclTensor *self, const aclTensor *paddings, const aclTensor *constant_values,
|
||||
const std::string& mode, const bool paddingsContiguous, aclOpExecutor *executor);
|
||||
}
|
||||
#endif // PTA_NPU_OP_API_INC_LEVEL0_OP_PADV3_OP_H_
|
||||
21
csrc/common/stub/op_api/level0/reduce_mean.h
Normal file
21
csrc/common/stub/op_api/level0/reduce_mean.h
Normal file
@@ -0,0 +1,21 @@
|
||||
/**
|
||||
* 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 OP_API_INC_LEVEL0_REDUCE_MEAN_H
|
||||
#define OP_API_INC_LEVEL0_REDUCE_MEAN_H
|
||||
#include "opdev/op_executor.h"
|
||||
|
||||
namespace l0op {
|
||||
const aclTensor* ReduceMean(const aclTensor* self, const aclIntArray* dim, bool keepDim, aclOpExecutor* executor);
|
||||
const aclTensor* ReduceMean(
|
||||
const aclTensor* self, const aclIntArray* dim, bool keepDim, bool noopWithEmptyAxes, aclOpExecutor* executor);
|
||||
} // namespace l0op
|
||||
|
||||
#endif
|
||||
27
csrc/common/stub/op_api/level0/reduce_sum_op.h
Normal file
27
csrc/common/stub/op_api/level0/reduce_sum_op.h
Normal file
@@ -0,0 +1,27 @@
|
||||
/**
|
||||
* 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.
|
||||
*/
|
||||
|
||||
/*!
|
||||
* \file padv3.h
|
||||
* \brief
|
||||
*/
|
||||
|
||||
#ifndef OP_API_OP_API_COMMON_INC_LEVEL0_OP_REDUCE_SUM_OP_H_
|
||||
#define OP_API_OP_API_COMMON_INC_LEVEL0_OP_REDUCE_SUM_OP_H_
|
||||
|
||||
#include "opdev/op_executor.h"
|
||||
#include "opdev/make_op_executor.h"
|
||||
|
||||
namespace l0op {
|
||||
const aclTensor *ReduceSumOp(const aclTensor *x, const aclIntArray *axes,
|
||||
bool keep_dims, aclOpExecutor *executor);
|
||||
}
|
||||
|
||||
#endif // OP_API_OP_API_COMMON_INC_LEVEL0_OP_REDUCE_SUM_OP_H_
|
||||
18
csrc/common/stub/op_api/level0/shape_op.h
Normal file
18
csrc/common/stub/op_api/level0/shape_op.h
Normal file
@@ -0,0 +1,18 @@
|
||||
/**
|
||||
* 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 OP_API_INC_LEVEL0_SHAPE_OP_H
|
||||
#define OP_API_INC_LEVEL0_SHAPE_OP_H
|
||||
#include "opdev/op_executor.h"
|
||||
namespace l0op {
|
||||
const aclTensor *Shape_op(const aclTensor *x, aclOpExecutor *executor);
|
||||
}
|
||||
|
||||
#endif
|
||||
26
csrc/common/stub/op_api/level0/sort.h
Normal file
26
csrc/common/stub/op_api/level0/sort.h
Normal file
@@ -0,0 +1,26 @@
|
||||
/**
|
||||
* 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.
|
||||
*/
|
||||
|
||||
/*!
|
||||
* \file sort.h
|
||||
* \brief
|
||||
*/
|
||||
#ifndef PTA_NPU_OP_API_INC_LEVEL0_OP_SORT_OP_H_
|
||||
#define PTA_NPU_OP_API_INC_LEVEL0_OP_SORT_OP_H_
|
||||
|
||||
#include "opdev/op_executor.h"
|
||||
#include "opdev/fast_vector.h"
|
||||
|
||||
namespace l0op {
|
||||
const std::tuple<aclTensor*, aclTensor*> Sort(const aclTensor* self, int64_t dim, bool descending, bool stable,
|
||||
op::DataType indicesType, aclOpExecutor* executor);
|
||||
}
|
||||
|
||||
#endif // PTA_NPU_OP_API_INC_LEVEL0_OP_SORT_OP_H_
|
||||
24
csrc/common/stub/op_api/level0/squeeze.h
Normal file
24
csrc/common/stub/op_api/level0/squeeze.h
Normal file
@@ -0,0 +1,24 @@
|
||||
/**
|
||||
* 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 OP_API_INC_LEVEL0_SQUEEZE_ND_H
|
||||
#define OP_API_INC_LEVEL0_SQUEEZE_ND_H
|
||||
|
||||
# include "opdev/op_def.h"
|
||||
|
||||
namespace l0op {
|
||||
|
||||
const aclTensor *SqueezeNd(const aclTensor *x, const aclIntArray* dim, aclOpExecutor *executor);
|
||||
|
||||
const aclTensor *SqueezeNd(const aclTensor *x, int64_t dim, aclOpExecutor *executor);
|
||||
|
||||
} // l0op
|
||||
|
||||
#endif // OP_API_INC_LEVEL0_SQUEEZE_ND_H
|
||||
21
csrc/common/stub/op_api/level0/sub.h
Normal file
21
csrc/common/stub/op_api/level0/sub.h
Normal file
@@ -0,0 +1,21 @@
|
||||
/**
|
||||
* 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 PTA_NPU_OP_API_INC_LEVEL0_OP_SUB_OP_H_
|
||||
#define PTA_NPU_OP_API_INC_LEVEL0_OP_SUB_OP_H_
|
||||
|
||||
#include "opdev/op_executor.h"
|
||||
#include "opdev/make_op_executor.h"
|
||||
|
||||
namespace l0op {
|
||||
const aclTensor *Sub(const aclTensor *self, const aclTensor *other, aclOpExecutor *executor);
|
||||
|
||||
}
|
||||
|
||||
#endif // PTA_NPU_OP_API_INC_LEVEL0_OP_SUB_OP_H_
|
||||
26
csrc/common/stub/op_api/level0/tensor_move.h
Normal file
26
csrc/common/stub/op_api/level0/tensor_move.h
Normal file
@@ -0,0 +1,26 @@
|
||||
/**
|
||||
* 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.
|
||||
*/
|
||||
|
||||
/*!
|
||||
* \file tensor_move.h
|
||||
* \brief
|
||||
*/
|
||||
|
||||
#ifndef OP_API_INC_LEVEL0_TENSOR_MOVE_H
|
||||
#define OP_API_INC_LEVEL0_TENSOR_MOVE_H
|
||||
|
||||
# include "opdev/op_def.h"
|
||||
|
||||
namespace l0op {
|
||||
|
||||
const aclTensor *TensorMove(const aclTensor *x, const aclTensor *y, aclOpExecutor *executor);
|
||||
} // l0op
|
||||
|
||||
#endif // OP_API_INC_LEVEL0_TENSOR_MOVE_H
|
||||
29
csrc/common/stub/op_api/level0/unsqueeze.h
Normal file
29
csrc/common/stub/op_api/level0/unsqueeze.h
Normal file
@@ -0,0 +1,29 @@
|
||||
/**
|
||||
* 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.
|
||||
*/
|
||||
|
||||
/*!
|
||||
* \file unsqueeze.h
|
||||
* \brief
|
||||
*/
|
||||
|
||||
#ifndef OP_API_INC_LEVEL0_UNSQUEEZE_ND_H
|
||||
#define OP_API_INC_LEVEL0_UNSQUEEZE_ND_H
|
||||
|
||||
# include "opdev/op_def.h"
|
||||
|
||||
namespace l0op {
|
||||
|
||||
const aclTensor *UnsqueezeNd(const aclTensor *x, const aclIntArray* dim, aclOpExecutor *executor);
|
||||
|
||||
const aclTensor *UnsqueezeNd(const aclTensor *x, int64_t dim, aclOpExecutor *executor);
|
||||
|
||||
} // l0op
|
||||
|
||||
#endif // OP_API_INC_LEVEL0_UNSQUEEZE_ND_H
|
||||
20
csrc/common/stub/op_api/level0/zero_op.h
Normal file
20
csrc/common/stub/op_api/level0/zero_op.h
Normal file
@@ -0,0 +1,20 @@
|
||||
/**
|
||||
* 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 PTA_NPU_OP_API_INC_LEVEL0_OP_ZERO_OP_H_
|
||||
#define PTA_NPU_OP_API_INC_LEVEL0_OP_ZERO_OP_H_
|
||||
|
||||
#include "opdev/op_executor.h"
|
||||
|
||||
namespace l0op {
|
||||
const aclTensor *ZerosLike(const aclTensor *self, aclOpExecutor *executor);
|
||||
|
||||
}
|
||||
|
||||
#endif // PTA_NPU_OP_API_INC_LEVEL0_OP_ZERO_OP_H_
|
||||
Reference in New Issue
Block a user