ComputeLibrary | Compute Library is a set of computer vision | Machine Learning library
kandi X-RAY | ComputeLibrary Summary
kandi X-RAY | ComputeLibrary Summary
Please report issues here: Documentation (API, changelogs, build guide, contribution guide, errata, etc.) available at Binaries available at
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of ComputeLibrary
ComputeLibrary Key Features
ComputeLibrary Examples and Code Snippets
Community Discussions
Trending Discussions on ComputeLibrary
QUESTION
In the ARM ComputeLibrary, we can have a Tensor object of various types. When choosing the type of Tensors, we pass the type to the initaliser of the Tensor's allocator, such as float32 here:
...ANSWER
Answered 2018-Dec-29 at 10:52Well... armcl types are, if I understand correctly, enum values.
So a possible approach is a template struct, with full specializations, with a value
in it.
I mean... something as
QUESTION
I am working with integrating ARM ComputeLibrary into a project.
It's not an API whose semantics I am familiar with, but I'm working my way through the docs and examples.
At the moment, I am trying to copy the contents of an std::vector
to a CLTensor
. Then use the ARMCL GEMM operation.
I've been building an MWE, shown below, with the aim of getting matrix multiplication working.
To get the input data from a standard C++ std::vector
, or std::ifstream
, I am trying an iterator based approach, based on this example shown in the docs.
However, I keep getting a segfault.
There is an example of sgemm using CLTensor
in the source, which is also where I'm drawing inspiration from. However it gets its input data from Numpy arrays, so isn't relevant up to this point.
I'm not sure in ARMCL if CLTensor
and Tensor
have disjoint methods. But I feel like they are of a common interface ITensor
. Still, I haven't been able to find an equivalent example that uses CLTensor
instead of Tensor
for this iterator based method.
You can see my code I'm working with below, which fails on line 64 (*reinterpret_cast..
). I'm not entirely sure what the operations are that it performs, but my guess is that we have our ARMCL iterator input_it
which is incremented n * m
times, each iteration setting the value of the CLTensor
at that address to the corresponding input value. reinterpret_cast
is just to make the types play nicely together?
I reckon my Iterator and Window objects are okay, but can't be sure.
...ANSWER
Answered 2018-Dec-14 at 17:06The part you've missed (Which admittedly could be better explained in the documentation!) is that you need to map / unmap OpenCL buffers in order to make them accessible to the CPU.
If you look inside the fill_random_tensor (which is what's used in the cl_sgemm example you've got a call to tensor.map();
So if you map()
your buffer before creating your iterator then I believe it should work:
QUESTION
ANSWER
Answered 2018-Oct-11 at 14:47I found where I was going wrong and developed this function, which creates an OpenCV Mat from an ACL Image:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install ComputeLibrary
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page