@@ -508,6 +508,11 @@ pi_result piDeviceGetInfo(pi_device Device, pi_device_info ParamName,
508508 return ReturnValue (size_t {8192 });
509509 case PI_DEVICE_INFO_HOST_UNIFIED_MEMORY :
510510 return ReturnValue (pi_bool{1 });
511+ case PI_DEVICE_INFO_EXTENSIONS :
512+ // TODO : Populate return string accordingly - e.g. cl_khr_fp16,
513+ // cl_khr_fp64, cl_khr_int64_base_atomics,
514+ // cl_khr_int64_extended_atomics
515+ return ReturnValue (" " );
511516
512517#define UNSUPPORTED_INFO (info ) \
513518 case info: \
@@ -518,7 +523,6 @@ pi_result piDeviceGetInfo(pi_device Device, pi_device_info ParamName,
518523 break ;
519524
520525 UNSUPPORTED_INFO (PI_DEVICE_INFO_VENDOR_ID )
521- UNSUPPORTED_INFO (PI_DEVICE_INFO_EXTENSIONS )
522526 UNSUPPORTED_INFO (PI_DEVICE_INFO_COMPILER_AVAILABLE )
523527 UNSUPPORTED_INFO (PI_DEVICE_INFO_LINKER_AVAILABLE )
524528 UNSUPPORTED_INFO (PI_DEVICE_INFO_MAX_COMPUTE_UNITS )
@@ -756,7 +760,8 @@ pi_result piMemBufferCreate(pi_context Context, pi_mem_flags Flags, size_t Size,
756760 const pi_mem_properties *properties) {
757761 if ((Flags & PI_MEM_FLAGS_ACCESS_RW ) == 0 ) {
758762 if (PrintPiTrace) {
759- std::cerr << " Invalid memory attribute for piMemBufferCreate" ;
763+ std::cerr << " Invalid memory attribute for piMemBufferCreate"
764+ << std::endl;
760765 }
761766 return PI_INVALID_OPERATION ;
762767 }
@@ -881,7 +886,7 @@ pi_result piMemImageCreate(pi_context Context, pi_mem_flags Flags,
881886 pi_mem *RetImage) {
882887 if ((Flags & PI_MEM_FLAGS_ACCESS_RW ) == 0 ) {
883888 if (PrintPiTrace) {
884- std::cerr << " Invalid memory attribute for piMemImageCreate" ;
889+ std::cerr << " Invalid memory attribute for piMemImageCreate" << std::endl ;
885890 }
886891 return PI_INVALID_OPERATION ;
887892 }
@@ -1513,9 +1518,19 @@ pi_result piextProgramSetSpecializationConstant(pi_program, pi_uint32, size_t,
15131518 DIE_NO_IMPLEMENTATION ;
15141519}
15151520
1516- pi_result piextDeviceSelectBinary (pi_device, pi_device_binary *, pi_uint32,
1517- pi_uint32 *) {
1518- DIE_NO_IMPLEMENTATION ;
1521+ pi_result piextDeviceSelectBinary (pi_device, pi_device_binary *,
1522+ pi_uint32 RawImgSize, pi_uint32 *ImgInd) {
1523+ // / TODO : Support multiple images and enable selection algorithm
1524+ // / for the images
1525+ if (RawImgSize != 1 ) {
1526+ if (PrintPiTrace) {
1527+ std::cerr << " Only single device binary image is supported in ESIMD_CPU"
1528+ << std::endl;
1529+ }
1530+ return PI_INVALID_VALUE ;
1531+ }
1532+ *ImgInd = 0 ;
1533+ return PI_SUCCESS ;
15191534}
15201535
15211536pi_result piextUSMEnqueuePrefetch (pi_queue, const void *, size_t ,
0 commit comments