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

Pre release refactorization #16

Merged
merged 12 commits into from
Sep 29, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
26 changes: 26 additions & 0 deletions .github/workflows/core_tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Core Tests.

on:
push:
branches: [master]
pull_request:
branches: [master]

permissions:
contents: read

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: Set up Python 3.8.12
uses: actions/setup-python@v4
with:
python-version: "3.8.12"
- name: Install dependencies
run: |
pip install isort==5.10.1 black[jupyter]==22.3.0
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this isort seems unnecessary? for black versioning it might also make sense to just put in the package dependencies (probably as extras)

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah i forget to remove isort (i used to also check isort).

The black version is now in the [dev] dependencies in setup.py

- name: Run Black Format Check
run: black . diff_rast/ tests/ examples/ --check
35 changes: 35 additions & 0 deletions .github/workflows/doc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Docs
on:
push:
branches: [main]
pull_request:
branches: [main]
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does this workflow work on PRs / branches? ( I guess similar question for the new nerfstudio docs workflow )

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It'll be triggered when there is PR or push to the main branch

Copy link
Collaborator Author

@liruilong940607 liruilong940607 Sep 29, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh i see your point -- if anyone wants to develop doc in a separate branch it won't be triggered. I feel like ppl should develop doc locally and only update gh-pages if it is ready to merge into main.

workflow_dispatch:

permissions:
contents: write
jobs:
docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v3
with:
python-version: '3.9'
- name: Install dependencies
run: |
pip install -r docs/requirements.txt
pip install torch==2.0.0 --index-url https://download.pytorch.org/whl/cpu
BUILD_NO_CUDA=1 pip install .
- name: Sphinx build
# fail on warnings: "-W --keep-going"
run: |
sphinx-build docs/source _build
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
publish_branch: gh-pages
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: _build/
force_orphan: true
# cname: ...
8 changes: 1 addition & 7 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -117,12 +117,6 @@ venv.bak/
# line_profiler
*.lprof

# vscode
.vsocde

*build
compile_commands.json

*.png
*.txt
*.dump
*.dump
6 changes: 3 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[submodule "csrc/third_party/glm"]
path = csrc/third_party/glm
url = https://github.com/g-truc/glm.git
[submodule "diff_rast/cuda/csrc/third_party/glm"]
path = diff_rast/cuda/csrc/third_party/glm
url = https://github.com/g-truc/glm.git
1 change: 1 addition & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
recursive-include dir-pattern diff_rast/cuda/csrc
26 changes: 13 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,25 @@

Our version of differentiable gaussian rasterizer

# ref_rast
# Installation

Copied official version of differentiable gaussian rasterizer
For CUDA development, it is recommend to install with `BUILD_NO_CUDA=1`, which
will disable compiling during pip install, and instead use JIT compiling on your
first run. The benefit of JIT compiling is that it does incremental compiling as
you modify your cuda code so it is much faster than re-compile through pip. Note
the JIT compiled library can be found under `~/.cache/torch_extensions/py*-cu*/`.

# Installation
```
BUILD_NO_CUDA=1 pip install -e .[dev]
```

If you won't touch the underlying CUDA code, you can just install with compiling:

```
python3 -m pip install --upgrade pip
cd diff_rast; pip install -e .
cd ../ref_rast; pip install -e .
pip install -e .[dev]
```


# Brief walkthrough

The main python bindings for rasterization are found by importing diff_rast
Expand All @@ -23,13 +30,6 @@ import diff_rast
help(diff_rast)
```

Additional supported cuda functions are found by importing cuda_lib

```
import cuda_lib
help(cuda_lib)
```

# clangd setup (for Neovim)

[clangd](https://clangd.llvm.org/) is a nice tool for providing completions,
Expand Down
Loading