* 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.
*/
#include "api_error.hpp"
namespace cce {
namespace runtime {
rtError_t ValidateStreamLaunchBlockingSet(const Stream* const stm, const uint32_t launchBlockingMode)
{
UNUSED(stm);
UNUSED(launchBlockingMode);
return RT_ERROR_FEATURE_NOT_SUPPORT;
}
rtError_t ValidateStreamLaunchBlockingGet(const Stream* const stm)
{
UNUSED(stm);
return RT_ERROR_FEATURE_NOT_SUPPORT;
}
rtError_t ApiErrorDecorator::NonBlockingLaunchBegin(Stream* const stream, const uint64_t flag)
{
UNUSED(stream);
UNUSED(flag);
return RT_ERROR_FEATURE_NOT_SUPPORT;
}
rtError_t ApiErrorDecorator::NonBlockingLaunchEnd(Stream* const stream, const uint64_t flag)
{
UNUSED(stream);
UNUSED(flag);
return RT_ERROR_FEATURE_NOT_SUPPORT;
}
rtError_t ApiErrorDecorator::WriteValuePtr(void* const writeValueInfo, Stream* const stm, void* const pointedAddr)
{
UNUSED(writeValueInfo);
UNUSED(stm);
UNUSED(pointedAddr);
return RT_ERROR_FEATURE_NOT_SUPPORT;
}
rtError_t ApiErrorDecorator::CntNotifyCreate(const int32_t deviceId, CountNotify** const cntNotify, const uint32_t flag)
{
UNUSED(deviceId);
UNUSED(cntNotify);
UNUSED(flag);
return RT_ERROR_FEATURE_NOT_SUPPORT;
}
rtError_t ApiErrorDecorator::CntNotifyDestroy(CountNotify* const inCntNotify)
{
UNUSED(inCntNotify);
return RT_ERROR_FEATURE_NOT_SUPPORT;
}
rtError_t ApiErrorDecorator::CntNotifyRecord(
CountNotify* const inCntNotify, Stream* const stm, const rtCntNtyRecordInfo_t* const info)
{
UNUSED(inCntNotify);
UNUSED(stm);
UNUSED(info);
return RT_ERROR_FEATURE_NOT_SUPPORT;
}
rtError_t ApiErrorDecorator::CntNotifyWaitWithTimeout(
CountNotify* const inCntNotify, Stream* const stm, const rtCntNtyWaitInfo_t* const info)
{
UNUSED(inCntNotify);
UNUSED(stm);
UNUSED(info);
return RT_ERROR_FEATURE_NOT_SUPPORT;
}
rtError_t ApiErrorDecorator::CntNotifyReset(CountNotify* const inCntNotify, Stream* const stm)
{
UNUSED(inCntNotify);
UNUSED(stm);
return RT_ERROR_FEATURE_NOT_SUPPORT;
}
rtError_t ApiErrorDecorator::GetCntNotifyAddress(
CountNotify* const inCntNotify, uint64_t* const cntNotifyAddress, rtNotifyType_t const regType)
{
UNUSED(inCntNotify);
UNUSED(cntNotifyAddress);
UNUSED(regType);
return RT_ERROR_FEATURE_NOT_SUPPORT;
}
rtError_t ApiErrorDecorator::GetCntNotifyId(CountNotify* const inCntNotify, uint32_t* const notifyId)
{
UNUSED(inCntNotify);
UNUSED(notifyId);
return RT_ERROR_FEATURE_NOT_SUPPORT;
}
rtError_t ApiErrorDecorator::WriteValue(rtWriteValueInfo_t* const info, Stream* const stm)
{
UNUSED(info);
UNUSED(stm);
return RT_ERROR_FEATURE_NOT_SUPPORT;
}
rtError_t ApiErrorDecorator::CCULaunch(rtCcuTaskInfo_t* taskInfo, Stream* const stm)
{
UNUSED(taskInfo);
UNUSED(stm);
return RT_ERROR_FEATURE_NOT_SUPPORT;
}
rtError_t ApiErrorDecorator::UbDevQueryInfo(rtUbDevQueryCmd cmd, void* devInfo)
{
UNUSED(cmd);
UNUSED(devInfo);
return RT_ERROR_FEATURE_NOT_SUPPORT;
}
rtError_t ApiErrorDecorator::GetDevResAddress(const rtDevResInfo* const resInfo, rtDevResAddrInfo* const addrInfo)
{
UNUSED(resInfo);
UNUSED(addrInfo);
return RT_ERROR_FEATURE_NOT_SUPPORT;
}
rtError_t ApiErrorDecorator::ReleaseDevResAddress(rtDevResInfo* const resInfo)
{
UNUSED(resInfo);
return RT_ERROR_FEATURE_NOT_SUPPORT;
}
rtError_t ApiErrorDecorator::UbDbSend(rtUbDbInfo_t* const dbInfo, Stream* const stm)
{
UNUSED(dbInfo);
UNUSED(stm);
return RT_ERROR_FEATURE_NOT_SUPPORT;
}
rtError_t ApiErrorDecorator::UbDirectSend(rtUbWqeInfo_t* const wqeInfo, Stream* const stm)
{
UNUSED(wqeInfo);
UNUSED(stm);
return RT_ERROR_FEATURE_NOT_SUPPORT;
}
rtError_t ApiErrorDecorator::FusionLaunch(void* const fusionInfo, Stream* const stm, rtFusionArgsEx_t* argsInfo)
{
UNUSED(fusionInfo);
UNUSED(stm);
UNUSED(argsInfo);
return RT_ERROR_FEATURE_NOT_SUPPORT;
}
rtError_t ApiErrorDecorator::StreamTaskAbort(Stream* const stm)
{
UNUSED(stm);
return RT_ERROR_FEATURE_NOT_SUPPORT;
}
rtError_t ApiErrorDecorator::DeviceTaskAbort(const int32_t devId, const uint32_t timeout)
{
UNUSED(devId);
UNUSED(timeout);
return RT_ERROR_FEATURE_NOT_SUPPORT;
}
rtError_t ApiErrorDecorator::StreamRecover(Stream* const stm)
{
UNUSED(stm);
return RT_ERROR_FEATURE_NOT_SUPPORT;
}
rtError_t ApiErrorDecorator::StreamTaskClean(Stream* const stm)
{
UNUSED(stm);
return RT_ERROR_FEATURE_NOT_SUPPORT;
}
rtError_t ApiErrorDecorator::DeviceResourceClean(const int32_t devId)
{
UNUSED(devId);
return RT_ERROR_FEATURE_NOT_SUPPORT;
}
rtError_t ApiErrorDecorator::GetBinaryDeviceBaseAddr(const Program* const prog, void** deviceBase)
{
UNUSED(prog);
UNUSED(deviceBase);
return RT_ERROR_FEATURE_NOT_SUPPORT;
}
rtError_t ApiErrorDecorator::FftsPlusTaskLaunch(
const rtFftsPlusTaskInfo_t* const fftsPlusTaskInfo, Stream* const stm, const uint32_t flag)
{
UNUSED(fftsPlusTaskInfo);
UNUSED(stm);
UNUSED(flag);
return RT_ERROR_FEATURE_NOT_SUPPORT;
}
rtError_t ApiErrorDecorator::LaunchDqsTask(Stream* const stm, const rtDqsTaskCfg_t* const taskCfg)
{
UNUSED(stm);
UNUSED(taskCfg);
return RT_ERROR_FEATURE_NOT_SUPPORT;
}
rtError_t ApiErrorDecorator::MemGetInfoByDeviceId(
uint32_t deviceId, bool isHugeOnly, size_t* const freeSize, size_t* const totalSize)
{
UNUSED(deviceId);
UNUSED(isHugeOnly);
UNUSED(freeSize);
UNUSED(totalSize);
return RT_ERROR_FEATURE_NOT_SUPPORT;
}
rtError_t ApiErrorDecorator::GetDeviceInfoFromPlatformInfo(
const uint32_t deviceId, const std::string& label, const std::string& key, int64_t* const value)
{
UNUSED(deviceId);
UNUSED(label);
UNUSED(key);
UNUSED(value);
return RT_ERROR_FEATURE_NOT_SUPPORT;
}
rtError_t ApiErrorDecorator::MemsetD32(
void* const dst, const uint64_t destMax, const uint32_t value, const uint64_t count)
{
(void)dst;
(void)destMax;
(void)value;
(void)count;
return RT_ERROR_FEATURE_NOT_SUPPORT;
}
rtError_t ApiErrorDecorator::MemsetD32Async(
void* const dst, const uint64_t destMax, const uint32_t value, const uint64_t count, Stream* const stm)
{
(void)dst;
(void)destMax;
(void)value;
(void)count;
(void)stm;
return RT_ERROR_FEATURE_NOT_SUPPORT;
}
rtError_t ApiErrorDecorator::SetXpuDevice(const rtXpuDevType devType, const uint32_t devId)
{
UNUSED(devType);
UNUSED(devId);
return RT_ERROR_FEATURE_NOT_SUPPORT;
}
rtError_t ApiErrorDecorator::ResetXpuDevice(const rtXpuDevType devType, const uint32_t devId)
{
UNUSED(devType);
UNUSED(devId);
return RT_ERROR_FEATURE_NOT_SUPPORT;
}
rtError_t ApiErrorDecorator::EventWorkModeSet(uint8_t mode)
{
UNUSED(mode);
return RT_ERROR_FEATURE_NOT_SUPPORT;
}
rtError_t ApiErrorDecorator::EventWorkModeGet(uint8_t* mode)
{
UNUSED(mode);
return RT_ERROR_FEATURE_NOT_SUPPORT;
}
rtError_t ApiErrorDecorator::GetXpuDevCount(const rtXpuDevType devType, uint32_t* devCount)
{
UNUSED(devType);
UNUSED(devCount);
return RT_ERROR_FEATURE_NOT_SUPPORT;
}
rtError_t ApiErrorDecorator::XpuSetTaskFailCallback(
const rtXpuDevType devType, const char_t* moduleName, void* callback)
{
UNUSED(devType);
UNUSED(moduleName);
UNUSED(callback);
return RT_ERROR_FEATURE_NOT_SUPPORT;
}
rtError_t ApiErrorDecorator::XpuProfilingCommandHandle(uint32_t type, void* data, uint32_t len)
{
UNUSED(type);
UNUSED(data);
UNUSED(len);
return RT_ERROR_FEATURE_NOT_SUPPORT;
}
rtError_t ApiErrorDecorator::MemManagedAdvise(
const void* const ptr, uint64_t size, uint16_t advise, rtMemManagedLocation location)
{
UNUSED(ptr);
UNUSED(size);
UNUSED(advise);
UNUSED(location);
return RT_ERROR_FEATURE_NOT_SUPPORT;
}
rtError_t ApiErrorDecorator::MemManagedGetAttr(
rtMemManagedRangeAttribute attribute, const void* ptr, size_t size, void* data, size_t dataSize)
{
UNUSED(attribute);
UNUSED(ptr);
UNUSED(size);
UNUSED(data);
UNUSED(dataSize);
return RT_ERROR_FEATURE_NOT_SUPPORT;
}
rtError_t ApiErrorDecorator::MemManagedGetAttrs(
rtMemManagedRangeAttribute* attributes, size_t numAttributes, const void* ptr, size_t size, void** data,
size_t* dataSizes)
{
UNUSED(attributes);
UNUSED(numAttributes);
UNUSED(ptr);
UNUSED(size);
UNUSED(data);
UNUSED(dataSizes);
return RT_ERROR_FEATURE_NOT_SUPPORT;
}
rtError_t ApiErrorDecorator::MemManagedPrefetchAsync(
const void* ptr, size_t size, rtMemManagedLocation location, uint32_t flags, Stream* const stream)
{
UNUSED(location);
UNUSED(flags);
UNUSED(ptr);
UNUSED(size);
UNUSED(stream);
return RT_ERROR_FEATURE_NOT_SUPPORT;
}
rtError_t ApiErrorDecorator::MemManagedPrefetchBatchAsync(
const void** ptrs, size_t* sizes, size_t count, rtMemManagedLocation* prefetchLocs, size_t* prefetchLocIdxs,
size_t numPrefetchLocs, uint64_t flags, Stream* const stream)
{
UNUSED(sizes);
UNUSED(ptrs);
UNUSED(count);
UNUSED(prefetchLocIdxs);
UNUSED(numPrefetchLocs);
UNUSED(prefetchLocs);
UNUSED(stream);
UNUSED(flags);
return RT_ERROR_FEATURE_NOT_SUPPORT;
}
rtError_t ApiErrorDecorator::StreamBeginCapture(Stream* const stm, const rtStreamCaptureMode mode, Model* const mdl)
{
UNUSED(stm);
UNUSED(mode);
UNUSED(mdl);
return RT_ERROR_FEATURE_NOT_SUPPORT;
}
rtError_t ApiErrorDecorator::StreamEndCapture(Stream* const stm, Model** const captureMdl)
{
UNUSED(stm);
UNUSED(captureMdl);
return RT_ERROR_FEATURE_NOT_SUPPORT;
}
rtError_t ApiErrorDecorator::StreamGetCaptureInfo(
const Stream* const stm, rtStreamCaptureStatus* const status, Model** const captureMdl)
{
UNUSED(stm);
UNUSED(status);
UNUSED(captureMdl);
return RT_ERROR_FEATURE_NOT_SUPPORT;
}
rtError_t ApiErrorDecorator::StreamBeginTaskUpdate(Stream* const stm, TaskGroup* handle)
{
UNUSED(stm);
UNUSED(handle);
return RT_ERROR_FEATURE_NOT_SUPPORT;
}
rtError_t ApiErrorDecorator::StreamEndTaskUpdate(Stream* const stm)
{
UNUSED(stm);
return RT_ERROR_FEATURE_NOT_SUPPORT;
}
rtError_t ApiErrorDecorator::ModelGetNodes(const Model* const mdl, uint32_t* const num)
{
UNUSED(mdl);
UNUSED(num);
return RT_ERROR_FEATURE_NOT_SUPPORT;
}
rtError_t ApiErrorDecorator::ModelDebugDotPrint(const Model* const mdl)
{
UNUSED(mdl);
return RT_ERROR_FEATURE_NOT_SUPPORT;
}
rtError_t ApiErrorDecorator::ModelDebugJsonPrint(const Model* const mdl, const char* path, const uint32_t flags)
{
UNUSED(mdl);
UNUSED(path);
UNUSED(flags);
return RT_ERROR_FEATURE_NOT_SUPPORT;
}
rtError_t ApiErrorDecorator::StreamAddToModel(Stream* const stm, Model* const captureMdl)
{
UNUSED(stm);
UNUSED(captureMdl);
return RT_ERROR_FEATURE_NOT_SUPPORT;
}
rtError_t ApiErrorDecorator::ThreadExchangeCaptureMode(rtStreamCaptureMode* const mode)
{
UNUSED(mode);
return RT_ERROR_FEATURE_NOT_SUPPORT;
}
rtError_t ApiErrorDecorator::StreamBeginTaskGrp(Stream* const stm)
{
UNUSED(stm);
return RT_ERROR_FEATURE_NOT_SUPPORT;
}
rtError_t ApiErrorDecorator::StreamEndTaskGrp(Stream* const stm, TaskGroup** const handle)
{
UNUSED(stm);
UNUSED(handle);
return RT_ERROR_FEATURE_NOT_SUPPORT;
}
rtError_t ApiErrorDecorator::ModelCondHandleCreate(
Model* const mdl, uint32_t defaultValue, rtCondHandleFlag_t flag, CondHandle** const handle)
{
UNUSED(mdl);
UNUSED(defaultValue);
UNUSED(flag);
UNUSED(handle);
return RT_ERROR_FEATURE_NOT_SUPPORT;
}
rtError_t ApiErrorDecorator::ModelCondHandleGetCondPtr(CondHandle* const handle, uint64_t** const devPtr)
{
UNUSED(handle);
UNUSED(devPtr);
return RT_ERROR_FEATURE_NOT_SUPPORT;
}
rtError_t ApiErrorDecorator::StreamAddCondTask(rtCondTaskParams params, Stream* const stm, uint32_t flags)
{
UNUSED(params);
UNUSED(stm);
UNUSED(flags);
return RT_ERROR_FEATURE_NOT_SUPPORT;
}
rtError_t ApiErrorDecorator::DeviceL2CacheFlush() { return RT_ERROR_FEATURE_NOT_SUPPORT; }
rtError_t ApiErrorDecorator::GetDevicePCIBusId(const int32_t devId, char* pciBusId, const int32_t len)
{
UNUSED(devId);
UNUSED(pciBusId);
UNUSED(len);
return RT_ERROR_FEATURE_NOT_SUPPORT;
}
rtError_t ApiErrorDecorator::GetDeviceByPCIBusId(const char* pciBusId, int32_t* devId)
{
UNUSED(pciBusId);
UNUSED(devId);
return RT_ERROR_FEATURE_NOT_SUPPORT;
}
rtError_t ApiErrorDecorator::HostGetDevicePointerAddrRange(rtAddrRange* addrRange, uint32_t* count)
{
UNUSED(addrRange);
UNUSED(count);
return RT_ERROR_FEATURE_NOT_SUPPORT;
}
rtError_t ApiErrorDecorator::ModelTaskUpdate(
Stream* desStm, uint32_t desTaskId, Stream* sinkStm, rtMdlTaskUpdateInfo_t* para)
{
UNUSED(desStm);
UNUSED(desTaskId);
UNUSED(sinkStm);
UNUSED(para);
return RT_ERROR_FEATURE_NOT_SUPPORT;
}
rtError_t ApiErrorDecorator::FunctionGetAttribute(rtFuncHandle funcHandle, rtFuncAttribute attrType, int64_t* attrValue)
{
UNUSED(funcHandle);
UNUSED(attrType);
UNUSED(attrValue);
return RT_ERROR_FEATURE_NOT_SUPPORT;
}
}
}