Shivangi,

So, is there error you're getting now different from what you got
before? What changed? Next, I don't see how kernel_old_init would access
_source. What happens if you just run the program directly?  Could you
copy/paste the backtrace?

Next, regarding:

LogicError: <pyopenc...3f914340>

Could you investigate what this error instance is? I.e. full dotted-name
type, and the full error string---or whatever the error value is,
without abbreviation.

Andreas

Shivangi Agarwal <shivangiagarwa...@gmail.com> writes:
> So it seems like our error catching layer is returning
> CL_INVALID_KERNEL_NAME (
> https://github.com/Xilinx/XRT/blob/master/src/runtime_src/xocl/api/clCreateKernel.cpp
> L76).
> xocl::errror returns the correct error_code with a custom message to be
> printed on the console.
> I ran the program which I shared earlier and here is the pdb stack for it:
> I stepped into getattr function which took me to __getattr__ in L434. I
> stepped into knl = Kernel(self, attr) (L436) which took me to 767
> 'kernel_init'. Now in L 771 (kernel_old_init(self, prg, name) it gives me
> the error _source kernel not found.
>
>
>> /scratch/sagarw/XRT/tests/demo.py(49)main()
> -> getattr(prg, "_source", None)
> (Pdb) s
> --Call--
>>
> /usr/local/lib/python2.7/dist-packages/pyopencl/__init__.py(434)__getattr__()
> -> def __getattr__(self, attr):
> (Pdb)
>>
> /usr/local/lib/python2.7/dist-packages/pyopencl/__init__.py(435)__getattr__()
> -> try:
> (Pdb)
>>
> /usr/local/lib/python2.7/dist-packages/pyopencl/__init__.py(436)__getattr__()
> -> knl = Kernel(self, attr)
> (Pdb)
> --Call--
>>
> /usr/local/lib/python2.7/dist-packages/pyopencl/__init__.py(767)kernel_init()
> -> def kernel_init(self, prg, name):
> (Pdb)
>>
> /usr/local/lib/python2.7/dist-packages/pyopencl/__init__.py(768)kernel_init()
> -> if not isinstance(prg, _cl._Program):
> (Pdb) n
>>
> /usr/local/lib/python2.7/dist-packages/pyopencl/__init__.py(769)kernel_init()
> -> prg = prg._get_prg()
> (Pdb)
>>
> /usr/local/lib/python2.7/dist-packages/pyopencl/__init__.py(771)kernel_init()
> -> kernel_old_init(self, prg, name)
> (Pdb) a
> self = <pyopencl._cl.Kernel object at 0x7f073f910b30>
> prg = <pyopencl._cl._Program object at 0x7f074c430470>
> name = _source
> (Pdb) s
> XRT build version: 2.3.0
> Build hash: 8eb4d383b867c41879a3d462881d745d0a4f4671
> Build date: 2019-07-23 10:44:38
> Git branch: coverity_scan
> PID: 214890
> UID: 31939
> [Tue Jul 23 10:47:22 2019]
> HOST: xsjsagarwal
> EXE: /usr/bin/python2.7
> [XRT] ERROR: kernel '_source' not found
> LogicError: <pyopenc...3f914340>
>>
> /usr/local/lib/python2.7/dist-packages/pyopencl/__init__.py(771)kernel_init()
> -> kernel_old_init(self, prg, name)
> (Pdb) c
>
>
>
> Best,
> Shivangi Agarwal
>
>
> On Mon, Jul 22, 2019 at 3:31 PM Andreas Kloeckner <li...@informa.tiker.net>
> wrote:
>
>> Shivangi Agarwal <shivangiagarwa...@gmail.com> writes:
>> > It still gives me the same error. Here is the program that I am running:
>>
>> OIC. Sure, the `getattr` will look up whether a kernel of that (bogus)
>> name exists in the program. The spec-conforming thing for an OpenCL
>> implementation to do [1] if the kernel is not found is to return
>> CL_INVALID_KERNEL_NAME from clCreateKernel. PyOpenCL relies on that.
>>
>> Andreas
>>
>> [1]
>> https://www.khronos.org/registry/OpenCL/specs/2.2/html/OpenCL_API.html#_kernel_objects
>>

Attachment: signature.asc
Description: PGP signature

_______________________________________________
PyOpenCL mailing list -- pyopencl@tiker.net
To unsubscribe send an email to pyopencl-le...@tiker.net

Reply via email to