Comments (13)
Hi @OliverUrbann @mhahn0106
I have create a new branch enable-shared-virtual-memory, this branch using shared virtual memory instead of cl_mem. I tested it on Intel(R) Core(TM) i5-4570 CPU with opencl, and won't met CL_MISALIGNED_SUB_BUFFER_OFFSET again.
I kept the CLArray design as the clBLAS APIs need cl_mem instead of svm pointers.
Best Regards!
from darknet-on-opencl.
Hi @OliverUrbann
Error code -13 means CL_MISALIGNED_SUB_BUFFER_OFFSET, means when you create a sub buffer from a GPU buffer, there is limitations on the offset alignment. This is hardware limitations and depending on GPU vendor. Currently I have no good way to resolve this issue as it will increase the complexity for the data layout on memory. Anyway, I only met such problem when using OpenCL running on CPU.
Best Regards!
from darknet-on-opencl.
I tried it on a Atom J1900 with z3700 GPU in an embedded system. We cannot use other GPUs so the OpenCL port would be a great way to execute YOLO on that system. Anyway, thx for the explanation.
from darknet-on-opencl.
@ganyc717 I managed to compile and run darkness_cl on AMD Radeon GPU by adding some memory alignment codes but getting wrong detection result compared with CPU version. I hope you to explain design of CLArray. Can you leave some notes for it? To my understanding, it seems like making slices of given large continuous memory block. If we can focus on continuity, how about using SVM(Shared Virtual Memory) from OpenC L2.0?
from darknet-on-opencl.
Hi @mhahn0106
CLArray is a ugly design as I have no idea to random access to the cl_mem buffer in CL 1.2. I am not quite familiar with OpenCL 2.0 new APIs. Thank you for your idea, I will check the spec and follow your idea later.
Best Regards!
from darknet-on-opencl.
Awesome. Looks good. Will test on my box and let you know.
from darknet-on-opencl.
That's great, thx a lot for your efforts.
However:
-- Looking for CL_VERSION_2_1 - not found
-- Looking for CL_VERSION_2_0
-- Looking for CL_VERSION_2_0 - found
-- Found OpenCL: /usr/lib/x86_64-linux-gnu/libOpenCL.so (found version "2.0")
So I have OpenCL 2.0. And get:
gemm.cpp:(.text+0x77f): Nicht definierter Verweis auf clEnqueueSVMMap' gemm.cpp:(.text+0x7c4): Nicht definierter Verweis auf
clEnqueueSVMMap'
gemm.cpp:(.text+0x808): Nicht definierter Verweis auf clEnqueueSVMMap' gemm.cpp:(.text+0x9d9): Nicht definierter Verweis auf
clEnqueueSVMUnmap'
gemm.cpp:(.text+0x9fd): Nicht definierter Verweis auf clEnqueueSVMUnmap' gemm.cpp:(.text+0xa21): Nicht definierter Verweis auf
clEnqueueSVMUnmap'
It's german for undefined reference to. I'm a bit confused. According to the beignet doc OpenCL 2.0 is only supported on Skylake and up, so that would explain this, abut not why OpenCL 2.0 is found.
from darknet-on-opencl.
"CL_MISALIGNED_SUB_BUFFER_OFFSET, means when you create a sub buffer from a GPU buffer, there is limitations on the offset alignment."
Can you explain what this means to me in more detail. What do you mean by limitations of offset alignment. Can you provide a simple example?
from darknet-on-opencl.
@soulslicer
You have a cl_mem buffer, and wanna to create a sub buffer on it, but it does not mean an arbitrary offset is acceptable. You can refer to https://www.khronos.org/registry/OpenCL/sdk/1.1/docs/man/xhtml/clCreateSubBuffer.html
from darknet-on-opencl.
@ganyc717
Thx a lot for your work.
I run branch Master on Win10 with a AMD GPU, and i recieved a error -13.
then,i run on branch: test-enable-shared-virtual-memory, i recieved error -14 in void fill_gpu(int N, float ALPHA, CLArray X, int INCX)
So what should I do next?
from darknet-on-opencl.
@chenxian9999
I enable the shared virtual memory on different platforms, some works but some failed with error -14. I will find why get such error.
from darknet-on-opencl.
Thx a lot.
Looking forward to your improvement.
from darknet-on-opencl.
i too am getting error -13 has there been a fix yet?
i did get this one to compile, but its an old build
https://github.com/myestro/darknet
`im2col_kernels.cl build log:
/tmp/OCL2394T5.cl:36:18: warning: '/*' within block comment
//*data_col_ptr = data_im_ptr[ii * width + jj];
^
1 warning generated.
opencl execution error, code -13 -13
terminate called after throwing an instance of 'std::runtime_error'
what(): OpenCL error, code: -13
`
from darknet-on-opencl.
Related Issues (20)
- Compilation errors HOT 1
- cmake found wrong opencl path HOT 2
- Linking CXX executable darknet issue HOT 1
- opencl execution error, code -11 -11 HOT 5
- Running this on FPGA HOT 6
- GPU to CPU copy speed bottleneck?
- OpenCL execution error, code -50
- compile error: data.cpp
- macOS/Windows support - CMakeLists.txt
- Support for simrdwn project
- how to use it in Android ?
- opencl execution error, code -6 -6 HOT 1
- OpenCL execution Error -13 (CL_MISALIGNED_SUB_BUFFER_OFFSET) on AMD GPU HOT 1
- clEnqueueNDRangeKernel NULL event_wait_list HOT 1
- couldn't open file: cfg/coco.data HOT 1
- opencl execution error, code -54 -54
- macOS on M1: running make command generates 46 warnings and 9 errors HOT 7
- ld: symbol(s) not found for architecture x86_64
- requires CUDA header files installation for AMD GPUs?
- Compile error in 12norm_layer.cpp HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from darknet-on-opencl.