@@ -1089,10 +1089,12 @@ bool Program::linkImplLC(amd::option::Options* options) {
10891089 case ACL_TYPE_ISA: {
10901090 amd::Comgr::destroy_data_set (inputs);
10911091 binary_t isaBinary = binary ();
1092+ finfo_t isaFdesc = BinaryFd ();
10921093 if (GPU_DUMP_CODE_OBJECT) {
10931094 dumpCodeObject (std::string{(const char *)isaBinary.first , isaBinary.second });
10941095 }
1095- return setKernels (options, const_cast <void *>(isaBinary.first ), isaBinary.second );
1096+ return setKernels (options, const_cast <void *>(isaBinary.first ), isaBinary.second ,
1097+ isaFdesc.first , isaFdesc.second , BinaryURI ());
10961098 break ;
10971099 }
10981100 default :
@@ -1852,7 +1854,8 @@ bool isSPIRVMagicL(const void* Image, size_t Length) {
18521854}
18531855
18541856// ================================================================================================
1855- bool Program::initClBinary (const char * binaryIn, size_t size) {
1857+ bool Program::initClBinary (const char * binaryIn, size_t size, amd::Os::FileDesc fdesc,
1858+ size_t foffset, std::string uri) {
18561859 if (!initClBinary ()) {
18571860 DevLogError (" Init CL Binary failed \n " );
18581861 return false ;
@@ -1947,12 +1950,13 @@ bool Program::initClBinary(const char* binaryIn, size_t size) {
19471950
19481951 clBinary ()->setFlags (encryptCode);
19491952
1950- return clBinary ()->setBinary (bin, sz, (decryptedBin != nullptr ));
1953+ return clBinary ()->setBinary (bin, sz, (decryptedBin != nullptr ), fdesc, foffset, uri );
19511954}
19521955
19531956// ================================================================================================
1954- bool Program::setBinary (const char * binaryIn, size_t size, const device::Program* same_dev_prog) {
1955- if (!initClBinary (binaryIn, size)) {
1957+ bool Program::setBinary (const char * binaryIn, size_t size, const device::Program* same_dev_prog,
1958+ amd::Os::FileDesc fdesc, size_t foffset, std::string uri) {
1959+ if (!initClBinary (binaryIn, size, fdesc, foffset, uri)) {
19561960 DevLogError (" Init CL Binary failed \n " );
19571961 return false ;
19581962 }
@@ -2187,6 +2191,8 @@ aclType Program::getCompilationStagesFromBinary(std::vector<aclType>& completeSt
21872191aclType Program::getNextCompilationStageFromBinary (amd::option::Options* options) {
21882192 aclType continueCompileFrom = ACL_TYPE_DEFAULT;
21892193 binary_t binary = this ->binary ();
2194+ finfo_t finfo = this ->BinaryFd ();
2195+ std::string uri = this ->BinaryURI ();
21902196 // If the binary already exists
21912197 if ((binary.first != nullptr ) && (binary.second > 0 )) {
21922198#if defined(WITH_COMPILER_LIB)
@@ -2207,7 +2213,8 @@ aclType Program::getNextCompilationStageFromBinary(amd::option::Options* options
22072213
22082214 // Saving binary in the interface class,
22092215 // which also load compile & link options from binary
2210- setBinary (static_cast <const char *>(binary.first ), binary.second );
2216+ setBinary (static_cast <const char *>(binary.first ), binary.second , nullptr ,
2217+ finfo.first , finfo.second , uri);
22112218
22122219 // Calculate the next stage to compile from, based on sections in binaryElf_;
22132220 // No any validity checks here
0 commit comments