Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Doxygen document generation #337

Merged
merged 24 commits into from
Mar 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
39e8893
Added dOxygen Configuration file
yashrajsapra Feb 29, 2024
e09be4a
update build scripts for generating documentation
kushaljain-apra Mar 1, 2024
c6c4725
Added Doxy workflow file
Ashu7950 Mar 1, 2024
7a35265
Added doxy.yml file
Ashu7950 Mar 1, 2024
2b060e6
save generated doxy documentaion as artifact
Ashu7950 Mar 1, 2024
26fc5e5
Added a publish action in doxy.yml
Ashu7950 Mar 4, 2024
90d86f7
add graphviz dependency for doxygen
kushaljain-apra Mar 4, 2024
50b0b84
removed uploading as guthub artifact
Ashu7950 Mar 4, 2024
05ab56a
Testing Workflow
Ashu7950 Mar 4, 2024
d14b7ab
Merge branch 'dOxy' of https://github.com/Apra-Labs/ApraPipes into dOxy
Ashu7950 Mar 4, 2024
412dd98
changed on push branch to main from doxy in doxy.yml
Ashu7950 Mar 4, 2024
fac21db
added publish action
Ashu7950 Mar 4, 2024
fb0fb7a
changes on push branch to main
Ashu7950 Mar 4, 2024
2d601ec
changes publish dir in doxy.yml
Ashu7950 Mar 4, 2024
2be6018
remove hardcoded path
kushaljain-apra Mar 4, 2024
3886941
remove documentation build from scripts
kushaljain-apra Mar 4, 2024
e45f0fa
add documentation build in scripts
kushaljain-apra Mar 4, 2024
1a61333
Added footer.html to display latest connit hash in footer
Ashu7950 Mar 4, 2024
6fd910b
changes in doxy.yml file
Ashu7950 Mar 4, 2024
2b089c8
changes in doxy file
Ashu7950 Mar 4, 2024
d7d31b6
few final changes in doxy.yml
Ashu7950 Mar 4, 2024
7232dc4
Integrated previous documentation with present doxy documentation
Ashu7950 Mar 5, 2024
cdd784a
Updated Copyright Text
yashrajsapra Mar 6, 2024
bf1df81
Improved the overall looks of documentation
Ashu7950 Mar 6, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions .github/workflows/doxy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Doxygen Action

on:
push:
branches: [ main ]

jobs:
build:
runs-on: ubuntu-latest
permissions:
pages: write
steps:
- uses: actions/checkout@v2

- name: Update Footer with Commit Hash
run: |
COMMIT_HASH=$(git rev-parse --short HEAD)
sed -i "s/@COMMIT_HASH@/$COMMIT_HASH/g" footer.html

- name: Doxygen Action
uses: mattnotmitt/[email protected]
with:
doxyfile-path: "./Doxyfile"
working-directory: "."

- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./documentation/html
58 changes: 58 additions & 0 deletions Doxyfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# Doxyfile configuration file
# Project name and version
PROJECT_NAME = "ApraPipes"
PROJECT_NUMBER = 1.0
# The directory where the documentation will be created
OUTPUT_DIRECTORY = ./documents
# The root directory of the source code
INPUT = ./base/include ./base/src ./data/gh-pages-assets/pages/index.md ./data/gh-pages-assets/pages/introduction.md ./data/gh-pages-assets/pages/Tutorial_Adding_New_Module.md ./data/gh-pages-assets/pages/CUDAKernelProgrammingGuide.md
# File patterns to include in the documentation
FILE_PATTERNS = *.h *.hpp *.c *.cpp *.md
# Exclude directories and files
EXCLUDE = *
# Recurse through subdirectories
RECURSIVE = YES
# Generate documentation for all entities
EXTRACT_ALL = YES
# Strip implementation details from documentation
EXTRACT_PRIVATE = YES
EXTRACT_STATIC = YES
HIDE_UNDOC_MEMBERS = YES
HIDE_UNDOC_CLASSES = YES
MARKDOWN_SUPPORT = YES
USE_MDFILE_AS_MAINPAGE = index.md
# Configuration options for HTML output
GENERATE_HTML = YES
HTML_OUTPUT = html
HTML_FILE_EXTENSION = .html
HTML_COLORSTYLE = LIGHT
HTML_COLORSTYLE_HUE = 77
HTML_COLORSTYLE_SAT = 147
HTML_COLORSTYLE_GAMMA = 115
HTML_TIMESTAMP = YES
HTML_FOOTER = data/gh-pages-assets/pages/footer.html
HTML_HEADER = data/gh-pages-assets/pages/logo.html

