running pcsegdist on gpu

Hi, so its said in the documentation of the function pcsegdist, that it supports gpu, but when I run it, if I look into the function in debug mode, then:
isGPU = coder.gpu.internal.isGpuEnabled;
is 0 and it doesn't run on the gpu.
if I run the command:
gpuDevice
it shows that the device is selected:
K>> gpuDevice
ans =
CUDADevice with properties:
Name: 'NVIDIA GeForce RTX 2080 Ti'
Index: 1
ComputeCapability: '7.5'
SupportsDouble: 1
DriverVersion: 11.6000
ToolkitVersion: 11.2000
MaxThreadsPerBlock: 1024
MaxShmemPerBlock: 49152
MaxThreadBlockSize: [1024 1024 64]
MaxGridSize: [2.1475e+09 65535 65535]
SIMDWidth: 32
TotalMemory: 1.1811e+10
AvailableMemory: 1.0273e+10
MultiprocessorCount: 68
ClockRateKHz: 1545000
ComputeMode: 'Default'
GPUOverlapsTransfers: 1
KernelExecutionTimeout: 1
CanMapHostMemory: 1
DeviceSupported: 1
DeviceAvailable: 1
DeviceSelected: 1
Anyone knows what could be the issue ?
Thank you in advance.

回答 (1 件)

Walter Roberson
Walter Roberson 2022 年 6 月 11 日
編集済み: Walter Roberson 2022 年 6 月 12 日

1 投票

The document says that the function is supported by GPU Coder, not that it can run on GPU normally.
There is no support for marking a pointCloud as existing on GPU; you cannot pointCloud() a gpuArray either.
For an example of the flow needed to do pointCloud work on GPU using GPU Coder toolbox, see https://www.mathworks.com/help/gpucoder/ug/lidar-point-cloud-segmentation-using-gpucoder.html

3 件のコメント

Ilya K
Ilya K 2022 年 6 月 11 日
From link above, I think mostof the magic is done in this peace of code:
cfg = coder.gpuConfig('mex');
cfg.TargetLang = 'C++';
cfg.DeepLearningConfig = coder.DeepLearningConfig('cudnn');
codegen -config cfg squeezesegv2_predict -args {ones(64,1024,5,'uint8')} -report
especially in the last line. But im not sure how to adjust it to the function
pcsegdist
Should I replace squeezesegv2_predict by pcsegdist and correct the rights args for i (No sure what are the args in my case).
In the example they are also use the help function to translate pointcloud to 2d 5ch image, but im not sure I need that for the clustering.
Could you maybe reffer to the function above and give more details on how can I configure it to run on the GPU through the coder please ?
Thank you in advance.
Image Analyst
Image Analyst 2022 年 6 月 11 日
What's the difference between this clustering method (pcsegdist) and something like dbscan? They sound similar in that points closer than a certain distance are in the same cluster while other points farther away than the specified distance belong to a different cluster? When would you use each?
Ilya K
Ilya K 2022 年 6 月 11 日
@Image Analyst, pretty mcuh similiar results and also in the documentation of pcsegdist it is said it uses g-dbscan which is a gpu-zed version of dbscan with another method. I think its pretty much the same. The advantage of pcsegdist is it can be used on gpu as much i understand and trying to figure it out in ths post.

サインインしてコメントする。

カテゴリ

製品

リリース

R2022a

質問済み:

2022 年 6 月 11 日

編集済み:

2022 年 6 月 12 日

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by