@@ -781,8 +781,7 @@ CheckAndDecompressImage([[maybe_unused]] RTDeviceBinaryImage *Img) {
781
781
// its ref count incremented.
782
782
ur_program_handle_t ProgramManager::getBuiltURProgram (
783
783
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) {
786
785
// Check if we can optimize program builds for sub-devices by using a program
787
786
// built for the root device
788
787
DeviceImplPtr RootDevImpl = DeviceImpl;
@@ -803,8 +802,7 @@ ur_program_handle_t ProgramManager::getBuiltURProgram(
803
802
auto Context = createSyclObjFromImpl<context>(ContextImpl);
804
803
auto Device = createSyclObjFromImpl<device>(
805
804
MustBuildOnSubdevice == true ? DeviceImpl : RootDevImpl);
806
- const RTDeviceBinaryImage &Img =
807
- getDeviceImage (KernelName, Context, Device, JITCompilationIsRequired);
805
+ const RTDeviceBinaryImage &Img = getDeviceImage (KernelName, Context, Device);
808
806
809
807
// Check that device supports all aspects used by the kernel
810
808
if (auto exception = checkDevSupportDeviceRequirements (Device, Img, NDRDesc))
@@ -1403,23 +1401,6 @@ ProgramManager::ProgramManager()
1403
1401
}
1404
1402
}
1405
1403
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
-
1423
1404
const char *getArchName (const device &Device) {
1424
1405
namespace syclex = sycl::ext::oneapi::experimental;
1425
1406
auto Arch = getSyclObjImpl (Device)->getDeviceArch ();
@@ -1481,13 +1462,11 @@ RTDeviceBinaryImage *getBinImageFromMultiMap(
1481
1462
1482
1463
RTDeviceBinaryImage &
1483
1464
ProgramManager::getDeviceImage (const std::string &KernelName,
1484
- const context &Context, const device &Device,
1485
- bool JITCompilationIsRequired) {
1465
+ const context &Context, const device &Device) {
1486
1466
if constexpr (DbgProgMgr > 0 ) {
1487
1467
std::cerr << " >>> ProgramManager::getDeviceImage(\" " << KernelName << " \" , "
1488
1468
<< getSyclObjImpl (Context).get () << " , "
1489
- << getSyclObjImpl (Device).get () << " , "
1490
- << JITCompilationIsRequired << " )\n " ;
1469
+ << getSyclObjImpl (Device).get () << " )\n " ;
1491
1470
1492
1471
std::cerr << " available device images:\n " ;
1493
1472
debugPrintBinaryImages ();
@@ -1497,7 +1476,7 @@ ProgramManager::getDeviceImage(const std::string &KernelName,
1497
1476
assert (m_SpvFileImage);
1498
1477
return getDeviceImage (
1499
1478
std::unordered_set<RTDeviceBinaryImage *>({m_SpvFileImage.get ()}),
1500
- Context, Device, JITCompilationIsRequired );
1479
+ Context, Device);
1501
1480
}
1502
1481
1503
1482
RTDeviceBinaryImage *Img = nullptr ;
@@ -1517,8 +1496,6 @@ ProgramManager::getDeviceImage(const std::string &KernelName,
1517
1496
CheckAndDecompressImage (Img);
1518
1497
1519
1498
if (Img) {
1520
- CheckJITCompilationForImage (Img, JITCompilationIsRequired);
1521
-
1522
1499
if constexpr (DbgProgMgr > 0 ) {
1523
1500
std::cerr << " selected device image: " << &Img->getRawData () << " \n " ;
1524
1501
Img->print ();
@@ -1532,15 +1509,13 @@ ProgramManager::getDeviceImage(const std::string &KernelName,
1532
1509
1533
1510
RTDeviceBinaryImage &ProgramManager::getDeviceImage (
1534
1511
const std::unordered_set<RTDeviceBinaryImage *> &ImageSet,
1535
- const context &Context, const device &Device,
1536
- bool JITCompilationIsRequired) {
1512
+ const context &Context, const device &Device) {
1537
1513
assert (ImageSet.size () > 0 );
1538
1514
1539
1515
if constexpr (DbgProgMgr > 0 ) {
1540
1516
std::cerr << " >>> ProgramManager::getDeviceImage(Custom SPV file "
1541
1517
<< getSyclObjImpl (Context).get () << " , "
1542
- << getSyclObjImpl (Device).get () << " , "
1543
- << JITCompilationIsRequired << " )\n " ;
1518
+ << getSyclObjImpl (Device).get () << " )\n " ;
1544
1519
1545
1520
std::cerr << " available device images:\n " ;
1546
1521
debugPrintBinaryImages ();
@@ -1569,8 +1544,6 @@ RTDeviceBinaryImage &ProgramManager::getDeviceImage(
1569
1544
ImageIterator = ImageSet.begin ();
1570
1545
std::advance (ImageIterator, ImgInd);
1571
1546
1572
- CheckJITCompilationForImage (*ImageIterator, JITCompilationIsRequired);
1573
-
1574
1547
if constexpr (DbgProgMgr > 0 ) {
1575
1548
std::cerr << " selected device image: " << &(*ImageIterator)->getRawData ()
1576
1549
<< " \n " ;
0 commit comments