litenn
litenn copied to clipboard
Error found after simple install.
Hello! (I'm a reddit user that saw your post about litenn).
I'm very glad to have had a chance to experiment with LiteNN. However, I encountered the following error upon installation. The procedure I used to install (on MacOS) was to create a separate environment in Anaconda Navigator, then open the terminal using that environment and pip3 install litenn. Then in a jupyter notebook I would type import litenn as nn, resulting in the error below. Any pointer or reference you might have to solve this would be helpful, as I am very keen on trying litenn out. Thank you in advance!
AttributeError Traceback (most recent call last)
/opt/anaconda3/envs/litenn/lib/python3.8/site-packages/litenn/init.py in
/opt/anaconda3/envs/litenn/lib/python3.8/site-packages/litenn/core/init.py in
/opt/anaconda3/envs/litenn/lib/python3.8/site-packages/litenn/core/minicl/init.py in
/opt/anaconda3/envs/litenn/lib/python3.8/site-packages/litenn/core/minicl/CLDevice.py in
/opt/anaconda3/envs/litenn/lib/python3.8/site-packages/litenn/core/minicl/CLBuffer.py in
/opt/anaconda3/envs/litenn/lib/python3.8/site-packages/litenn/core/minicl/api/OpenCL/init.py in
2 BuildProgram,
3 BUILD_STATUS,
4 DEVICE_TYPE,
5 CreateBuffer,
/opt/anaconda3/envs/litenn/lib/python3.8/site-packages/litenn/core/minicl/api/OpenCL/OpenCL.py in
/opt/anaconda3/envs/litenn/lib/python3.8/ctypes/init.py in getattr(self, name) 392 if name.startswith('') and name.endswith(''): 393 raise AttributeError(name) --> 394 func = self.getitem(name) 395 setattr(self, name, func) 396 return func
/opt/anaconda3/envs/litenn/lib/python3.8/ctypes/init.py in getitem(self, name_or_ordinal) 397 398 def getitem(self, name_or_ordinal): --> 399 func = self._FuncPtr((name_or_ordinal, self)) 400 if not isinstance(name_or_ordinal, int): 401 func.name = name_or_ordinal
AttributeError: dlsym(RTLD_DEFAULT, clGetPlatformIDs): symbol not found
Thanks, I did not test it on mac. Seems like the function clGetPlatformIDs is not found in standard libOpenCL.so what GPU do you have?
may be there is a problem with loading libopencl from correct path in macos?
Should I load it from specific path, for example
/System/Library/Frameworks/OpenCL.framework/OpenCL ?
try to install Opencl drivers
Thanks for the pointer, I'll take a look at that. Perhaps there is also some library that bridges dependencies on OpenCL to the Metal framework, since if I recall correctly the OpenCL is being deprecated on Apple (but I may be wrong!). I'll share my experience here, hopefully after I manage to make it work.
opencl cannot be deprecated. It is standard for all computation devices, not only GPU but also CPU. Even new OpenCL v3.0 has v1.2 subset.
That was my source. I am trying to find an easy guide to help me change the relevant parts of the code from OpenCL to Metal but I couldn't find any material.
because OpenCL is a standard. All you need is opencl drivers for your gpu.
maybe you can deal with PoCL? http://portablecl.org/
Hi @iperov! So, I actually went and installed LiteNN on my Ubuntu 20.04 machine with AMD Radeon 8670M GPU. However, also there I found an error after calling litenn.test.all():
litenn.core.minicl.api.OpenCL.CLException: PLATFORM_NOT_FOUND_KHR. Any pointers? Thanks in advance.
this is drivers related error