Intel® oneAPI Data Parallel C++
Support for Intel® oneAPI DPC++ Compiler, Intel® oneAPI DPC++ Library, Intel® DPC++ Compatibility Tool, and GDB*
382 Discussions

calling python AI library from DPC++ application

Manoranjan
Beginner
528 Views

Hi ,

while trying to port an application developed in C++ and calls python AI routines (embedding python) which is working fine to DPC++ application face the following issues

1. the called from outside the kernel function in  DPC++ , function is declared and defined with SYCL_EXTERNAL as below

extern SYCL_EXTERNAL int call_python();

SYCL_EXTERNAL int call_python() {...}

but still ware getting compilation error as "error : SYCL kernel cannot call an undefined function without SYCL_EXTERNAL attribute" .

does it mean that every function being called by function call_python also need to be declared and defined with SYCL_EXTERNAL ??? ( we have limited option of change as it is 3rd party code)

2. is there a way to call call_python () function, from inside the kernel function in  DPC++ i.e. parallel_for(...)

Regards,

Manoranjan

0 Kudos
3 Replies
RahulV_intel
Moderator
499 Views

Hi,

 

Could you send me the minimal error reproducible source code if possible?

 

Thanks,

Rahul

 

RahulV_intel
Moderator
481 Views

Hi,


Just a quick reminder to attach your code snippet.


Thanks,

Rahul


RahulV_intel
Moderator
473 Views

Hi,


I have not heard back from you, so I will close this thread. Feel free to post a new question, if you still have issues.


--Rahul


Reply