# Configuration options for LaTeX output
GENERATE_LATEX = NO
# Configuration options for Man pages (UNIX specific)
GENERATE_MAN = NO
LATEX_OUTPUT = latex
# Additional include paths
INCLUDE_PATH =
# Predefined macros
PREDEFINED =
# Enable collaboration diagram
HAVE_DOT = YES
UML_LOOK = YES
CALL_GRAPH = YES
CALLER_GRAPH = YES

IMAGE_PATH = data\gh-pages-assets\_images
HTML_EXTRA_STYLESHEET = data/gh-pages-assets/pages/custom.css
SHOW_NAMESPACES = NO
SHOW_FILES = NO
GENERATE_TREEVIEW = YES
DISABLE_INDEX = NO
HTML_EXTRA_FILES = data/gh-pages-assets/_images/apralogo.png
#$darkmode = YES
1 change: 1 addition & 0 deletions build_documentation.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
doxygen Doxyfile
3 changes: 3 additions & 0 deletions build_jetson.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
chmod +x build_scripts/build_dependencies_jetson_cuda.sh
./build_scripts/build_dependencies_jetson_cuda.sh

chmod +x build_documentation.sh
./build_documentation.sh

cd vcpkg
./bootstrap-vcpkg.sh
./vcpkg integrate install
Expand Down
3 changes: 3 additions & 0 deletions build_linux_cuda.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
chmod +x build_scripts/build_dependencies_linux_cuda.sh
./build_scripts/build_dependencies_linux_cuda.sh

chmod +x build_documentation.sh
./build_documentation.sh

cd vcpkg
./bootstrap-vcpkg.sh
vcpkg integrate install
Expand Down
3 changes: 3 additions & 0 deletions build_linux_no_cuda.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ chmod +x build_scripts/build_dependencies_linux_no_cuda.sh
chmod +x base/fix-vcpkg-json.sh
./base/fix-vcpkg-json.sh true false false

chmod +x build_documentation.sh
./build_documentation.sh

cd vcpkg
./bootstrap-vcpkg.sh
./vcpkg integrate install
Expand Down
2 changes: 1 addition & 1 deletion build_scripts/build_dependencies_jetson_cuda.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash

# List of required dependencies
dependencies=("git-lfs" "libncurses5-dev" "ninja-build" "nasm" "curl" "libudev-dev" "libssl-dev")
dependencies=("git-lfs" "libncurses5-dev" "ninja-build" "nasm" "curl" "libudev-dev" "libssl-dev" "doxygen" "graphviz")
yashrajsapra marked this conversation as resolved.
Show resolved Hide resolved

missing_dependencies=()

Expand Down
2 changes: 1 addition & 1 deletion build_scripts/build_dependencies_linux_cuda.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ dependencies=( "curl" "zip" "unzip" "tar" "autoconf" "automake" "autopoint" "bui
"flex" "git-core" "git-lfs" "libass-dev" "libfreetype6-dev" "libgnutls28-dev" "libmp3lame-dev"
"libsdl2-dev" "libssl-dev" "libtool" "libsoup-gnome2.4-dev" "libncurses5-dev" "libva-dev" "libvdpau-dev"
"libvorbis-dev" "libxcb1-dev" "libxdamage-dev" "libxcursor-dev" "libxinerama-dev" "libx11-dev" "libgles2-mesa-dev" "libxcb-shm0-dev" "libxcb-xfixes0-dev"
"ninja-build" "pkg-config" "texinfo" "wget" "yasm" "zlib1g-dev" "nasm" "gperf" "bison" "python3" "python3-pip")
"ninja-build" "pkg-config" "texinfo" "wget" "yasm" "zlib1g-dev" "nasm" "gperf" "bison" "python3" "python3-pip" "doxygen" "graphviz")

