Skip to content

Commit e061d68

Browse files
committed
feat: adding code for release v0.9.0
1 parent b3bd172 commit e061d68

File tree

189 files changed

+5150
-2493
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

189 files changed

+5150
-2493
lines changed

.github/workflows/codeql.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ jobs:
4848
run: |
4949
sudo apt update -y && sudo apt install -y --no-install-recommends \
5050
python3 python3-pip python3-dev python3-distutils doxygen && sudo rm -rf /var/lib/apt/lists/* \
51-
&& python3 -m pip install sphinx-rtd-theme sphinx breathe exhale recommonmark graphviz \
51+
&& python3 -m pip install sphinx-rtd-theme sphinx breathe recommonmark graphviz \
5252
&& python3 -m pip install numpy==1.24.1 patchelf==0.17.2.1
5353
5454
- if: matrix.language == 'c-cpp'
@@ -92,7 +92,7 @@ jobs:
9292
- if: matrix.language == 'c-cpp' && github.event_name == 'push'
9393
name: Build Docs and Clean up Sphinx Build Directory
9494
run: |
95-
./ci/build.sh debug build "-DBUILD_SAMPLES=OFF -DBUILD_TESTS=OFF -DBUILD_DOCS=ON -DBUILD_PYTHON=ON" $*
95+
./ci/build.sh debug build "-DBUILD_SAMPLES=OFF -DBUILD_TESTS=OFF -DBUILD_DOCS=ON -DBUILD_PYTHON=ON -DPYTHON_VERSIONS=3.8" $*
9696
find build/docs/sphinx -name '*.doctree' -delete
9797
find build/docs/sphinx -name '*.map' -delete
9898
find build/docs/sphinx -name '*.pickle' -delete

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
# ----------------
1818
/build/
1919
/build-*/
20+
/build_*/
2021
/install/
2122
/cvcuda-installer*/
2223

@@ -47,7 +48,8 @@ ipython_config.py
4748

4849
# Documentation
4950
# -------------
50-
_exhale_api
51+
_c_cpp_api
52+
_cvcuda_api
5153

5254
# Samples
5355
# -------------

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ endif()
2323

2424
project(cvcuda
2525
LANGUAGES C CXX
26-
VERSION 0.8.0
26+
VERSION 0.9.0
2727
DESCRIPTION "CUDA-accelerated Computer Vision algorithms"
2828
)
2929

README.md

Lines changed: 21 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,13 @@
1818

