GstCUDA - Evaluating GstCUDA: Difference between revisions
No edit summary |
mNo edit summary |
||
(27 intermediate revisions by 10 users not shown) | |||
Line 1: | Line 1: | ||
{{GstCUDA | {{GstCUDA/Head|previous=Supported Platforms|next=Building and Installation Guide|metakeywords=GstCUDA evaluation binary, GstCUDA binary installation, GstCUDA binary testing, GstCUDA binary Troubleshooting}} | ||
This page serves as a guide to test the GstCUDA evaluation binary provided by RidgeRun. | This page serves as a guide to test the GstCUDA evaluation binary provided by RidgeRun. | ||
Line 10: | Line 8: | ||
In order to request an evaluation binary for a specific architecture, please contact us providing the following information: | In order to request an evaluation binary for a specific architecture, please contact us providing the following information: | ||
* Platform (i.e.: TX1, TX2) | * Platform (i.e.: TX1, TX2, x86) | ||
* gst-launch-1.0 --gst-version | * gst-launch-1.0 --gst-version | ||
* uname -a | * uname -a | ||
* Jetpack and L4T version | * Jetpack and L4T version (Linux distribution version for x86) | ||
<center> | <center> | ||
Line 19: | Line 17: | ||
</center> | </center> | ||
== Evaluation Version Feature == | |||
The GstCUDA evaluation version contains all the features of the full version, with the exception that it is limited to process a maximum of 1800 frames. Also, it is provided in binary form, so you won't have access to the source code. | |||
The | The 1800 frames maximum processing limitation allows to test GstCUDA for 30 seconds on a 60 fps pipeline, or for one minute on a 30 fps pipeline. | ||
The following table summarizes the features available in both the professional and evaluation version of the element. | The following table summarizes the features available in both the professional and evaluation version of the element. | ||
Line 65: | Line 62: | ||
</center> | </center> | ||
</html> | </html> | ||
(1) The evaluation version will limit the processing to a maximum of 1800 frames. | |||
== | == Installation and testing == | ||
=== Dependencies === | === Dependencies === | ||
First, make sure the dependencies are fulfilled: | First, make sure the dependencies are fulfilled: | ||
Line 80: | Line 78: | ||
libgstreamer-plugins-bad1.0-dev \ | libgstreamer-plugins-bad1.0-dev \ | ||
gstreamer1.0-plugins-bad \ | gstreamer1.0-plugins-bad \ | ||
libegl1-mesa-dev | libegl1-mesa-dev | ||
</syntaxhighlight> | </syntaxhighlight> | ||
Also, be sure that [[https://developer.ridgerun.com/wiki/index.php?title=GstCUDA_-_Building_and_Installation_Guide#CUDA_L4T_package CUDA L4T package]] | Also, be sure that [[https://developer.ridgerun.com/wiki/index.php?title=GstCUDA_-_Building_and_Installation_Guide#CUDA_L4T_package CUDA L4T package]] is successfully installed. | ||
=== Eval Binary structure === | === Eval Binary structure === | ||
Line 91: | Line 88: | ||
<syntaxhighlight lang="bash"> | <syntaxhighlight lang="bash"> | ||
. | |||
├── examples | |||
│ ├── algorithm.mk | |||
│ ├── cudafilter_algorithms | |||
│ │ ├── gray-scale-filter | |||
│ │ │ ├── gray-scale-filter.cu | |||
│ │ │ ├── gray-scale-filter.so | |||
│ │ │ ├── Makefile | |||
│ │ │ ├── README.md | |||
│ │ │ └── test-pipelines.txt | |||
│ │ ├── median-filter | |||
│ │ │ ├── Makefile | |||
│ │ │ ├── median-filter.cu | |||
│ │ │ ├── median-filter.so | |||
│ │ │ └── README.md | |||
│ │ ├── memcpy | |||
│ │ │ ├── Makefile | |||
│ │ │ ├── memcpy.cu | |||
│ │ │ ├── memcpy.so | |||
│ │ │ ├── README.md | |||
│ │ │ └── test-pipelines.txt | |||
│ │ └── pinhole | |||
│ │ ├── Makefile | |||
│ │ ├── pinhole.cu | |||
│ │ ├── pinhole.so | |||
│ │ └── README.md | |||
│ └── cudamux_algorithms | |||
│ └── mixer | |||
│ ├── Makefile | |||
│ ├── mixer.cu | |||
│ ├── mixer.so | |||
│ ├── README.md | |||
│ └── test-pipelines.txt | |||
└── usr | └── usr | ||
├── include | ├── include | ||
Line 96: | Line 126: | ||
│ └── sys | │ └── sys | ||
│ └── cuda | │ └── cuda | ||
│ ├── | │ ├── filteralgorithm.hpp | ||
│ ├── gstcudaallocator.h | |||
│ ├── gstcudabasefilter.h | │ ├── gstcudabasefilter.h | ||
│ | │ ├── gstcudabasemiso.h | ||
├── lib | │ ├── gstcudabufferpool.h | ||
│ ├── gstcuda.h | |||
│ ├── gstcudameta.h | |||
│ └── muxalgorithm.hpp | |||
└── lib | |||
└── aarch64-linux-gnu | |||
├── gstreamer-1.0 | |||
│ ├── libgstcudaexamplefilter.so | |||
│ ├── libgstcuda.so | |||
│ ├── libgstopencvfilter.so | |||
│ └── libgstopencvwarp.so | |||
├── libgstcuda-1.0.so -> libgstcuda-1.0.so.0.100.0 | |||
├── libgstcuda-1.0.so.0 -> libgstcuda-1.0.so.0.100.0 | |||
└── libgstcuda-1.0.so.0.100.0 | |||
</syntaxhighlight> | </syntaxhighlight> | ||
=== Eval Binary Installation === | === Eval Binary Installation === | ||
To use the binary provided by RidgeRun, export the location of the evaluation binary libraries in your environment. | To use the binary provided by RidgeRun, export the location of the evaluation binary libraries in your environment. | ||
==== For Jetson platform ==== | |||
<syntaxhighlight lang="bash"> | |||
export GST_PLUGIN_PATH=${GST_PLUGIN_PATH}:${PATH_TO_EVALUATION_BINARY}/usr/lib/aarch64-linux-gnu/gstreamer-1.0/ | |||
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${PATH_TO_EVALUATION_BINARY}/usr/lib/aarch64-linux-gnu/ | |||
</syntaxhighlight> | |||
where PATH_TO_EVALUATION_BINARY is set the location in your file system where you have stored the binary provided by RidgeRun. | |||
Alternatively, you may just copy the binaries into the standard GStreamer plug-in search path as the follow instructions: | |||
<syntaxhighlight lang="bash"> | |||
sudo cp ${PATH_TO_EVALUATION_BINARY}/usr/lib/aarch64-linux-gnu/gstreamer-1.0/{libgstcudaexamplefilter.so,libgstcuda.so} /usr/lib/aarch64-linux-gnu/gstreamer-1.0 | |||
sudo cp ${PATH_TO_EVALUATION_BINARY}/usr/lib/aarch64-linux-gnu/{libgstcuda-1.0.so,libgstcuda-1.0.so.0,libgstcuda-1.0.so.0.100.0} /usr/lib/aarch64-linux-gnu | |||
sudo mkdir -p /usr/include/gstreamer-1.0/sys/cuda | |||
sudo cp ${PATH_TO_EVALUATION_BINARY}/usr/include/gstreamer-1.0/sys/cuda/{filteralgorithm.hpp,muxalgorithm.hpp,gstcudabasefilter.h,gstcuda.h} /usr/include/gstreamer-1.0/sys/cuda | |||
</syntaxhighlight> | |||
==== For x86 platform ==== | |||
<syntaxhighlight lang="bash"> | <syntaxhighlight lang="bash"> | ||
export GST_PLUGIN_PATH=${GST_PLUGIN_PATH}: | export GST_PLUGIN_PATH=${GST_PLUGIN_PATH}:${PATH_TO_EVALUATION_BINARY}/usr/lib/x86_64-linux-gnu/gstreamer-1.0/ | ||
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}: | export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${PATH_TO_EVALUATION_BINARY}/usr/lib/x86_64-linux-gnu/ | ||
</syntaxhighlight> | </syntaxhighlight> | ||
where | |||
where PATH_TO_EVALUATION_BINARY is set the location in your file system where you have stored the binary provided by RidgeRun. | |||
Alternatively, you may just copy the binaries into the standard GStreamer plug-in search path as the follow instructions: | Alternatively, you may just copy the binaries into the standard GStreamer plug-in search path as the follow instructions: | ||
<syntaxhighlight lang="bash"> | <syntaxhighlight lang="bash"> | ||
sudo cp | sudo cp ${PATH_TO_EVALUATION_BINARY}/usr/lib/x86_64-linux-gnu/gstreamer-1.0/{libgstcudaexamplefilter.so,libgstcuda.so} /usr/lib/x86_64-linux-gnu/gstreamer-1.0 | ||
sudo cp | sudo cp ${PATH_TO_EVALUATION_BINARY}/usr/lib/x86_64-linux-gnu/{libgstcuda-1.0.so,libgstcuda-1.0.so.0,libgstcuda-1.0.so.0.100.0} /usr/lib/x86_64-linux-gnu | ||
sudo | sudo mkdir -p /usr/include/gstreamer-1.0/sys/cuda | ||
sudo cp ${PATH_TO_EVALUATION_BINARY}/usr/include/gstreamer-1.0/sys/cuda/{filteralgorithm.hpp,muxalgorithm.hpp,gstcudabasefilter.h,gstcuda.h} /usr/include/gstreamer-1.0/sys/cuda | |||
</syntaxhighlight> | </syntaxhighlight> | ||
Line 131: | Line 199: | ||
<syntaxhighlight lang="bash"> | <syntaxhighlight lang="bash"> | ||
gst-inspect-1.0 cuda | |||
</syntaxhighlight> | |||
with expected output: | |||
<syntaxhighlight lang="bash"> | |||
Plugin Details: | Plugin Details: | ||
Name cuda | Name cuda | ||
Description Allows frames to be processed by the GPU using a custom CUDA library algorithm | Description Allows frames to be processed by the GPU using a custom CUDA library algorithm | ||
Filename /usr/lib/ | Filename /home/ubuntu/eval-gstcuda/usr/lib/<platform>/gstreamer-1.0/libgstcuda.so | ||
Version 0. | Version 0.14.1.1 | ||
License Proprietary | License Proprietary | ||
Source module gst-cuda | Source module gst-cuda | ||
Source release date | Source release date 2022-09-28 20:35 (UTC) | ||
Binary package GStreamer CUDA Plug-in | Binary package GStreamer CUDA Plug-in | ||
Origin URL Unknown package origin | Origin URL Unknown package origin | ||
cudamux: cudamux | |||
cudafilter: cudafilter | cudafilter: cudafilter | ||
2 features: | |||
+-- 1 | +-- 2 elements | ||
</syntaxhighlight> | |||
<syntaxhighlight lang="bash"> | |||
gst-inspect-1.0 | grep cuda | |||
</syntaxhighlight> | </syntaxhighlight> | ||
with expected output: | |||
<syntaxhighlight lang="bash"> | <syntaxhighlight lang="bash"> | ||
cudaexamplefilter: cudaexamplefilter: GstCUDA Example Filter Element | cudaexamplefilter: cudaexamplefilter: GstCUDA Example Filter Element | ||
cuda: cudafilter: cudafilter | cuda: cudafilter: cudafilter | ||
cuda: cudamux: cudamux | |||
</syntaxhighlight> | </syntaxhighlight> | ||
You should see the inspect output for the evaluation binary as shown above. | You should see the inspect output for the evaluation binary as shown above. | ||
== Example Pipelines == | == Example Pipelines == | ||
Please refer to the [[GstCUDA - Examples|Examples]] page for reference pipelines. | Please refer to the [[GstCUDA - Examples|Examples]] page for reference pipelines. | ||
== Troubleshooting == | == Troubleshooting == | ||
Line 177: | Line 255: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
}} | {{GstCUDA/Foot|previous=Supported Platforms|next=Building and Installation Guide}} |
Latest revision as of 06:53, 6 March 2023
This page serves as a guide to test the GstCUDA evaluation binary provided by RidgeRun.
Requesting the Evaluation Binary
In order to request an evaluation binary for a specific architecture, please contact us providing the following information:
- Platform (i.e.: TX1, TX2, x86)
- gst-launch-1.0 --gst-version
- uname -a
- Jetpack and L4T version (Linux distribution version for x86)
Evaluation Version Feature
The GstCUDA evaluation version contains all the features of the full version, with the exception that it is limited to process a maximum of 1800 frames. Also, it is provided in binary form, so you won't have access to the source code.
The 1800 frames maximum processing limitation allows to test GstCUDA for 30 seconds on a 60 fps pipeline, or for one minute on a 30 fps pipeline.
The following table summarizes the features available in both the professional and evaluation version of the element.
Feature | Professional | Evaluation |
---|---|---|
cudafilter Element | Y | Y |
cudaexamplefilter Element | Y | Y |
CUDA algorithm examples Library | Y | Y |
Unlimited Processing Time | Y | N (1) |
Source Code | Y | N |
(1) The evaluation version will limit the processing to a maximum of 1800 frames.
Installation and testing
Dependencies
First, make sure the dependencies are fulfilled:
sudo apt-get install \ libgstreamer1.0-dev \ libgstreamer-plugins-base1.0-dev \ gstreamer1.0-plugins-base \ libgstreamer-plugins-bad1.0-dev \ gstreamer1.0-plugins-bad \ libegl1-mesa-dev
Also, be sure that [CUDA L4T package] is successfully installed.
Eval Binary structure
The provided GstCUDA eval version tarball must have the following structure:
. ├── examples │ ├── algorithm.mk │ ├── cudafilter_algorithms │ │ ├── gray-scale-filter │ │ │ ├── gray-scale-filter.cu │ │ │ ├── gray-scale-filter.so │ │ │ ├── Makefile │ │ │ ├── README.md │ │ │ └── test-pipelines.txt │ │ ├── median-filter │ │ │ ├── Makefile │ │ │ ├── median-filter.cu │ │ │ ├── median-filter.so │ │ │ └── README.md │ │ ├── memcpy │ │ │ ├── Makefile │ │ │ ├── memcpy.cu │ │ │ ├── memcpy.so │ │ │ ├── README.md │ │ │ └── test-pipelines.txt │ │ └── pinhole │ │ ├── Makefile │ │ ├── pinhole.cu │ │ ├── pinhole.so │ │ └── README.md │ └── cudamux_algorithms │ └── mixer │ ├── Makefile │ ├── mixer.cu │ ├── mixer.so │ ├── README.md │ └── test-pipelines.txt └── usr ├── include │ └── gstreamer-1.0 │ └── sys │ └── cuda │ ├── filteralgorithm.hpp │ ├── gstcudaallocator.h │ ├── gstcudabasefilter.h │ ├── gstcudabasemiso.h │ ├── gstcudabufferpool.h │ ├── gstcuda.h │ ├── gstcudameta.h │ └── muxalgorithm.hpp └── lib └── aarch64-linux-gnu ├── gstreamer-1.0 │ ├── libgstcudaexamplefilter.so │ ├── libgstcuda.so │ ├── libgstopencvfilter.so │ └── libgstopencvwarp.so ├── libgstcuda-1.0.so -> libgstcuda-1.0.so.0.100.0 ├── libgstcuda-1.0.so.0 -> libgstcuda-1.0.so.0.100.0 └── libgstcuda-1.0.so.0.100.0
Eval Binary Installation
To use the binary provided by RidgeRun, export the location of the evaluation binary libraries in your environment.
For Jetson platform
export GST_PLUGIN_PATH=${GST_PLUGIN_PATH}:${PATH_TO_EVALUATION_BINARY}/usr/lib/aarch64-linux-gnu/gstreamer-1.0/ export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${PATH_TO_EVALUATION_BINARY}/usr/lib/aarch64-linux-gnu/
where PATH_TO_EVALUATION_BINARY is set the location in your file system where you have stored the binary provided by RidgeRun.
Alternatively, you may just copy the binaries into the standard GStreamer plug-in search path as the follow instructions:
sudo cp ${PATH_TO_EVALUATION_BINARY}/usr/lib/aarch64-linux-gnu/gstreamer-1.0/{libgstcudaexamplefilter.so,libgstcuda.so} /usr/lib/aarch64-linux-gnu/gstreamer-1.0 sudo cp ${PATH_TO_EVALUATION_BINARY}/usr/lib/aarch64-linux-gnu/{libgstcuda-1.0.so,libgstcuda-1.0.so.0,libgstcuda-1.0.so.0.100.0} /usr/lib/aarch64-linux-gnu sudo mkdir -p /usr/include/gstreamer-1.0/sys/cuda sudo cp ${PATH_TO_EVALUATION_BINARY}/usr/include/gstreamer-1.0/sys/cuda/{filteralgorithm.hpp,muxalgorithm.hpp,gstcudabasefilter.h,gstcuda.h} /usr/include/gstreamer-1.0/sys/cuda
For x86 platform
export GST_PLUGIN_PATH=${GST_PLUGIN_PATH}:${PATH_TO_EVALUATION_BINARY}/usr/lib/x86_64-linux-gnu/gstreamer-1.0/ export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${PATH_TO_EVALUATION_BINARY}/usr/lib/x86_64-linux-gnu/
where PATH_TO_EVALUATION_BINARY is set the location in your file system where you have stored the binary provided by RidgeRun.
Alternatively, you may just copy the binaries into the standard GStreamer plug-in search path as the follow instructions:
sudo cp ${PATH_TO_EVALUATION_BINARY}/usr/lib/x86_64-linux-gnu/gstreamer-1.0/{libgstcudaexamplefilter.so,libgstcuda.so} /usr/lib/x86_64-linux-gnu/gstreamer-1.0 sudo cp ${PATH_TO_EVALUATION_BINARY}/usr/lib/x86_64-linux-gnu/{libgstcuda-1.0.so,libgstcuda-1.0.so.0,libgstcuda-1.0.so.0.100.0} /usr/lib/x86_64-linux-gnu sudo mkdir -p /usr/include/gstreamer-1.0/sys/cuda sudo cp ${PATH_TO_EVALUATION_BINARY}/usr/include/gstreamer-1.0/sys/cuda/{filteralgorithm.hpp,muxalgorithm.hpp,gstcudabasefilter.h,gstcuda.h} /usr/include/gstreamer-1.0/sys/cuda
Eval Binary Testing
Finally, test that the plugin is being properly picked up by GStreamer by running:
gst-inspect-1.0 cuda
with expected output:
Plugin Details: Name cuda Description Allows frames to be processed by the GPU using a custom CUDA library algorithm Filename /home/ubuntu/eval-gstcuda/usr/lib/<platform>/gstreamer-1.0/libgstcuda.so Version 0.14.1.1 License Proprietary Source module gst-cuda Source release date 2022-09-28 20:35 (UTC) Binary package GStreamer CUDA Plug-in Origin URL Unknown package origin cudamux: cudamux cudafilter: cudafilter 2 features: +-- 2 elements
gst-inspect-1.0 | grep cuda
with expected output:
cudaexamplefilter: cudaexamplefilter: GstCUDA Example Filter Element cuda: cudafilter: cudafilter cuda: cudamux: cudamux
You should see the inspect output for the evaluation binary as shown above.
Example Pipelines
Please refer to the Examples page for reference pipelines.
Troubleshooting
The first level of debug to troubleshoot a failing evaluation binary is to inspect GStreamer debug output.
GST_DEBUG=2 gst-launch-1.0
If the output doesn't help you figure out the problem, please contact support@ridgerun.com with the output of the GStreamer debug and any additional information you consider useful.
If the plug-in is not being recognized, please provide the output of the following command:
gst-inspect-1.0 cuda