missing_dependencies=()

Expand Down
2 changes: 1 addition & 1 deletion build_scripts/build_dependencies_linux_no_cuda.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ dependencies=( "curl" "zip" "unzip" "tar" "autoconf" "automake" "autopoint" "bui
"flex" "git-core" "git-lfs" "libass-dev" "libfreetype6-dev" "libgnutls28-dev" "libmp3lame-dev"
"libsdl2-dev" "libssl-dev" "libtool" "libsoup-gnome2.4-dev" "libncurses5-dev" "libva-dev" "libvdpau-dev"
"libvorbis-dev" "libxcb1-dev" "libxdamage-dev" "libxcursor-dev" "libxinerama-dev" "libx11-dev" "libgles2-mesa-dev" "libxcb-shm0-dev" "libxcb-xfixes0-dev"
"ninja-build" "pkg-config" "texinfo" "wget" "yasm" "zlib1g-dev" "nasm" "gperf" "bison" "python3" "python3-pip")
"ninja-build" "pkg-config" "texinfo" "wget" "yasm" "zlib1g-dev" "nasm" "gperf" "bison" "python3" "python3-pip" "doxygen" "graphviz")

missing_dependencies=()

Expand Down
2 changes: 1 addition & 1 deletion build_scripts/build_dependencies_windows_cuda.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/in

# Enable feature and install dependencies
choco feature enable -n allowEmptyChecksums
choco install 7zip git python3 cmake pkgconfiglite -y
choco install 7zip git python3 cmake pkgconfiglite doxygen.portable graphviz -y

# Install required Python packages
pip3 install ninja
Expand Down
2 changes: 1 addition & 1 deletion build_scripts/build_dependencies_windows_no_cuda.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/in

# Enable feature and install dependencies
choco feature enable -n allowEmptyChecksums
choco install 7zip git python3 cmake pkgconfiglite -y
choco install 7zip git python3 cmake pkgconfiglite doxygen.portable graphviz -y

# Install required Python packages
pip3 install ninja
Expand Down
3 changes: 3 additions & 0 deletions build_windows_cuda.bat
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ cd %batdir%/build_scripts
powershell -nologo -executionpolicy bypass -File build_dependencies_windows_cuda.ps1
cd ..

@echo off
sh .\build_documentation.sh

@echo off
set batdir=%~dp0
cd %batdir%/vcpkg
Expand Down
3 changes: 3 additions & 0 deletions build_windows_no_cuda.bat
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ cd %batdir%/base
powershell -nologo -executionpolicy bypass -File fix-vcpkg-json.ps1 -removeCUDA
cd ..

@echo off
sh .\build_documentation.sh

cd vcpkg
call bootstrap-vcpkg.bat
vcpkg.exe integrate install
Expand Down
Binary file added data/gh-pages-assets/_images/Module.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added data/gh-pages-assets/_images/apralogo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
23 changes: 23 additions & 0 deletions data/gh-pages-assets/pages/CUDAKernelProgrammingGuide.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# CUDA Kernel Programming Guide

## Performance Guide
Very important and useful. Follow the [CUDA Documentation](https://docs.nvidia.com/cuda/cuda-c-best-practices-guide/index.html) instead of other sources.

### Coalesced Access to Global Memory
[Coalesced Access to Global Memory](https://docs.nvidia.com/cuda/cuda-c-best-practices-guide/index.html#coalesced-access-to-global-memory)
- Refer OverlayKernel.cu and EffectsKernel.cu
- uchar4 (4 bytes) - 32x32 threads per block - 4x32x32 - 4K bytes
- A big difference - like 2x in Performance

### Math Library
[NVIDIA CUDA Math API](https://docs.nvidia.com/cuda/cuda-math-api/index.html)
- multiplication use from here
- big difference

### _ _device_ _ functions
For writing clean/reusable code, I was using _ _device_ _ function - but the Performance dropped by half. So, I started using macros. I didn’t investigate more on why?

---

© Copyright 2020-2024, Apra Labs Inc.

Loading
Loading