SWDEV-294768 - Fix PCMark10 performance drop
PCMark10 counts the time spent in clCreateKernel as part of execution time, so as workaround for the PAL path, move code object loading back to clBuildProgram. Change-Id: I3b9cf1879ece08ab59f447ec165b0525bc8593a4
Tá an tiomantas seo le fáil i:
1 tuismitheoir
7f83bcdb45
tiomantas
1d0364e590
2 comhad athraithe
+17
-12
Níor tháinig aon chomhaid le do chuardach
@@ -744,6 +744,12 @@ bool LightningProgram::createBinary(amd::option::Options* options) {
|
||||
bool LightningProgram::createKernels(void* binary, size_t binSize, bool useUniformWorkGroupSize,
|
||||
bool internalKernel) {
|
||||
#if defined(USE_COMGR_LIBRARY)
|
||||
// Stop compilation if it is an offline device - PAL runtime does not
|
||||
// support ISA compiled offline
|
||||
if (!device().isOnline()) {
|
||||
return true;
|
||||
}
|
||||
|
||||
// Find the size of global variables from the binary
|
||||
if (!FindGlobalVarSize(binary, binSize)) {
|
||||
buildLog_ += "Error: Cannot Find Global Var Sizes\n";
|
||||
@@ -764,18 +770,6 @@ bool LightningProgram::createKernels(void* binary, size_t binSize, bool useUnifo
|
||||
|
||||
kernel->setUniformWorkGroupSize(useUniformWorkGroupSize);
|
||||
}
|
||||
#endif
|
||||
return true;
|
||||
}
|
||||
|
||||
bool LightningProgram::setKernels(void* binary, size_t binSize,
|
||||
amd::Os::FileDesc fdesc, size_t foffset, std::string uri) {
|
||||
#if defined(USE_COMGR_LIBRARY)
|
||||
// Stop compilation if it is an offline device - PAL runtime does not
|
||||
// support ISA compiled offline
|
||||
if (!device().isOnline()) {
|
||||
return true;
|
||||
}
|
||||
|
||||
executable_ = loader_->CreateExecutable(HSA_PROFILE_FULL, nullptr);
|
||||
if (executable_ == nullptr) {
|
||||
@@ -799,6 +793,16 @@ bool LightningProgram::setKernels(void* binary, size_t binSize,
|
||||
LogError("Error: Freezing the executable failed.");
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
return true;
|
||||
}
|
||||
|
||||
bool LightningProgram::setKernels(void* binary, size_t binSize,
|
||||
amd::Os::FileDesc fdesc, size_t foffset, std::string uri) {
|
||||
#if defined(USE_COMGR_LIBRARY)
|
||||
if (!device().isOnline()) {
|
||||
return true;
|
||||
}
|
||||
|
||||
for (auto& kit : kernels()) {
|
||||
LightningKernel* kernel = static_cast<LightningKernel*>(kit.second);
|
||||
|
||||
Tagairt in Eagrán Nua
Cuir bac ar úsáideoir