1919
[![License](https://img.shields.io/badge/License-Apache_2.0-yellogreen.svg)](https://opensource.org/licenses/Apache-2.0)
2020

21-
![Version](https://img.shields.io/badge/Version-v0.8.0--beta-blue)
21+
![Version](https://img.shields.io/badge/Version-v0.9.0--beta-blue)
2222

2323
![Platform](https://img.shields.io/badge/Platform-linux--64_%7C_win--64_wsl2%7C_aarch64-gray)
2424

2525
[![CUDA](https://img.shields.io/badge/CUDA-v11.7-%2376B900?logo=nvidia)](https://developer.nvidia.com/cuda-toolkit-archive)
2626
[![GCC](https://img.shields.io/badge/GCC-v11.0-yellow)](https://gcc.gnu.org/gcc-11/changes.html)
27-
[![Python](https://img.shields.io/badge/python-v3.7_%7c_v3.8_%7c_v3.9_%7c_v3.10%7c_v3.11-blue?logo=python)](https://www.python.org/)
27+
[![Python](https://img.shields.io/badge/python-v3.8_%7c_v3.9_%7c_v3.10%7c_v3.11-blue?logo=python)](https://www.python.org/)
2828
[![CMake](https://img.shields.io/badge/CMake-v3.20-%23008FBA?logo=cmake)](https://cmake.org/)
2929

3030
CV-CUDA is an open-source project that enables building efficient cloud-scale
@@ -53,13 +53,16 @@ To get a local copy up and running follow these steps.
5353
\** full build, including test module <br>
5454
\*** [samples][CV-CUDA Samples] require driver r535 or later to run and are only officially supported with CUDA 12.
5555

56-
### Known limitations
56+
### Known limitations and issues
5757

5858
- For GCC versions lower than 11.0, C++17 support needs to be enabled when compiling CV-CUDA.
5959
- The C++ test module cannot build with gcc<11 (requires specific C++-20 features). With gcc-9 or gcc-10, please build with option `-DBUILD_TESTS=0`
6060
- [CV-CUDA Samples] require driver r535 or later to run and are only officially supported with CUDA 12.
6161
- Only one CUDA version (CUDA 11.x or CUDA 12.x) of CV-CUDA packages (Debian packages, tarballs, Python Wheels) can be installed at a time. Please uninstall all packages from a given CUDA version before installing packages from a different version.
62-
- Documentation built with older toolchains (doxygen, sphinx, breathe, exhale) may be incomplete. We recommend using Ubuntu 22.04 or later.
62+
- Documentation built on Ubuntu 20.04 needs an up-to-date version of sphinx (`pip install --upgrade sphinx`) as well as explicitly parsing the system's default python version ` ./ci/build_docs path/to/build -DPYTHON_VERSIONS="<py_ver>"`.
63+
- Python tests fail with numpy 2.0. We recommend using an older version (eg 1.26) until we have implemented a fix.
64+
- Python bindings installed via Debian packages fail with numpy 2.0. We recommend using an older version (eg 1.26) until we have implemented a fix.
65+
- The Resize and RandomResizedCrop operators incorrectly interpolate pixel values near the boundary of an image or tensor when using linear and cubic interpolation. This will be fixed in an upcoming release.
6366

6467
### Installation
6568

@@ -87,12 +90,12 @@ Please note that the Python wheels are standalone, they include both the C++/CUD
8790

8891
Install C++/CUDA libraries (cvcuda-lib*) and development headers (cvcuda-dev*) using `apt`:
8992
```shell
90-
apt install -y ./cvcuda-lib-<x.x.x>-<cu_ver>-<arch>-linux.deb ./cvcuda-dev-<x.x.x>-<cu_ver>-<arch>-linux.deb
93+
sudo apt install -y ./cvcuda-lib-<x.x.x>-<cu_ver>-<arch>-linux.deb ./cvcuda-dev-<x.x.x>-<cu_ver>-<arch>-linux.deb
9194
```
9295

9396
Install Python bindings (cvcuda-python*) using `apt`:
9497
```shell
95-
apt install -y ./cvcuda-python<py_ver>-<x.x.x>-<cu_ver>-<arch>-linux.deb
98+
sudo apt install -y ./cvcuda-python<py_ver>-<x.x.x>-<cu_ver>-<arch>-linux.deb
9699
```
97100
where `<cu_ver>` is the desired CUDA version, `<py_ver>` is the desired Python version and `<arch>` is the desired architecture.
98101

@@ -122,7 +125,7 @@ Install the dependencies needed to setup up the repository:
122125

123126
On Ubuntu >= 20.04, install the following packages using `apt`:
124127
```shell
125-
apt install -y git git-lfs
128+
sudo apt install -y git git-lfs
126129
```
127130

128131
Clone the repository
@@ -145,19 +148,20 @@ Install the dependencies required to build CV-CUDA:
145148
- python3-dev: for python bindings
146149
- libssl-dev: needed by the testsuite (MD5 hashing utilities)
147150
- CUDA toolkit
151+
- patchelf
148152

149153
On Ubuntu >= 20.04, install the following packages using `apt`:
150154
```shell
151-
apt install -y g++-11 cmake ninja-build python3-dev libssl-dev
155+
sudo apt install -y g++-11 cmake ninja-build python3-dev libssl-dev patchelf
152156
```
153157

154158
Any version of the 11.x or 12.x CUDA toolkit should work.
155159
CV-CUDA was tested with 11.7 and 12.2, these versions are thus recommended.
156160

157161
```shell
158-
apt install -y cuda-11-7
162+
sudo apt install -y cuda-11-7
159163
# or
160-
apt install -y cuda-12-2
164+
sudo apt install -y cuda-12-2
161165
```
162166

163167
Build the project:
@@ -175,18 +179,18 @@ ci/build.sh [release|debug] [output build tree path] [-DBUILD_TESTS=1|0] [-DPYTH
175179

176180
#### 3. Build Documentation
177181

178-
Known limitation: documentation built with older toolchains (doxygen, sphinx, breathe, exhale) may be incomplete. We recommend using Ubuntu 22.04 or later.
182+
Known limitation: Documentation built on Ubuntu 20.04 needs an up-to-date version of sphinx (`pip install --upgrade sphinx`) as well as explicitly parsing the system's default python version ` ./ci/build_docs path/to/build -DPYTHON_VERSIONS="<py_ver>"`.
179183

180184
Install the dependencies required to build the documentation:
181185
- doxygen: parse header files for reference documentation
182186
- python3, python3-pip: to install some python packages needed
183-
- sphinx, breathe, exhale, recommonmark, graphiviz: to render the documentation
187+
- sphinx, breathe, recommonmark, graphiviz: to render the documentation
184188
- sphinx-rtd-theme: documentation theme used
185189

186190
On Ubuntu, install the following packages using `apt` and `pip`:
187191
```shell
188-
apt install -y doxygen graphviz python3 python3-pip sphinx
189-
python3 -m pip install breathe exhale recommonmark graphviz sphinx-rtd-theme
192+
sudo apt install -y doxygen graphviz python3 python3-pip sphinx
193+
python3 -m pip install breathe recommonmark graphviz sphinx-rtd-theme
190194
```
191195

192196
Build the documentation:
@@ -204,11 +208,12 @@ For instructions on how to build samples from source and run them, see the [Samp
204208
Install the dependencies required for running the tests:
205209
- python3, python3-pip: to run python bindings tests
206210
- torch: dependencies needed by python bindings tests
211+
- numpy: known limitation: Python tests fail with numpy 2.0. We recommend using an older version (eg 1.26) until we have implemented a fix.
207212

208213
On Ubuntu >= 20.04, install the following packages using `apt` and `pip`:
209214
```shell
210-
apt install -y python3 python3-pip
211-
python3 -m pip install pytest torch
215+
sudo apt install -y python3 python3-pip
216+
python3 -m pip install pytest torch numpy==1.26
212217
```
213218

214219
The tests are in `<buildtree>/bin`. You can run the script below to run all tests at once. Here's an example when build tree is created in `build-rel`:

docs/CMakeLists.txt

Lines changed: 27 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -38,39 +38,44 @@ file(MAKE_DIRECTORY ${DOXYGEN_OUTPUT_DIR})
3838
list(GET PYTHON_VERSIONS -1 VER)
3939

4040
add_custom_command(OUTPUT ${DOXYGEN_INDEX_FILE}
41-
COMMAND ${DOXYGEN_EXECUTABLE} ${DOXYFILE_OUT}
42-
MAIN_DEPENDENCY ${DOXYFILE_OUT} ${DOXYFILE_IN}
43-
COMMENT "Generating doxygen xml"
44-
DEPENDS cvcuda_python${VER})
41+
COMMAND ${DOXYGEN_EXECUTABLE} ${DOXYFILE_OUT}
42+
MAIN_DEPENDENCY ${DOXYFILE_OUT} ${DOXYFILE_IN}
43+
COMMENT "Generating doxygen xml"
44+
DEPENDS cvcuda_python${VER})
4545

4646
add_custom_target(cvcuda_doxygen ALL DEPENDS ${DOXYGEN_INDEX_FILE})
4747

4848
set(SPHINX_SOURCE ${CMAKE_CURRENT_SOURCE_DIR}/sphinx)
49-
set(EXHALE_SOURCE ${SPHINX_SOURCE}/_exhale_api)
5049
set(SPHINX_BUILD ${CMAKE_CURRENT_BINARY_DIR}/sphinx)
5150
set(SPHINX_INDEX_FILE ${SPHINX_BUILD}/index.html)
52-
set(SPHINX_GROUP_INDEX_FILE ${SPHINX_BUILD}/groupindex.html)
51+
set(C_CPP_API_RST ${SPHINX_SOURCE}/_c_cpp_api)
52+
set(PY_CVCUDA_API_RST ${SPHINX_SOURCE}/_python_api/_cvcuda_api)
53+
54+
# Start from clean directory for rst files, otherwise build could be affected due to old files
55+
file(REMOVE_RECURSE ${C_CPP_API_RST}/*)
56+
file(REMOVE_RECURSE ${PY_CVCUDA_API_RST}/*)
5357

5458
# Generate rst files for groups from doxygen index.xml
55-
add_custom_target(cvcuda_groups ALL
56-
COMMAND python3 ${SPHINX_SOURCE}/generate_groups.py ${EXHALE_SOURCE} ${DOXYGEN_OUTPUT_DIR}/xml
57-
DEPENDS ${DOXYGEN_INDEX_FILE})
59+
add_custom_target(cvcuda_groups ALL python3 ${SPHINX_SOURCE}/generate_groups.py ${C_CPP_API_RST} ${DOXYGEN_OUTPUT_DIR}/xml
60+
DEPENDS cvcuda_doxygen)
61+
62+
# Generate rst files for python documentation
63+
add_custom_target(cvcuda_python_docs ALL python3 ${SPHINX_SOURCE}/gen_py_doc_rsts.py ${PY_CVCUDA_API_RST} ${CMAKE_SOURCE_DIR}
64+
DEPENDS cvcuda_python${VER})
5865

5966
# Generate Sphinx
6067
add_custom_command(OUTPUT ${SPHINX_INDEX_FILE}
61-
COMMAND
62-
${CMAKE_COMMAND} -E env "SPHINX_PYTHON_SRC=${CMAKE_BINARY_DIR}/lib/python" "DOXYGEN_STRIP_PATH=${CMAKE_CURRENT_SOURCE_DIR}/../src"
63-
${SPHINX_EXECUTABLE} -j auto -b html
64-
# Tell Breathe where to find the Doxygen output
65-
-Dbreathe_projects.cvcuda=${DOXYGEN_OUTPUT_DIR}/xml
66-
${SPHINX_SOURCE} ${SPHINX_BUILD}
67-
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
68-
DEPENDS
69-
${SPHINX_SOURCE}/index.rst
70-
${DOXYGEN_INDEX_FILE}
71-
cvcuda_groups
72-
MAIN_DEPENDENCY ${SPHINX_SOURCE}/conf.py
73-
COMMENT "Generating documentation with Sphinx")
68+
COMMAND ${CMAKE_COMMAND} -E env "SPHINX_PYTHON_SRC=${CMAKE_BINARY_DIR}/lib/python"
69+
${SPHINX_EXECUTABLE} -j auto -b html
70+
# Tell Breathe where to find the Doxygen's xml output. Needed to have c/cpp documentation.
71+
-Dbreathe_projects.cvcuda=${DOXYGEN_OUTPUT_DIR}/xml
72+
${SPHINX_SOURCE} ${SPHINX_BUILD}
73+
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
74+
DEPENDS ${SPHINX_SOURCE}/index.rst
75+
cvcuda_doxygen
76+
cvcuda_groups
77+
MAIN_DEPENDENCY ${SPHINX_SOURCE}/conf.py
78+
COMMENT "Generating documentation with Sphinx")
7479

7580
add_custom_target(cvcuda_sphinx ALL DEPENDS ${SPHINX_INDEX_FILE})
7681

docs/Doxyfile.in

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -748,22 +748,22 @@ QUIET = NO
748748
# Tip: Turn warnings on while writing the documentation.
749749
# The default value is: YES.
750750

751-
WARNINGS = YES
751+
WARNINGS = NO
752752

753753
# If the WARN_IF_UNDOCUMENTED tag is set to YES then doxygen will generate
754754
# warnings for undocumented members. If EXTRACT_ALL is set to YES then this flag
755755
# will automatically be disabled.
756756
# The default value is: YES.
757757

758-
WARN_IF_UNDOCUMENTED = YES
758+
WARN_IF_UNDOCUMENTED = NO
759759

760760
# If the WARN_IF_DOC_ERROR tag is set to YES, doxygen will generate warnings for
761761
# potential errors in the documentation, such as not documenting some parameters
762762
# in a documented function, or documenting parameters that don't exist or using
763763
# markup commands wrongly.
764764
# The default value is: YES.
765765

766-
WARN_IF_DOC_ERROR = YES
766+
WARN_IF_DOC_ERROR = NO
767767

768768
# This WARN_NO_PARAMDOC option can be enabled to get warnings for functions that
769769
# are documented, but have no documentation for their parameters or return
@@ -2419,7 +2419,7 @@ PLANTUML_INCLUDE_PATH =
24192419
# Minimum value: 0, maximum value: 10000, default value: 50.
24202420
# This tag requires that the tag HAVE_DOT is set to YES.
24212421

2422-
DOT_GRAPH_MAX_NODES = 50
2422+
DOT_GRAPH_MAX_NODES = 128
24232423

24242424
# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the graphs
24252425
# generated by dot. A depth value of 3 means that only nodes reachable from the
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
..
2+
# SPDX-FileCopyrightText: Copyright (c) 2022 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
3+
# SPDX-License-Identifier: Apache-2.0
4+
#
5+
# Licensed under the Apache License, Version 2.0 (the "License");
6+
# you may not use this file except in compliance with the License.
7+
# You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing, software
12+
# distributed under the License is distributed on an "AS IS" BASIS,
13+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
# See the License for the specific language governing permissions and
15+
# limitations under the License.
16+
17+
Cache
18+
=====
19+
20+
.. automodule:: nvcv
21+
:noindex:
22+
:members: cache_size, clear_cache
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
..
2+
# SPDX-FileCopyrightText: Copyright (c) 2022 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
3+
# SPDX-License-Identifier: Apache-2.0
4+
#
5+
# Licensed under the Apache License, Version 2.0 (the "License");
6+
# you may not use this file except in compliance with the License.
7+
# You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing, software
12+
# distributed under the License is distributed on an "AS IS" BASIS,
13+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
# See the License for the specific language governing permissions and
15+
# limitations under the License.
16+
17+
Color Models
18+
============
19+
20+
.. automodule:: nvcv
21+
:noindex:
22+
:members: ColorSpec
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
..
2+
# SPDX-FileCopyrightText: Copyright (c) 2022 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
3+
# SPDX-License-Identifier: Apache-2.0
4+
#
5+
# Licensed under the Apache License, Version 2.0 (the "License");
6+
# you may not use this file except in compliance with the License.
7+
# You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing, software
12+
# distributed under the License is distributed on an "AS IS" BASIS,
13+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
# See the License for the specific language governing permissions and
15+
# limitations under the License.
16+
17+
Image Formats
18+
=============
19+
20+
.. automodule:: nvcv
21+
:noindex:
22+
:members: Format
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
..
2+
# SPDX-FileCopyrightText: Copyright (c) 2022 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
3+
# SPDX-License-Identifier: Apache-2.0
4+
#
5+
# Licensed under the Apache License, Version 2.0 (the "License");
6+
# you may not use this file except in compliance with the License.
7+
# You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing, software
12+
# distributed under the License is distributed on an "AS IS" BASIS,
13+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
# See the License for the specific language governing permissions and
15+
# limitations under the License.
16+
17+
Image
18+
=====
19+
20+
.. automodule:: nvcv
21+
:noindex:
22+
:members: Image, as_image
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
..
2+
# SPDX-FileCopyrightText: Copyright (c) 2022 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
3+
# SPDX-License-Identifier: Apache-2.0
4+
#
5+
# Licensed under the Apache License, Version 2.0 (the "License");
6+
# you may not use this file except in compliance with the License.
7+
# You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing, software
12+
# distributed under the License is distributed on an "AS IS" BASIS,
13+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+
# See the License for the specific language governing permissions and
15+
# limitations under the License.
16+
17+
ImageBatchVarShape
18+
==================
19+
20+
.. automodule:: nvcv
21+
:noindex:
22+
:members: ImageBatchVarShape, as_images

0 commit comments

Comments
 (0)