Intel® oneAPI DPC++/C++ Compiler
Talk to fellow users of Intel® oneAPI DPC++/C++ Compiler and companion tools like Intel® oneAPI DPC++ Library, Intel® DPC++ Compatibility Tool, and Intel® Distribution for GDB*
585 Discussions

calling python AI library from DPC++ application

Manoranjan
Beginner
894 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
865 Views

Hi,

 

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

 

Thanks,

Rahul

 

0 Kudos
RahulV_intel
Moderator
847 Views

Hi,


Just a quick reminder to attach your code snippet.


Thanks,

Rahul


0 Kudos
RahulV_intel
Moderator
839 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


0 Kudos
Reply