@@ -781,8 +781,7 @@ CheckAndDecompressImage([[maybe_unused]] RTDeviceBinaryImage *Img) {
781781// its ref count incremented.
782782ur_program_handle_t ProgramManager::getBuiltURProgram (
783783 const ContextImplPtr &ContextImpl, const DeviceImplPtr &DeviceImpl,
784- const std::string &KernelName, const NDRDescT &NDRDesc,
785- bool JITCompilationIsRequired) {
784+ const std::string &KernelName, const NDRDescT &NDRDesc) {
786785 // Check if we can optimize program builds for sub-devices by using a program
787786 // built for the root device
788787 DeviceImplPtr RootDevImpl = DeviceImpl;
@@ -803,8 +802,7 @@ ur_program_handle_t ProgramManager::getBuiltURProgram(
803802 auto Context = createSyclObjFromImpl<context>(ContextImpl);
804803 auto Device = createSyclObjFromImpl<device>(
805804 MustBuildOnSubdevice == true ? DeviceImpl : RootDevImpl);
806- const RTDeviceBinaryImage &Img =
807- getDeviceImage (KernelName, Context, Device, JITCompilationIsRequired);
805+ const RTDeviceBinaryImage &Img = getDeviceImage (KernelName, Context, Device);
808806
809807 // Check that device supports all aspects used by the kernel
810808 if (auto exception = checkDevSupportDeviceRequirements (Device, Img, NDRDesc))
@@ -1403,23 +1401,6 @@ ProgramManager::ProgramManager()
14031401 }
14041402}
14051403
1406- void CheckJITCompilationForImage (const RTDeviceBinaryImage *const &Image,
1407- bool JITCompilationIsRequired) {
1408- if (!JITCompilationIsRequired)
1409- return ;
1410- // If the image is already compiled with AOT, throw an exception.
1411- const sycl_device_binary_struct &RawImg = Image->getRawData ();
1412- if ((strcmp (RawImg.DeviceTargetSpec ,
1413- __SYCL_DEVICE_BINARY_TARGET_SPIRV64_X86_64) == 0 ) ||
1414- (strcmp (RawImg.DeviceTargetSpec ,
1415- __SYCL_DEVICE_BINARY_TARGET_SPIRV64_GEN) == 0 ) ||
1416- (strcmp (RawImg.DeviceTargetSpec ,
1417- __SYCL_DEVICE_BINARY_TARGET_SPIRV64_FPGA) == 0 )) {
1418- throw sycl::exception (sycl::errc::feature_not_supported,
1419- " Recompiling AOT image is not supported" );
1420- }
1421- }
1422-
14231404const char *getArchName (const device &Device) {
14241405 namespace syclex = sycl::ext::oneapi::experimental;
14251406 auto Arch = getSyclObjImpl (Device)->getDeviceArch ();
@@ -1481,13 +1462,11 @@ RTDeviceBinaryImage *getBinImageFromMultiMap(
14811462
14821463RTDeviceBinaryImage &
14831464ProgramManager::getDeviceImage (const std::string &KernelName,
1484- const context &Context, const device &Device,
1485- bool JITCompilationIsRequired) {
1465+ const context &Context, const device &Device) {
14861466 if constexpr (DbgProgMgr > 0 ) {
14871467 std::cerr << " >>> ProgramManager::getDeviceImage(\" " << KernelName << " \" , "
14881468 << getSyclObjImpl (Context).get () << " , "
1489- << getSyclObjImpl (Device).get () << " , "
1490- << JITCompilationIsRequired << " )\n " ;
1469+ << getSyclObjImpl (Device).get () << " )\n " ;
14911470
14921471 std::cerr << " available device images:\n " ;
14931472 debugPrintBinaryImages ();
@@ -1497,7 +1476,7 @@ ProgramManager::getDeviceImage(const std::string &KernelName,
14971476 assert (m_SpvFileImage);
14981477 return getDeviceImage (
14991478 std::unordered_set<RTDeviceBinaryImage *>({m_SpvFileImage.get ()}),
1500- Context, Device, JITCompilationIsRequired );
1479+ Context, Device);
15011480 }
15021481
15031482 RTDeviceBinaryImage *Img = nullptr ;
@@ -1517,8 +1496,6 @@ ProgramManager::getDeviceImage(const std::string &KernelName,
15171496 CheckAndDecompressImage (Img);
15181497
15191498 if (Img) {
1520- CheckJITCompilationForImage (Img, JITCompilationIsRequired);
1521-
15221499 if constexpr (DbgProgMgr > 0 ) {
15231500 std::cerr << " selected device image: " << &Img->getRawData () << " \n " ;
15241501 Img->print ();
@@ -1532,15 +1509,13 @@ ProgramManager::getDeviceImage(const std::string &KernelName,
15321509
15331510RTDeviceBinaryImage &ProgramManager::getDeviceImage (
15341511 const std::unordered_set<RTDeviceBinaryImage *> &ImageSet,
1535- const context &Context, const device &Device,
1536- bool JITCompilationIsRequired) {
1512+ const context &Context, const device &Device) {
15371513 assert (ImageSet.size () > 0 );
15381514
15391515 if constexpr (DbgProgMgr > 0 ) {
15401516 std::cerr << " >>> ProgramManager::getDeviceImage(Custom SPV file "
15411517 << getSyclObjImpl (Context).get () << " , "
1542- << getSyclObjImpl (Device).get () << " , "
1543- << JITCompilationIsRequired << " )\n " ;
1518+ << getSyclObjImpl (Device).get () << " )\n " ;
15441519
15451520 std::cerr << " available device images:\n " ;
15461521 debugPrintBinaryImages ();
@@ -1569,8 +1544,6 @@ RTDeviceBinaryImage &ProgramManager::getDeviceImage(
15691544 ImageIterator = ImageSet.begin ();
15701545 std::advance (ImageIterator, ImgInd);
15711546
1572- CheckJITCompilationForImage (*ImageIterator, JITCompilationIsRequired);
1573-
15741547 if constexpr (DbgProgMgr > 0 ) {
15751548 std::cerr << " selected device image: " << &(*ImageIterator)->getRawData ()
15761549 << " \n " ;
0 commit comments