@@ -80,13 +80,16 @@ int32_t GPUReconstructionCUDA::genRTC(std::string& filename, uint32_t& nCompile)
8080 GPUInfo (" RTC Launch Bounds:\n %s" , launchBounds.c_str ());
8181 }
8282
83- char shasource[21 ], shaparam[21 ], shacmd[21 ], shakernels[21 ], shabounds[21 ];
83+ const std::string compilerVersions = getBackendVersions ();
84+
85+ char shasource[21 ], shaparam[21 ], shacmd[21 ], shakernels[21 ], shabounds[21 ], shaversion[21 ];
8486 if (GetProcessingSettings ().rtc .cacheOutput ) {
8587 o2::framework::internal::SHA1 (shasource, _binary_GPUReconstructionCUDArtc_src_start, _binary_GPUReconstructionCUDArtc_src_len);
8688 o2::framework::internal::SHA1 (shaparam, rtcparam.c_str (), rtcparam.size ());
8789 o2::framework::internal::SHA1 (shacmd, baseCommand.c_str (), baseCommand.size ());
8890 o2::framework::internal::SHA1 (shakernels, kernelsall.c_str (), kernelsall.size ());
8991 o2::framework::internal::SHA1 (shabounds, launchBounds.c_str (), launchBounds.size ());
92+ o2::framework::internal::SHA1 (shaversion, compilerVersions.c_str (), compilerVersions.size ());
9093 }
9194
9295 nCompile = GetProcessingSettings ().rtc .compilePerKernel ? kernels.size () : 1 ;
@@ -131,11 +134,12 @@ int32_t GPUReconstructionCUDA::genRTC(std::string& filename, uint32_t& nCompile)
131134 }
132135 return 0 ;
133136 };
134- if (checkSHA (shasource, " source" ) || // TODO: CHECK VERSION!
137+ if (checkSHA (shasource, " source" ) ||
135138 checkSHA (shaparam, " param" ) ||
136139 checkSHA (shacmd, " command line" ) ||
137140 checkSHA (shakernels, " kernel definitions" ) ||
138- checkSHA (shabounds, " launch bounds" )) {
141+ checkSHA (shabounds, " launch bounds" ) ||
142+ checkSHA (shaversion, " compiler versions" )) {
139143 break ;
140144 }
141145 GPUSettingsProcessingRTC cachedSettings;
@@ -237,6 +241,7 @@ int32_t GPUReconstructionCUDA::genRTC(std::string& filename, uint32_t& nCompile)
237241 fwrite (shacmd, 1 , 20 , fp) != 20 ||
238242 fwrite (shakernels, 1 , 20 , fp) != 20 ||
239243 fwrite (shabounds, 1 , 20 , fp) != 20 ||
244+ fwrite (shaversion, 1 , 20 , fp) != 20 ||
240245 fwrite (&GetProcessingSettings ().rtc , sizeof (GetProcessingSettings ().rtc ), 1 , fp) != 1 ) {
241246 throw std::runtime_error (" Error writing cache file" );
242247 }
0 commit comments