mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-05 09:09:04 +08:00
feature: propagate printf/indirect calls info from functions to kernel
Related-To: NEO-15211 Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
7b71a13c6a
commit
04ad429e58
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2022-2023 Intel Corporation
|
||||
* Copyright (C) 2022-2025 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@@ -65,6 +65,8 @@ uint32_t resolveExtFuncDependencies(const ExternalFunctionInfosT &externalFuncti
|
||||
auto caller = externalFunctionInfos[callerId];
|
||||
caller->barrierCount = std::max(caller->barrierCount, callee->barrierCount);
|
||||
caller->hasRTCalls |= callee->hasRTCalls;
|
||||
caller->hasPrintfCalls |= callee->hasPrintfCalls;
|
||||
caller->hasIndirectCalls |= callee->hasIndirectCalls;
|
||||
}
|
||||
}
|
||||
return RESOLVE_SUCCESS;
|
||||
@@ -81,6 +83,8 @@ uint32_t resolveKernelDependencies(const ExternalFunctionInfosT &externalFunctio
|
||||
const auto &externalFunctionInfo = *externalFunctionInfos.at(funcNameToId.at(kernelDep->usedFuncName));
|
||||
kernelAttributes.barrierCount = std::max(externalFunctionInfo.barrierCount, kernelAttributes.barrierCount);
|
||||
kernelAttributes.flags.hasRTCalls |= externalFunctionInfo.hasRTCalls;
|
||||
kernelAttributes.flags.hasPrintfCalls |= externalFunctionInfo.hasPrintfCalls;
|
||||
kernelAttributes.flags.hasIndirectCalls |= externalFunctionInfo.hasIndirectCalls;
|
||||
}
|
||||
return RESOLVE_SUCCESS;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2022-2023 Intel Corporation
|
||||
* Copyright (C) 2022-2025 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@@ -28,6 +28,8 @@ struct ExternalFunctionInfo {
|
||||
uint16_t numGrfRequired = 0U;
|
||||
uint8_t simdSize = 0U;
|
||||
bool hasRTCalls = false;
|
||||
bool hasPrintfCalls = false;
|
||||
bool hasIndirectCalls = false;
|
||||
};
|
||||
|
||||
struct ExternalFunctionUsageKernel {
|
||||
|
||||
@@ -304,6 +304,8 @@ DecodeError populateExternalFunctionsMetadata(NEO::ProgramInfo &dst, NEO::Yaml::
|
||||
extFunInfo.numGrfRequired = static_cast<uint16_t>(execEnv.grfCount);
|
||||
extFunInfo.simdSize = static_cast<uint8_t>(execEnv.simdSize);
|
||||
extFunInfo.hasRTCalls = execEnv.hasRTCalls;
|
||||
extFunInfo.hasPrintfCalls = execEnv.hasPrintfCalls;
|
||||
extFunInfo.hasIndirectCalls = execEnv.hasIndirectCalls;
|
||||
dst.externalFunctions.push_back(extFunInfo);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user