update commit id format

pull/1300/head
shenwei41 4 years ago
parent 4a18a6791d
commit dfb2f4b7af

@ -179,7 +179,6 @@ typedef enum {
ACL_MEMTYPE_HOST = 1, ACL_MEMTYPE_HOST = 1,
} aclMemType; } aclMemType;
/** /**
* @ingroup AscendCL * @ingroup AscendCL
* @brief Converts data of type aclFloat16 to data of type float * @brief Converts data of type aclFloat16 to data of type float
@ -312,9 +311,7 @@ ACL_FUNC_VISIBILITY size_t aclDataTypeSize(aclDataType dataType);
* @retval aclTensorDesc pointer. * @retval aclTensorDesc pointer.
* @retval nullptr if param is invalid or run out of memory * @retval nullptr if param is invalid or run out of memory
*/ */
ACL_FUNC_VISIBILITY aclTensorDesc *aclCreateTensorDesc(aclDataType dataType, ACL_FUNC_VISIBILITY aclTensorDesc *aclCreateTensorDesc(aclDataType dataType, int numDims, const int64_t *dims,
int numDims,
const int64_t *dims,
aclFormat format); aclFormat format);
/** /**
@ -336,8 +333,7 @@ ACL_FUNC_VISIBILITY void aclDestroyTensorDesc(const aclTensorDesc *desc);
* @retval ACL_SUCCESS The function is successfully executed. * @retval ACL_SUCCESS The function is successfully executed.
* @retval OtherValues Failure * @retval OtherValues Failure
*/ */
ACL_FUNC_VISIBILITY aclError aclSetTensorShapeRange(aclTensorDesc* desc, ACL_FUNC_VISIBILITY aclError aclSetTensorShapeRange(aclTensorDesc *desc, size_t dimsCount,
size_t dimsCount,
int64_t dimsRange[][ACL_TENSOR_SHAPE_RANGE_NUM]); int64_t dimsRange[][ACL_TENSOR_SHAPE_RANGE_NUM]);
/** /**
@ -434,9 +430,7 @@ ACL_FUNC_VISIBILITY aclError aclGetTensorDescDimV2(const aclTensorDesc *desc, si
* @retval ACL_SUCCESS The function is successfully executed. * @retval ACL_SUCCESS The function is successfully executed.
* @retval OtherValues Failure * @retval OtherValues Failure
*/ */
ACL_FUNC_VISIBILITY aclError aclGetTensorDescDimRange(const aclTensorDesc *desc, ACL_FUNC_VISIBILITY aclError aclGetTensorDescDimRange(const aclTensorDesc *desc, size_t index, size_t dimRangeNum,
size_t index,
size_t dimRangeNum,
int64_t *dimRange); int64_t *dimRange);
/** /**
@ -626,8 +620,7 @@ ACL_FUNC_VISIBILITY aclError aclSetTensorPlaceMent(aclTensorDesc *desc, aclMemTy
ACL_FUNC_VISIBILITY void aclAppLog(aclLogLevel logLevel, const char *func, const char *file, uint32_t line, ACL_FUNC_VISIBILITY void aclAppLog(aclLogLevel logLevel, const char *func, const char *file, uint32_t line,
const char *fmt, ...); const char *fmt, ...);
#define ACL_APP_LOG(level, fmt, ...) \ #define ACL_APP_LOG(level, fmt, ...) aclAppLog(level, __FUNCTION__, __FILE__, __LINE__, fmt, ##__VA_ARGS__)
aclAppLog(level, __FUNCTION__, __FILE__, __LINE__, fmt, ##__VA_ARGS__)
#ifdef __cplusplus #ifdef __cplusplus
} }

@ -339,8 +339,7 @@ ACL_FUNC_VISIBILITY aclError aclmdlLoadFromFile(const char *modelPath, uint32_t
* @retval ACL_SUCCESS The function is successfully executed. * @retval ACL_SUCCESS The function is successfully executed.
* @retval OtherValues Failure * @retval OtherValues Failure
*/ */
ACL_FUNC_VISIBILITY aclError aclmdlLoadFromMem(const void *model, size_t modelSize, ACL_FUNC_VISIBILITY aclError aclmdlLoadFromMem(const void *model, size_t modelSize, uint32_t *modelId);
uint32_t *modelId);
/** /**
* @ingroup AscendCL * @ingroup AscendCL
@ -362,9 +361,8 @@ ACL_FUNC_VISIBILITY aclError aclmdlLoadFromMem(const void *model, size_t modelS
* @retval ACL_SUCCESS The function is successfully executed. * @retval ACL_SUCCESS The function is successfully executed.
* @retval OtherValues Failure * @retval OtherValues Failure
*/ */
ACL_FUNC_VISIBILITY aclError aclmdlLoadFromFileWithMem(const char *modelPath, ACL_FUNC_VISIBILITY aclError aclmdlLoadFromFileWithMem(const char *modelPath, uint32_t *modelId, void *workPtr,
uint32_t *modelId, void *workPtr, size_t workSize, size_t workSize, void *weightPtr, size_t weightSize);
void *weightPtr, size_t weightSize);
/** /**
* @ingroup AscendCL * @ingroup AscendCL
@ -387,9 +385,9 @@ ACL_FUNC_VISIBILITY aclError aclmdlLoadFromFileWithMem(const char *modelPath,
* @retval ACL_SUCCESS The function is successfully executed. * @retval ACL_SUCCESS The function is successfully executed.
* @retval OtherValues Failure * @retval OtherValues Failure
*/ */
ACL_FUNC_VISIBILITY aclError aclmdlLoadFromMemWithMem(const void *model, size_t modelSize, ACL_FUNC_VISIBILITY aclError aclmdlLoadFromMemWithMem(const void *model, size_t modelSize, uint32_t *modelId,
uint32_t *modelId, void *workPtr, size_t workSize, void *workPtr, size_t workSize, void *weightPtr,
void *weightPtr, size_t weightSize); size_t weightSize);
/** /**
* @ingroup AscendCL * @ingroup AscendCL
@ -424,8 +422,8 @@ ACL_FUNC_VISIBILITY aclError aclmdlLoadFromFileWithQ(const char *modelPath, uint
* @retval OtherValues Failure * @retval OtherValues Failure
*/ */
ACL_FUNC_VISIBILITY aclError aclmdlLoadFromMemWithQ(const void *model, size_t modelSize, uint32_t *modelId, ACL_FUNC_VISIBILITY aclError aclmdlLoadFromMemWithQ(const void *model, size_t modelSize, uint32_t *modelId,
const uint32_t *inputQ, size_t inputQNum, const uint32_t *inputQ, size_t inputQNum, const uint32_t *outputQ,
const uint32_t *outputQ, size_t outputQNum); size_t outputQNum);
/** /**
* @ingroup AscendCL * @ingroup AscendCL
@ -455,8 +453,8 @@ ACL_FUNC_VISIBILITY aclError aclmdlExecute(uint32_t modelId, const aclmdlDataset
* @see aclmdlLoadFromFile | aclmdlLoadFromMem | aclmdlLoadFromFileWithMem | * @see aclmdlLoadFromFile | aclmdlLoadFromMem | aclmdlLoadFromFileWithMem |
* aclmdlLoadFromMemWithMem * aclmdlLoadFromMemWithMem
*/ */
ACL_FUNC_VISIBILITY aclError aclmdlExecuteAsync(uint32_t modelId, const aclmdlDataset *input, ACL_FUNC_VISIBILITY aclError aclmdlExecuteAsync(uint32_t modelId, const aclmdlDataset *input, aclmdlDataset *output,
aclmdlDataset *output, aclrtStream stream); aclrtStream stream);
/** /**
* @ingroup AscendCL * @ingroup AscendCL
@ -832,10 +830,10 @@ ACL_FUNC_VISIBILITY aclError aclmdlSetAIPPInputFormat(aclmdlAIPP *aippParmsSet,
* *
* @see aclmdlCreateAIPP * @see aclmdlCreateAIPP
*/ */
ACL_FUNC_VISIBILITY aclError aclmdlSetAIPPCscParams(aclmdlAIPP *aippParmsSet, int8_t csc_switch, ACL_FUNC_VISIBILITY aclError aclmdlSetAIPPCscParams(aclmdlAIPP *aippParmsSet, int8_t csc_switch, int16_t cscMatrixR0C0,
int16_t cscMatrixR0C0, int16_t cscMatrixR0C1, int16_t cscMatrixR0C2, int16_t cscMatrixR0C1, int16_t cscMatrixR0C2, int16_t cscMatrixR1C0,
int16_t cscMatrixR1C0, int16_t cscMatrixR1C1, int16_t cscMatrixR1C2, int16_t cscMatrixR1C1, int16_t cscMatrixR1C2, int16_t cscMatrixR2C0,
int16_t cscMatrixR2C0, int16_t cscMatrixR2C1, int16_t cscMatrixR2C2, int16_t cscMatrixR2C1, int16_t cscMatrixR2C2,
uint8_t cscOutputBiasR0, uint8_t cscOutputBiasR1, uint8_t cscOutputBiasR0, uint8_t cscOutputBiasR1,
uint8_t cscOutputBiasR2, uint8_t cscInputBiasR0, uint8_t cscOutputBiasR2, uint8_t cscInputBiasR0,
uint8_t cscInputBiasR1, uint8_t cscInputBiasR2); uint8_t cscInputBiasR1, uint8_t cscInputBiasR2);
@ -901,13 +899,9 @@ ACL_FUNC_VISIBILITY aclError aclmdlSetAIPPSrcImageSize(aclmdlAIPP *aippParmsSet,
* *
* @see aclmdlCreateAIPP * @see aclmdlCreateAIPP
*/ */
ACL_FUNC_VISIBILITY aclError aclmdlSetAIPPScfParams(aclmdlAIPP *aippParmsSet, ACL_FUNC_VISIBILITY aclError aclmdlSetAIPPScfParams(aclmdlAIPP *aippParmsSet, int8_t scfSwitch, int32_t scfInputSizeW,
int8_t scfSwitch, int32_t scfInputSizeH, int32_t scfOutputSizeW,
int32_t scfInputSizeW, int32_t scfOutputSizeH, uint64_t batchIndex);
int32_t scfInputSizeH,
int32_t scfOutputSizeW,
int32_t scfOutputSizeH,
uint64_t batchIndex);
/** /**
* @ingroup AscendCL * @ingroup AscendCL
@ -926,12 +920,8 @@ ACL_FUNC_VISIBILITY aclError aclmdlSetAIPPScfParams(aclmdlAIPP *aippParmsSet,
* *
* @see aclmdlCreateAIPP * @see aclmdlCreateAIPP
*/ */
ACL_FUNC_VISIBILITY aclError aclmdlSetAIPPCropParams(aclmdlAIPP *aippParmsSet, ACL_FUNC_VISIBILITY aclError aclmdlSetAIPPCropParams(aclmdlAIPP *aippParmsSet, int8_t cropSwitch, int32_t cropStartPosW,
int8_t cropSwitch, int32_t cropStartPosH, int32_t cropSizeW, int32_t cropSizeH,
int32_t cropStartPosW,
int32_t cropStartPosH,
int32_t cropSizeW,
int32_t cropSizeH,
uint64_t batchIndex); uint64_t batchIndex);
/** /**
@ -972,12 +962,9 @@ ACL_FUNC_VISIBILITY aclError aclmdlSetAIPPPaddingParams(aclmdlAIPP *aippParmsSet
* *
* @see aclmdlCreateAIPP * @see aclmdlCreateAIPP
*/ */
ACL_FUNC_VISIBILITY aclError aclmdlSetAIPPDtcPixelMean(aclmdlAIPP *aippParmsSet, ACL_FUNC_VISIBILITY aclError aclmdlSetAIPPDtcPixelMean(aclmdlAIPP *aippParmsSet, int16_t dtcPixelMeanChn0,
int16_t dtcPixelMeanChn0, int16_t dtcPixelMeanChn1, int16_t dtcPixelMeanChn2,
int16_t dtcPixelMeanChn1, int16_t dtcPixelMeanChn3, uint64_t batchIndex);
int16_t dtcPixelMeanChn2,
int16_t dtcPixelMeanChn3,
uint64_t batchIndex);
/** /**
* @ingroup AscendCL * @ingroup AscendCL
@ -995,12 +982,9 @@ ACL_FUNC_VISIBILITY aclError aclmdlSetAIPPDtcPixelMean(aclmdlAIPP *aippParmsSet,
* *
* @see aclmdlCreateAIPP * @see aclmdlCreateAIPP
*/ */
ACL_FUNC_VISIBILITY aclError aclmdlSetAIPPDtcPixelMin(aclmdlAIPP *aippParmsSet, ACL_FUNC_VISIBILITY aclError aclmdlSetAIPPDtcPixelMin(aclmdlAIPP *aippParmsSet, float dtcPixelMinChn0,
float dtcPixelMinChn0, float dtcPixelMinChn1, float dtcPixelMinChn2,
float dtcPixelMinChn1, float dtcPixelMinChn3, uint64_t batchIndex);
float dtcPixelMinChn2,
float dtcPixelMinChn3,
uint64_t batchIndex);
/** /**
* @ingroup AscendCL * @ingroup AscendCL
@ -1018,12 +1002,9 @@ ACL_FUNC_VISIBILITY aclError aclmdlSetAIPPDtcPixelMin(aclmdlAIPP *aippParmsSet,
* *
* @see aclmdlCreateAIPP * @see aclmdlCreateAIPP
*/ */
ACL_FUNC_VISIBILITY aclError aclmdlSetAIPPPixelVarReci(aclmdlAIPP *aippParmsSet, ACL_FUNC_VISIBILITY aclError aclmdlSetAIPPPixelVarReci(aclmdlAIPP *aippParmsSet, float dtcPixelVarReciChn0,
float dtcPixelVarReciChn0, float dtcPixelVarReciChn1, float dtcPixelVarReciChn2,
float dtcPixelVarReciChn1, float dtcPixelVarReciChn3, uint64_t batchIndex);
float dtcPixelVarReciChn2,
float dtcPixelVarReciChn3,
uint64_t batchIndex);
/** /**
* @ingroup AscendCL * @ingroup AscendCL
@ -1040,9 +1021,7 @@ ACL_FUNC_VISIBILITY aclError aclmdlSetAIPPPixelVarReci(aclmdlAIPP *aippParmsSet,
* @see aclmdlLoadFromFile | aclmdlLoadFromMem | aclmdlLoadFromFileWithMem | * @see aclmdlLoadFromFile | aclmdlLoadFromMem | aclmdlLoadFromFileWithMem |
* aclmdlLoadFromMemWithMem | aclmdlGetInputIndexByName | aclmdlCreateAIPP * aclmdlLoadFromMemWithMem | aclmdlGetInputIndexByName | aclmdlCreateAIPP
*/ */
ACL_FUNC_VISIBILITY aclError aclmdlSetInputAIPP(uint32_t modelId, ACL_FUNC_VISIBILITY aclError aclmdlSetInputAIPP(uint32_t modelId, aclmdlDataset *dataset, size_t index,
aclmdlDataset *dataset,
size_t index,
const aclmdlAIPP *aippParmsSet); const aclmdlAIPP *aippParmsSet);
/** /**
@ -1060,9 +1039,7 @@ ACL_FUNC_VISIBILITY aclError aclmdlSetInputAIPP(uint32_t modelId,
* @see aclmdlLoadFromFile | aclmdlLoadFromMem | aclmdlLoadFromFileWithMem | * @see aclmdlLoadFromFile | aclmdlLoadFromMem | aclmdlLoadFromFileWithMem |
* aclmdlLoadFromMemWithMem | aclmdlGetInputIndexByName | aclmdlCreateAIPP * aclmdlLoadFromMemWithMem | aclmdlGetInputIndexByName | aclmdlCreateAIPP
*/ */
ACL_FUNC_VISIBILITY aclError aclmdlSetAIPPByInputIndex(uint32_t modelId, ACL_FUNC_VISIBILITY aclError aclmdlSetAIPPByInputIndex(uint32_t modelId, aclmdlDataset *dataset, size_t index,
aclmdlDataset *dataset,
size_t index,
const aclmdlAIPP *aippParmsSet); const aclmdlAIPP *aippParmsSet);
/** /**
@ -1081,9 +1058,7 @@ ACL_FUNC_VISIBILITY aclError aclmdlSetAIPPByInputIndex(uint32_t modelId,
* @see aclmdlLoadFromFile | aclmdlLoadFromMem | aclmdlLoadFromFileWithMem | * @see aclmdlLoadFromFile | aclmdlLoadFromMem | aclmdlLoadFromFileWithMem |
* aclmdlLoadFromMemWithMem | aclmdlGetInputIndexByName | aclmdlCreateAIPP * aclmdlLoadFromMemWithMem | aclmdlGetInputIndexByName | aclmdlCreateAIPP
*/ */
ACL_FUNC_VISIBILITY aclError aclmdlGetAippType(uint32_t modelId, ACL_FUNC_VISIBILITY aclError aclmdlGetAippType(uint32_t modelId, size_t index, aclmdlInputAippType *type,
size_t index,
aclmdlInputAippType *type,
size_t *dynamicAttachedDataIndex); size_t *dynamicAttachedDataIndex);
/** /**
@ -1120,9 +1095,10 @@ ACL_FUNC_VISIBILITY aclError aclmdlGetFirstAippInfo(uint32_t modelId, size_t ind
* @retval ACL_SUCCESS The function is successfully executed * @retval ACL_SUCCESS The function is successfully executed
* @retval OtherValues Failure * @retval OtherValues Failure
*/ */
ACL_FUNC_VISIBILITY aclError aclmdlCreateAndGetOpDesc(uint32_t deviceId, uint32_t streamId, ACL_FUNC_VISIBILITY aclError aclmdlCreateAndGetOpDesc(uint32_t deviceId, uint32_t streamId, uint32_t taskId,
uint32_t taskId, char *opName, size_t opNameLen, aclTensorDesc **inputDesc, size_t *numInputs, char *opName, size_t opNameLen, aclTensorDesc **inputDesc,
aclTensorDesc **outputDesc, size_t *numOutputs); size_t *numInputs, aclTensorDesc **outputDesc,
size_t *numOutputs);
/** /**
* @ingroup AscendCL * @ingroup AscendCL

@ -208,11 +208,8 @@ ACL_FUNC_VISIBILITY aclError aclopSetAttrListString(aclopAttr *attr, const char
* @retval ACL_SUCCESS The function is successfully executed. * @retval ACL_SUCCESS The function is successfully executed.
* @retval OtherValues Failure * @retval OtherValues Failure
*/ */
ACL_FUNC_VISIBILITY aclError aclopSetAttrListListInt(aclopAttr *attr, ACL_FUNC_VISIBILITY aclError aclopSetAttrListListInt(aclopAttr *attr, const char *attrName, int numLists,
const char *attrName, const int *numValues, const int64_t *const values[]);
int numLists,
const int *numValues,
const int64_t *const values[]);
/** /**
* @ingroup AscendCL * @ingroup AscendCL
@ -242,15 +239,10 @@ ACL_FUNC_VISIBILITY aclError aclopSetAttrListListInt(aclopAttr *attr,
* @retval OtherValues Failure * @retval OtherValues Failure
*/ */
ACL_DEPRECATED_MESSAGE("aclopExecute is deprecated, use aclopExecuteV2 instead") ACL_DEPRECATED_MESSAGE("aclopExecute is deprecated, use aclopExecuteV2 instead")
ACL_FUNC_VISIBILITY aclError aclopExecute(const char *opType, ACL_FUNC_VISIBILITY aclError aclopExecute(const char *opType, int numInputs, const aclTensorDesc *const inputDesc[],
int numInputs, const aclDataBuffer *const inputs[], int numOutputs,
const aclTensorDesc *const inputDesc[], const aclTensorDesc *const outputDesc[], aclDataBuffer *const outputs[],
const aclDataBuffer *const inputs[], const aclopAttr *attr, aclrtStream stream);
int numOutputs,
const aclTensorDesc *const outputDesc[],
aclDataBuffer *const outputs[],
const aclopAttr *attr,
aclrtStream stream);
/** /**
* @ingroup AscendCL * @ingroup AscendCL
@ -280,15 +272,9 @@ ACL_FUNC_VISIBILITY aclError aclopExecute(const char *opType,
* @retval ACL_SUCCESS The function is successfully executed. * @retval ACL_SUCCESS The function is successfully executed.
* @retval OtherValues Failure * @retval OtherValues Failure
*/ */
ACL_FUNC_VISIBILITY aclError aclopExecuteV2(const char *opType, ACL_FUNC_VISIBILITY aclError aclopExecuteV2(const char *opType, int numInputs, aclTensorDesc *inputDesc[],
int numInputs, aclDataBuffer *inputs[], int numOutputs, aclTensorDesc *outputDesc[],
aclTensorDesc *inputDesc[], aclDataBuffer *outputs[], aclopAttr *attr, aclrtStream stream);
aclDataBuffer *inputs[],
int numOutputs,
aclTensorDesc *outputDesc[],
aclDataBuffer *outputs[],
aclopAttr *attr,
aclrtStream stream);
/** /**
* @ingroup AscendCL * @ingroup AscendCL
@ -306,12 +292,9 @@ ACL_FUNC_VISIBILITY aclError aclopExecuteV2(const char *opType,
* @retval ACL_SUCCESS The function is successfully executed. * @retval ACL_SUCCESS The function is successfully executed.
* @retval OtherValues Failure * @retval OtherValues Failure
*/ */
ACL_FUNC_VISIBILITY aclError aclopCreateHandle(const char *opType, ACL_FUNC_VISIBILITY aclError aclopCreateHandle(const char *opType, int numInputs,
int numInputs, const aclTensorDesc *const inputDesc[], int numOutputs,
const aclTensorDesc *const inputDesc[], const aclTensorDesc *const outputDesc[], const aclopAttr *opAttr,
int numOutputs,
const aclTensorDesc *const outputDesc[],
const aclopAttr *opAttr,
aclopHandle **handle); aclopHandle **handle);
/** /**
@ -343,12 +326,9 @@ ACL_FUNC_VISIBILITY void aclopDestroyHandle(aclopHandle *handle);
* *
* @see aclopCreateHandle | aclCreateDataBuffer * @see aclopCreateHandle | aclCreateDataBuffer
*/ */
ACL_FUNC_VISIBILITY aclError aclopExecWithHandle(aclopHandle *handle, ACL_FUNC_VISIBILITY aclError aclopExecWithHandle(aclopHandle *handle, int numInputs,
int numInputs, const aclDataBuffer *const inputs[], int numOutputs,
const aclDataBuffer *const inputs[], aclDataBuffer *const outputs[], aclrtStream stream);
int numOutputs,
aclDataBuffer *const outputs[],
aclrtStream stream);
/** /**
* @ingroup AscendCL * @ingroup AscendCL
@ -364,11 +344,8 @@ ACL_FUNC_VISIBILITY aclError aclopExecWithHandle(aclopHandle *handle,
* @retval ACL_SUCCESS The function is successfully executed. * @retval ACL_SUCCESS The function is successfully executed.
* @retval OtherValues Failure * @retval OtherValues Failure
*/ */
ACL_FUNC_VISIBILITY aclError aclopCast(const aclTensorDesc *srcDesc, ACL_FUNC_VISIBILITY aclError aclopCast(const aclTensorDesc *srcDesc, const aclDataBuffer *srcBuffer,
const aclDataBuffer *srcBuffer, const aclTensorDesc *dstDesc, aclDataBuffer *dstBuffer, uint8_t truncate,
const aclTensorDesc *dstDesc,
aclDataBuffer *dstBuffer,
uint8_t truncate,
aclrtStream stream); aclrtStream stream);
/** /**
@ -383,12 +360,9 @@ ACL_FUNC_VISIBILITY aclError aclopCast(const aclTensorDesc *srcDesc,
* @retval ACL_SUCCESS The function is successfully executed. * @retval ACL_SUCCESS The function is successfully executed.
* @retval OtherValues Failure * @retval OtherValues Failure
*/ */
ACL_FUNC_VISIBILITY aclError aclopCreateHandleForCast(aclTensorDesc *srcDesc, ACL_FUNC_VISIBILITY aclError aclopCreateHandleForCast(aclTensorDesc *srcDesc, aclTensorDesc *dstDesc, uint8_t truncate,
aclTensorDesc *dstDesc,
uint8_t truncate,
aclopHandle **handle); aclopHandle **handle);
/** /**
* @ingroup AscendCL * @ingroup AscendCL
* @brief create kernel * @brief create kernel
@ -407,15 +381,10 @@ ACL_FUNC_VISIBILITY aclError aclopCreateHandleForCast(aclTensorDesc *srcDesc,
* *
* @see aclopCompile * @see aclopCompile
*/ */
ACL_FUNC_VISIBILITY aclError aclopCreateKernel(const char *opType, ACL_FUNC_VISIBILITY aclError aclopCreateKernel(const char *opType, const char *kernelId, const char *kernelName,
const char *kernelId, void *binData, int binSize, aclopEngineType enginetype,
const char *kernelName,
void *binData,
int binSize,
aclopEngineType enginetype,
aclDataDeallocator deallocator); aclDataDeallocator deallocator);
/** /**
* @ingroup AscendCL * @ingroup AscendCL
* @brief create kernel * @brief create kernel
@ -430,11 +399,8 @@ ACL_FUNC_VISIBILITY aclError aclopCreateKernel(const char *opType,
* @retval ACL_SUCCESS The function is successfully executed. * @retval ACL_SUCCESS The function is successfully executed.
* @retval OtherValues Failure * @retval OtherValues Failure
*/ */
typedef aclError (*aclopCompileFunc)(int numInputs, typedef aclError (*aclopCompileFunc)(int numInputs, const aclTensorDesc *const inputDesc[], int numOutputs,
const aclTensorDesc *const inputDesc[], const aclTensorDesc *const outputDesc[], const aclopAttr *opAttr,
int numOutputs,
const aclTensorDesc *const outputDesc[],
const aclopAttr *opAttr,
aclopKernelDesc *aclopKernelDesc); aclopKernelDesc *aclopKernelDesc);
/** /**
@ -475,11 +441,8 @@ ACL_FUNC_VISIBILITY aclError aclopUnregisterCompileFunc(const char *opType);
* @retval ACL_SUCCESS The function is successfully executed. * @retval ACL_SUCCESS The function is successfully executed.
* @retval OtherValues Failure * @retval OtherValues Failure
*/ */
ACL_FUNC_VISIBILITY aclError aclopSetKernelArgs(aclopKernelDesc *kernelDesc, ACL_FUNC_VISIBILITY aclError aclopSetKernelArgs(aclopKernelDesc *kernelDesc, const char *kernelId, uint32_t blockDim,
const char *kernelId, const void *args, uint32_t argSize);
uint32_t blockDim,
const void *args,
uint32_t argSize);
/** /**
* @ingroup AscendCL * @ingroup AscendCL
@ -510,12 +473,9 @@ ACL_FUNC_VISIBILITY aclError aclopSetKernelWorkspaceSizes(aclopKernelDesc *kerne
* @retval ACL_SUCCESS The function is successfully executed. * @retval ACL_SUCCESS The function is successfully executed.
* @retval OtherValues Failure * @retval OtherValues Failure
*/ */
ACL_FUNC_VISIBILITY aclError aclopUpdateParams(const char *opType, ACL_FUNC_VISIBILITY aclError aclopUpdateParams(const char *opType, int numInputs,
int numInputs, const aclTensorDesc *const inputDesc[], int numOutputs,
const aclTensorDesc *const inputDesc[], const aclTensorDesc *const outputDesc[], const aclopAttr *attr);
int numOutputs,
const aclTensorDesc *const outputDesc[],
const aclopAttr *attr);
/** /**
* @ingroup AscendCL * @ingroup AscendCL
@ -533,15 +493,10 @@ ACL_FUNC_VISIBILITY aclError aclopUpdateParams(const char *opType,
* @retval ACL_SUCCESS The function is successfully executed. * @retval ACL_SUCCESS The function is successfully executed.
* @retval OtherValues Failure * @retval OtherValues Failure
*/ */
ACL_FUNC_VISIBILITY aclError aclopInferShape(const char *opType, ACL_FUNC_VISIBILITY aclError aclopInferShape(const char *opType, int numInputs, aclTensorDesc *inputDesc[],
int numInputs, aclDataBuffer *inputs[], int numOutputs, aclTensorDesc *outputDesc[],
aclTensorDesc *inputDesc[],
aclDataBuffer *inputs[],
int numOutputs,
aclTensorDesc *outputDesc[],
aclopAttr *attr); aclopAttr *attr);
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif

@ -24,10 +24,7 @@
extern "C" { extern "C" {
#endif #endif
typedef enum aclCompileType { typedef enum aclCompileType { ACL_COMPILE_SYS, ACL_COMPILE_UNREGISTERED } aclopCompileType;
ACL_COMPILE_SYS,
ACL_COMPILE_UNREGISTERED
} aclopCompileType;
typedef enum { typedef enum {
ACL_PRECISION_MODE, ACL_PRECISION_MODE,
@ -59,15 +56,10 @@ typedef enum {
* @retval ACL_SUCCESS The function is successfully executed. * @retval ACL_SUCCESS The function is successfully executed.
* @retval OtherValues Failure * @retval OtherValues Failure
*/ */
ACL_FUNC_VISIBILITY aclError aclopCompile(const char *opType, ACL_FUNC_VISIBILITY aclError aclopCompile(const char *opType, int numInputs, const aclTensorDesc *const inputDesc[],
int numInputs, int numOutputs, const aclTensorDesc *const outputDesc[],
const aclTensorDesc *const inputDesc[], const aclopAttr *attr, aclopEngineType engineType,
int numOutputs, aclopCompileType compileFlag, const char *opPath);
const aclTensorDesc *const outputDesc[],
const aclopAttr *attr,
aclopEngineType engineType,
aclopCompileType compileFlag,
const char *opPath);
/** /**
* @ingroup AscendCL * @ingroup AscendCL
@ -90,11 +82,10 @@ ACL_FUNC_VISIBILITY aclError aclopCompile(const char *opType,
* @retval ACL_SUCCESS The function is successfully executed. * @retval ACL_SUCCESS The function is successfully executed.
* @retval OtherValues Failure * @retval OtherValues Failure
*/ */
ACL_FUNC_VISIBILITY aclError aclopCompileAndExecute(const char *opType, ACL_FUNC_VISIBILITY aclError aclopCompileAndExecute(
int numInputs, const aclTensorDesc *const inputDesc[], const aclDataBuffer *const inputs[], const char *opType, int numInputs, const aclTensorDesc *const inputDesc[], const aclDataBuffer *const inputs[],
int numOutputs, const aclTensorDesc *const outputDesc[], aclDataBuffer *const outputs[], int numOutputs, const aclTensorDesc *const outputDesc[], aclDataBuffer *const outputs[], const aclopAttr *attr,
const aclopAttr *attr, aclopEngineType engineType, aclopCompileType compileFlag, aclopEngineType engineType, aclopCompileType compileFlag, const char *opPath, aclrtStream stream);
const char *opPath, aclrtStream stream);
/** /**
* @ingroup AscendCL * @ingroup AscendCL

@ -101,7 +101,8 @@ ACL_FUNC_VISIBILITY aclError aclprofStart(const aclprofConfig *profilerConfig);
* @see aclprofDestroyConfig * @see aclprofDestroyConfig
*/ */
ACL_FUNC_VISIBILITY aclprofConfig *aclprofCreateConfig(uint32_t *deviceIdList, uint32_t deviceNums, ACL_FUNC_VISIBILITY aclprofConfig *aclprofCreateConfig(uint32_t *deviceIdList, uint32_t deviceNums,
aclprofAicoreMetrics aicoreMetrics, aclprofAicoreEvents *aicoreEvents, uint64_t dataTypeConfig); aclprofAicoreMetrics aicoreMetrics,
aclprofAicoreEvents *aicoreEvents, uint64_t dataTypeConfig);
/** /**
* @ingroup AscendCL * @ingroup AscendCL
@ -141,8 +142,7 @@ ACL_FUNC_VISIBILITY aclError aclprofStop(const aclprofConfig *profilerConfig);
* *
* @see aclprofModelUnSubscribe * @see aclprofModelUnSubscribe
*/ */
ACL_FUNC_VISIBILITY aclError aclprofModelSubscribe(uint32_t modelId, ACL_FUNC_VISIBILITY aclError aclprofModelSubscribe(uint32_t modelId, const aclprofSubscribeConfig *profSubscribeConfig);
const aclprofSubscribeConfig *profSubscribeConfig);
/** /**
* @ingroup AscendCL * @ingroup AscendCL
@ -237,8 +237,8 @@ ACL_FUNC_VISIBILITY aclError aclprofGetOpTypeLen(const void *opInfo, size_t opIn
* @retval ACL_SUCCESS The function is successfully executed. * @retval ACL_SUCCESS The function is successfully executed.
* @retval OtherValues Failure * @retval OtherValues Failure
*/ */
ACL_FUNC_VISIBILITY aclError aclprofGetOpType(const void *opInfo, size_t opInfoLen, uint32_t index, ACL_FUNC_VISIBILITY aclError aclprofGetOpType(const void *opInfo, size_t opInfoLen, uint32_t index, char *opType,
char *opType, size_t opTypeLen); size_t opTypeLen);
/** /**
* @ingroup AscendCL * @ingroup AscendCL
@ -268,8 +268,8 @@ ACL_FUNC_VISIBILITY aclError aclprofGetOpNameLen(const void *opInfo, size_t opIn
* @retval ACL_SUCCESS The function is successfully executed. * @retval ACL_SUCCESS The function is successfully executed.
* @retval OtherValues Failure * @retval OtherValues Failure
*/ */
ACL_FUNC_VISIBILITY aclError aclprofGetOpName(const void *opInfo, size_t opInfoLen, uint32_t index, ACL_FUNC_VISIBILITY aclError aclprofGetOpName(const void *opInfo, size_t opInfoLen, uint32_t index, char *opName,
char *opName, size_t opNameLen); size_t opNameLen);
/** /**
* @ingroup AscendCL * @ingroup AscendCL

@ -549,9 +549,7 @@ ACL_FUNC_VISIBILITY aclError aclrtEventElapsedTime(float *ms, aclrtEvent start,
* *
* @see aclrtFree | acldvppMalloc | aclrtMallocCached * @see aclrtFree | acldvppMalloc | aclrtMallocCached
*/ */
ACL_FUNC_VISIBILITY aclError aclrtMalloc(void **devPtr, ACL_FUNC_VISIBILITY aclError aclrtMalloc(void **devPtr, size_t size, aclrtMemMallocPolicy policy);
size_t size,
aclrtMemMallocPolicy policy);
/** /**
* @ingroup AscendCL * @ingroup AscendCL
@ -574,9 +572,7 @@ ACL_FUNC_VISIBILITY aclError aclrtMalloc(void **devPtr,
* *
* @see aclrtFree | aclrtMalloc * @see aclrtFree | aclrtMalloc
*/ */
ACL_FUNC_VISIBILITY aclError aclrtMallocCached(void **devPtr, ACL_FUNC_VISIBILITY aclError aclrtMallocCached(void **devPtr, size_t size, aclrtMemMallocPolicy policy);
size_t size,
aclrtMemMallocPolicy policy);
/** /**
* @ingroup AscendCL * @ingroup AscendCL
@ -667,10 +663,7 @@ ACL_FUNC_VISIBILITY aclError aclrtFreeHost(void *hostPtr);
* @retval ACL_SUCCESS The function is successfully executed. * @retval ACL_SUCCESS The function is successfully executed.
* @retval OtherValues Failure * @retval OtherValues Failure
*/ */
ACL_FUNC_VISIBILITY aclError aclrtMemcpy(void *dst, ACL_FUNC_VISIBILITY aclError aclrtMemcpy(void *dst, size_t destMax, const void *src, size_t count,
size_t destMax,
const void *src,
size_t count,
aclrtMemcpyKind kind); aclrtMemcpyKind kind);
/** /**
@ -717,12 +710,8 @@ ACL_FUNC_VISIBILITY aclError aclrtMemset(void *devPtr, size_t maxCount, int32_t
* *
* @see aclrtSynchronizeStream * @see aclrtSynchronizeStream
*/ */
ACL_FUNC_VISIBILITY aclError aclrtMemcpyAsync(void *dst, ACL_FUNC_VISIBILITY aclError aclrtMemcpyAsync(void *dst, size_t destMax, const void *src, size_t count,
size_t destMax, aclrtMemcpyKind kind, aclrtStream stream);
const void *src,
size_t count,
aclrtMemcpyKind kind,
aclrtStream stream);
/** /**
* @ingroup AscendCL * @ingroup AscendCL
@ -745,10 +734,7 @@ ACL_FUNC_VISIBILITY aclError aclrtMemcpyAsync(void *dst,
* *
* @see aclrtSynchronizeStream * @see aclrtSynchronizeStream
*/ */
ACL_FUNC_VISIBILITY aclError aclrtMemsetAsync(void *devPtr, ACL_FUNC_VISIBILITY aclError aclrtMemsetAsync(void *devPtr, size_t maxCount, int32_t value, size_t count,
size_t maxCount,
int32_t value,
size_t count,
aclrtStream stream); aclrtStream stream);
/** /**
@ -894,11 +880,8 @@ ACL_FUNC_VISIBILITY aclError aclrtGetAllGroupInfo(aclrtGroupInfo *groupInfo);
* *
* @see aclrtGetGroupCount | aclrtGetAllGroupInfo * @see aclrtGetGroupCount | aclrtGetAllGroupInfo
*/ */
ACL_FUNC_VISIBILITY aclError aclrtGetGroupInfoDetail(const aclrtGroupInfo *groupInfo, ACL_FUNC_VISIBILITY aclError aclrtGetGroupInfoDetail(const aclrtGroupInfo *groupInfo, int32_t groupIndex,
int32_t groupIndex, aclrtGroupAttr attr, void *attrValue, size_t valueLen,
aclrtGroupAttr attr,
void *attrValue,
size_t valueLen,
size_t *paramRetSize); size_t *paramRetSize);
/** /**
@ -962,4 +945,3 @@ ACL_FUNC_VISIBILITY aclError aclrtGetMemInfo(aclrtMemAttr attr, size_t *free, si
#endif #endif
#endif // INC_EXTERNAL_ACL_ACL_RT_H_ #endif // INC_EXTERNAL_ACL_ACL_RT_H_

@ -118,12 +118,8 @@ ACL_FUNC_VISIBILITY aclError acltdtGetDimsFromItem(const acltdtDataItem *dataIte
* *
* @see acltdtDestroyDataItem * @see acltdtDestroyDataItem
*/ */
ACL_FUNC_VISIBILITY acltdtDataItem *acltdtCreateDataItem(acltdtTensorType tdtType, ACL_FUNC_VISIBILITY acltdtDataItem *acltdtCreateDataItem(acltdtTensorType tdtType, const int64_t *dims, size_t dimNum,
const int64_t *dims, aclDataType dataType, void *data, size_t size);
size_t dimNum,
aclDataType dataType,
void *data,
size_t size);
/** /**
* @ingroup AscendCL * @ingroup AscendCL
@ -254,8 +250,7 @@ ACL_FUNC_VISIBILITY aclError acltdtDestroyChannel(acltdtChannelHandle *handle);
* *
* @see acltdtReceiveTensor * @see acltdtReceiveTensor
*/ */
ACL_FUNC_VISIBILITY aclError acltdtSendTensor(const acltdtChannelHandle *handle, ACL_FUNC_VISIBILITY aclError acltdtSendTensor(const acltdtChannelHandle *handle, const acltdtDataset *dataset,
const acltdtDataset *dataset,
int32_t timeout); int32_t timeout);
/** /**
@ -271,8 +266,7 @@ ACL_FUNC_VISIBILITY aclError acltdtSendTensor(const acltdtChannelHandle *handle,
* *
* @see acltdtSendTensor * @see acltdtSendTensor
*/ */
ACL_FUNC_VISIBILITY aclError acltdtReceiveTensor(const acltdtChannelHandle *handle, ACL_FUNC_VISIBILITY aclError acltdtReceiveTensor(const acltdtChannelHandle *handle, acltdtDataset *dataset,
acltdtDataset *dataset,
int32_t timeout); int32_t timeout);
#ifdef __cplusplus #ifdef __cplusplus
@ -280,4 +274,3 @@ ACL_FUNC_VISIBILITY aclError acltdtReceiveTensor(const acltdtChannelHandle *hand
#endif #endif
#endif // INC_EXTERNAL_ACL_ACL_TDT_H_ #endif // INC_EXTERNAL_ACL_ACL_TDT_H_

@ -23,17 +23,9 @@
extern "C" { extern "C" {
#endif #endif
typedef enum aclTransType { typedef enum aclTransType { ACL_TRANS_N, ACL_TRANS_T, ACL_TRANS_NZ, ACL_TRANS_NZ_T } aclTransType;
ACL_TRANS_N,
ACL_TRANS_T,
ACL_TRANS_NZ,
ACL_TRANS_NZ_T
} aclTransType;
typedef enum aclComputeType { typedef enum aclComputeType { ACL_COMPUTE_HIGH_PRECISION, ACL_COMPUTE_LOW_PRECISION } aclComputeType;
ACL_COMPUTE_HIGH_PRECISION,
ACL_COMPUTE_LOW_PRECISION
} aclComputeType;
/** /**
* @ingroup AscendCL * @ingroup AscendCL
@ -62,9 +54,8 @@ typedef enum aclComputeType {
* @retval ACL_SUCCESS The function is successfully executed. * @retval ACL_SUCCESS The function is successfully executed.
* @retval OtherValues Failure * @retval OtherValues Failure
*/ */
ACL_FUNC_VISIBILITY aclError aclblasGemvEx(aclTransType transA, int m, int n, ACL_FUNC_VISIBILITY aclError aclblasGemvEx(aclTransType transA, int m, int n, const void *alpha, const void *a, int lda,
const void *alpha, const void *a, int lda, aclDataType dataTypeA, aclDataType dataTypeA, const void *x, int incx, aclDataType dataTypeX,
const void *x, int incx, aclDataType dataTypeX,
const void *beta, void *y, int incy, aclDataType dataTypeY, const void *beta, void *y, int incy, aclDataType dataTypeY,
aclComputeType type, aclrtStream stream); aclComputeType type, aclrtStream stream);
@ -84,14 +75,9 @@ ACL_FUNC_VISIBILITY aclError aclblasGemvEx(aclTransType transA, int m, int n,
* @retval ACL_SUCCESS The function is successfully executed. * @retval ACL_SUCCESS The function is successfully executed.
* @retval OtherValues Failure * @retval OtherValues Failure
*/ */
ACL_FUNC_VISIBILITY aclError aclblasCreateHandleForGemvEx(aclTransType transA, ACL_FUNC_VISIBILITY aclError aclblasCreateHandleForGemvEx(aclTransType transA, int m, int n, aclDataType dataTypeA,
int m, aclDataType dataTypeX, aclDataType dataTypeY,
int n, aclComputeType type, aclopHandle **handle);
aclDataType dataTypeA,
aclDataType dataTypeX,
aclDataType dataTypeY,
aclComputeType type,
aclopHandle **handle);
/** /**
* @ingroup AscendCL * @ingroup AscendCL
@ -115,18 +101,9 @@ ACL_FUNC_VISIBILITY aclError aclblasCreateHandleForGemvEx(aclTransType transA,
* @retval ACL_SUCCESS The function is successfully executed. * @retval ACL_SUCCESS The function is successfully executed.
* @retval OtherValues Failure * @retval OtherValues Failure
*/ */
ACL_FUNC_VISIBILITY aclError aclblasHgemv(aclTransType transA, ACL_FUNC_VISIBILITY aclError aclblasHgemv(aclTransType transA, int m, int n, const aclFloat16 *alpha,
int m, const aclFloat16 *a, int lda, const aclFloat16 *x, int incx,
int n, const aclFloat16 *beta, aclFloat16 *y, int incy, aclComputeType type,
const aclFloat16 *alpha,
const aclFloat16 *a,
int lda,
const aclFloat16 *x,
int incx,
const aclFloat16 *beta,
aclFloat16 *y,
int incy,
aclComputeType type,
aclrtStream stream); aclrtStream stream);
/** /**
@ -142,10 +119,7 @@ ACL_FUNC_VISIBILITY aclError aclblasHgemv(aclTransType transA,
* @retval ACL_SUCCESS The function is successfully executed. * @retval ACL_SUCCESS The function is successfully executed.
* @retval OtherValues Failure * @retval OtherValues Failure
*/ */
ACL_FUNC_VISIBILITY aclError aclblasCreateHandleForHgemv(aclTransType transA, ACL_FUNC_VISIBILITY aclError aclblasCreateHandleForHgemv(aclTransType transA, int m, int n, aclComputeType type,
int m,
int n,
aclComputeType type,
aclopHandle **handle); aclopHandle **handle);
/** /**
@ -171,19 +145,9 @@ ACL_FUNC_VISIBILITY aclError aclblasCreateHandleForHgemv(aclTransType transA,
* @retval ACL_SUCCESS The function is successfully executed. * @retval ACL_SUCCESS The function is successfully executed.
* @retval OtherValues Failure * @retval OtherValues Failure
*/ */
ACL_FUNC_VISIBILITY aclError aclblasS8gemv(aclTransType transA, ACL_FUNC_VISIBILITY aclError aclblasS8gemv(aclTransType transA, int m, int n, const int32_t *alpha, const int8_t *a,
int m, int lda, const int8_t *x, int incx, const int32_t *beta, int32_t *y,
int n, int incy, aclComputeType type, aclrtStream stream);
const int32_t *alpha,
const int8_t *a,
int lda,
const int8_t *x,
int incx,
const int32_t *beta,
int32_t *y,
int incy,
aclComputeType type,
aclrtStream stream);
/** /**
* @ingroup AscendCL * @ingroup AscendCL
@ -198,10 +162,7 @@ ACL_FUNC_VISIBILITY aclError aclblasS8gemv(aclTransType transA,
* @retval ACL_SUCCESS The function is successfully executed. * @retval ACL_SUCCESS The function is successfully executed.
* @retval OtherValues Failure * @retval OtherValues Failure
*/ */
ACL_FUNC_VISIBILITY aclError aclblasCreateHandleForS8gemv(aclTransType transA, ACL_FUNC_VISIBILITY aclError aclblasCreateHandleForS8gemv(aclTransType transA, int m, int n, aclComputeType type,
int m,
int n,
aclComputeType type,
aclopHandle **handle); aclopHandle **handle);
/** /**
@ -233,26 +194,11 @@ ACL_FUNC_VISIBILITY aclError aclblasCreateHandleForS8gemv(aclTransType transA,
* @retval ACL_SUCCESS The function is successfully executed. * @retval ACL_SUCCESS The function is successfully executed.
* @retval OtherValues Failure * @retval OtherValues Failure
*/ */
ACL_FUNC_VISIBILITY aclError aclblasGemmEx(aclTransType transA, ACL_FUNC_VISIBILITY aclError aclblasGemmEx(aclTransType transA, aclTransType transB, aclTransType transC, int m, int n,
aclTransType transB, int k, const void *alpha, const void *matrixA, int lda,
aclTransType transC, aclDataType dataTypeA, const void *matrixB, int ldb, aclDataType dataTypeB,
int m, const void *beta, void *matrixC, int ldc, aclDataType dataTypeC,
int n, aclComputeType type, aclrtStream stream);
int k,
const void *alpha,
const void *matrixA,
int lda,
aclDataType dataTypeA,
const void *matrixB,
int ldb,
aclDataType dataTypeB,
const void *beta,
void *matrixC,
int ldc,
aclDataType dataTypeC,
aclComputeType type,
aclrtStream stream);
/** /**
* @ingroup AscendCL * @ingroup AscendCL
@ -274,18 +220,10 @@ ACL_FUNC_VISIBILITY aclError aclblasGemmEx(aclTransType transA,
* @retval ACL_SUCCESS The function is successfully executed. * @retval ACL_SUCCESS The function is successfully executed.
* @retval OtherValues Failure * @retval OtherValues Failure
*/ */
ACL_FUNC_VISIBILITY aclError aclblasCreateHandleForGemmEx(aclTransType transA, ACL_FUNC_VISIBILITY aclError aclblasCreateHandleForGemmEx(aclTransType transA, aclTransType transB, aclTransType transC,
aclTransType transB, int m, int n, int k, aclDataType dataTypeA,
aclTransType transC, aclDataType dataTypeB, aclDataType dataTypeC,
int m, aclComputeType type, aclopHandle **handle);
int n,
int k,
aclDataType dataTypeA,
aclDataType dataTypeB,
aclDataType dataTypeC,
aclComputeType type,
aclopHandle **handle);
/** /**
* @ingroup AscendCL * @ingroup AscendCL
@ -313,22 +251,10 @@ ACL_FUNC_VISIBILITY aclError aclblasCreateHandleForGemmEx(aclTransType transA,
* @retval ACL_SUCCESS The function is successfully executed. * @retval ACL_SUCCESS The function is successfully executed.
* @retval OtherValues Failure * @retval OtherValues Failure
*/ */
ACL_FUNC_VISIBILITY aclError aclblasHgemm(aclTransType transA, ACL_FUNC_VISIBILITY aclError aclblasHgemm(aclTransType transA, aclTransType transB, aclTransType transC, int m, int n,
aclTransType transB, int k, const aclFloat16 *alpha, const aclFloat16 *matrixA, int lda,
aclTransType transC, const aclFloat16 *matrixB, int ldb, const aclFloat16 *beta,
int m, aclFloat16 *matrixC, int ldc, aclComputeType type, aclrtStream stream);
int n,
int k,
const aclFloat16 *alpha,
const aclFloat16 *matrixA,
int lda,
const aclFloat16 *matrixB,
int ldb,
const aclFloat16 *beta,
aclFloat16 *matrixC,
int ldc,
aclComputeType type,
aclrtStream stream);
/** /**
* @ingroup AscendCL * @ingroup AscendCL
@ -346,13 +272,8 @@ ACL_FUNC_VISIBILITY aclError aclblasHgemm(aclTransType transA,
* @retval ACL_SUCCESS The function is successfully executed. * @retval ACL_SUCCESS The function is successfully executed.
* @retval OtherValues Failure * @retval OtherValues Failure
*/ */
ACL_FUNC_VISIBILITY aclError aclblasCreateHandleForHgemm(aclTransType transA, ACL_FUNC_VISIBILITY aclError aclblasCreateHandleForHgemm(aclTransType transA, aclTransType transB, aclTransType transC,
aclTransType transB, int m, int n, int k, aclComputeType type,
aclTransType transC,
int m,
int n,
int k,
aclComputeType type,
aclopHandle **handle); aclopHandle **handle);
/** /**
@ -381,23 +302,10 @@ ACL_FUNC_VISIBILITY aclError aclblasCreateHandleForHgemm(aclTransType transA,
* @retval ACL_SUCCESS The function is successfully executed. * @retval ACL_SUCCESS The function is successfully executed.
* @retval OtherValues Failure * @retval OtherValues Failure
*/ */
ACL_FUNC_VISIBILITY aclError aclblasS8gemm(aclTransType transA, ACL_FUNC_VISIBILITY aclError aclblasS8gemm(aclTransType transA, aclTransType transB, aclTransType transC, int m, int n,
aclTransType transB, int k, const int32_t *alpha, const int8_t *matrixA, int lda,
aclTransType transC, const int8_t *matrixB, int ldb, const int32_t *beta, int32_t *matrixC,
int m, int ldc, aclComputeType type, aclrtStream stream);
int n,
int k,
const int32_t *alpha,
const int8_t *matrixA,
int lda,
const int8_t *matrixB,
int ldb,
const int32_t *beta,
int32_t *matrixC,
int ldc,
aclComputeType type,
aclrtStream stream);
/** /**
* @ingroup AscendCL * @ingroup AscendCL
@ -415,13 +323,8 @@ ACL_FUNC_VISIBILITY aclError aclblasS8gemm(aclTransType transA,
* @retval ACL_SUCCESS The function is successfully executed. * @retval ACL_SUCCESS The function is successfully executed.
* @retval OtherValues Failure * @retval OtherValues Failure
*/ */
ACL_FUNC_VISIBILITY aclError aclblasCreateHandleForS8gemm(aclTransType transA, ACL_FUNC_VISIBILITY aclError aclblasCreateHandleForS8gemm(aclTransType transA, aclTransType transB, aclTransType transC,
aclTransType transB, int m, int n, int k, aclComputeType type,
aclTransType transC,
int m,
int n,
int k,
aclComputeType type,
aclopHandle **handle); aclopHandle **handle);
#ifdef __cplusplus #ifdef __cplusplus

@ -104,7 +104,8 @@ ACL_FUNC_VISIBILITY aclError aclfvSetNMTopNum(aclfvInitPara *initPara, uint32_t
* @retval OtherValues success. * @retval OtherValues success.
*/ */
ACL_FUNC_VISIBILITY aclfvFeatureInfo *aclfvCreateFeatureInfo(uint32_t id0, uint32_t id1, uint32_t offset, ACL_FUNC_VISIBILITY aclfvFeatureInfo *aclfvCreateFeatureInfo(uint32_t id0, uint32_t id1, uint32_t offset,
uint32_t featureLen, uint32_t featureCount, uint8_t *featureData, uint32_t featureDataLen); uint32_t featureLen, uint32_t featureCount,
uint8_t *featureData, uint32_t featureDataLen);
/** /**
* @ingroup AscendCL * @ingroup AscendCL
@ -233,7 +234,8 @@ ACL_FUNC_VISIBILITY aclError aclfvDestroySearchInput(aclfvSearchInput *searchInp
* @retval null for failed. OtherValues success * @retval null for failed. OtherValues success
*/ */
ACL_FUNC_VISIBILITY aclfvSearchResult *aclfvCreateSearchResult(uint32_t queryCnt, uint32_t *resultNum, ACL_FUNC_VISIBILITY aclfvSearchResult *aclfvCreateSearchResult(uint32_t queryCnt, uint32_t *resultNum,
uint32_t resultNumDataLen, uint32_t *id0, uint32_t *id1, uint32_t *resultOffset, float *resultDistance, uint32_t resultNumDataLen, uint32_t *id0, uint32_t *id1,
uint32_t *resultOffset, float *resultDistance,
uint32_t dataLen); uint32_t dataLen);
/** /**

@ -66,14 +66,15 @@ extern HcclResult HcclCommInitRootInfo(uint32_t nRanks, const HcclRootInfo *root
* @param sendBuf A pointer identifying the input data address of the operator. * @param sendBuf A pointer identifying the input data address of the operator.
* @param recvBuf A pointer identifying the output data address of the operator. * @param recvBuf A pointer identifying the output data address of the operator.
* @param count An integer(u64) identifying the number of the output data. * @param count An integer(u64) identifying the number of the output data.
* @param dataType The data type of the operator, must be one of the following types: int8, int16, int32, float16, float32. * @param dataType The data type of the operator, must be one of the following types: int8, int16, int32, float16,
* float32.
* @param op The reduction type of the operator, must be one of the following types: sum, min, max, prod. * @param op The reduction type of the operator, must be one of the following types: sum, min, max, prod.
* @param comm A pointer identifying the communication resource based on. * @param comm A pointer identifying the communication resource based on.
* @param stream A pointer identifying the stream information. * @param stream A pointer identifying the stream information.
* @return HcclResult * @return HcclResult
*/ */
extern HcclResult HcclAllReduce(void *sendBuf, void *recvBuf, uint64_t count, HcclDataType dataType, extern HcclResult HcclAllReduce(void *sendBuf, void *recvBuf, uint64_t count, HcclDataType dataType, HcclReduceOp op,
HcclReduceOp op, HcclComm comm, aclrtStream stream); HcclComm comm, aclrtStream stream);
/** /**
* @brief Broadcast operator. * @brief Broadcast operator.
@ -115,8 +116,8 @@ HcclReduceOp op, HcclComm comm, aclrtStream stream);
* @param stream A pointer identifying the stream information. * @param stream A pointer identifying the stream information.
* @return HcclResult * @return HcclResult
*/ */
extern HcclResult HcclAllGather(void *sendBuf, void *recvBuf, uint64_t sendCount, HcclDataType dataType, extern HcclResult HcclAllGather(void *sendBuf, void *recvBuf, uint64_t sendCount, HcclDataType dataType, HcclComm comm,
HcclComm comm, aclrtStream stream); aclrtStream stream);
/** /**
* @brief Destroy HCCL comm * @brief Destroy HCCL comm

Loading…
Cancel
Save