Skip to content

Commit

Permalink
reapply fix (#598)
Browse files Browse the repository at this point in the history
Signed-off-by: Clement Fuji Tsang <cfujitsang@nvidia.com>
  • Loading branch information
Caenorst committed Jul 27, 2022
1 parent cfe08db commit 72d0e9c
Show file tree
Hide file tree
Showing 9 changed files with 142 additions and 492 deletions.
2 changes: 1 addition & 1 deletion ci/gitlab_jenkins_templates/core_ci.jenkins
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ node {
configName,
baseImageTag,
config['archsToTest']
)
)
}

for (config in ubuntu_cpuonly_configs) {
Expand Down
201 changes: 97 additions & 104 deletions ci/gitlab_jenkins_templates/ubuntu_test_CI.jenkins
Original file line number Diff line number Diff line change
Expand Up @@ -28,124 +28,117 @@ spec:
node(POD_LABEL) {
container("docker") {
timeout(time: 25, unit: 'MINUTES') {
gitlabCommitStatus("test-${configName}-${arch}") {
stage("Install deps") {
sh 'pip install -r /kaolin/tools/ci_requirements.txt'
sh 'apt update && apt install -y unzip && unzip /kaolin/examples/samples/rendered_clock.zip -d /kaolin/examples/samples/'
updateGitlabCommitStatus(name: "test-${configName}-${arch}", state: "running")
stage("Install deps") {
sh 'pip install -r /kaolin/tools/ci_requirements.txt'
sh 'apt update && apt install -y unzip && unzip /kaolin/examples/samples/rendered_clock.zip -d /kaolin/examples/samples/'
}
def build_passed = true
try {
stage('Disp info') {
sh 'nvidia-smi'
sh 'python --version'
}
def build_passed = true
try {
stage('Disp info') {
sh 'nvidia-smi'
sh 'python --version'
}
} catch(e) {
build_passed = false
echo e.toString()
} catch(e) {
build_passed = false
echo e.toString()
}
try {
stage("Pytest") {
sh '''
export KAOLIN_TEST_NVIDIFFRAST=1
pytest -s --cov=/kaolin/kaolin /kaolin/tests/python/kaolin
'''
}
try {
stage("Pytest") {
} catch(e) {
build_passed = false
echo e.toString()
}
try {
if (arch == "TITAN_RTX") {
stage("Doc examples") {
// using wheel you don't have /kaolin/kaolin
sh '''
export KAOLIN_TEST_NVIDIFFRAST=1
pytest -s --cov=/kaolin/kaolin /kaolin/tests/python/kaolin
if [ -f "/kaolin/kaolin" ]; then
pytest --doctest-modules --ignore=/kaolin/kaolin/experimental /kaolin/kaolin
fi
'''
}
} catch(e) {
build_passed = false
echo e.toString()
}
try {
if (arch == "TITAN_RTX") {
stage("Doc examples") {
// using wheel you don't have /kaolin/kaolin
sh '''
if [ -f "/kaolin/kaolin" ]; then
pytest --doctest-modules --ignore=/kaolin/kaolin/experimental /kaolin/kaolin
fi
'''
}
}
} catch(e) {
build_passed = false
echo e.toString()
}
try {
stage("DIB-R Tutorial") {
sh 'cd /kaolin/examples/tutorial && ipython dibr_tutorial.ipynb'
}
} catch(e) {
build_passed = false
echo e.toString()
}
try {
stage("DMTet Tutorial") {
sh 'cd /kaolin/examples/tutorial && ipython dmtet_tutorial.ipynb'
}
} catch(e) {
build_passed = false
echo e.toString()
}
try {
stage("Understanding SPCs Tutorial") {
sh 'cd /kaolin/examples/tutorial && ipython understanding_spcs_tutorial.ipynb'
}
} catch(e) {
build_passed = false
echo e.toString()
} catch(e) {
build_passed = false
echo e.toString()
}
try {
stage("DIB-R Tutorial") {
sh 'cd /kaolin/examples/tutorial && ipython dibr_tutorial.ipynb'
}
try {
stage("SPC from Pointcloud Recipe") {
sh 'cd /kaolin/examples/recipes/dataload/ && python spc_from_pointcloud.py'
}
} catch(e) {
build_passed = false
echo e.toString()
} catch(e) {
build_passed = false
echo e.toString()
}
try {
stage("DMTet Tutorial") {
sh 'cd /kaolin/examples/tutorial && ipython dmtet_tutorial.ipynb'
}
try {
stage("SPC Basics Recipe") {
sh 'cd /kaolin/examples/recipes/spc/ && python spc_basics.py'
}
} catch(e) {
build_passed = false
echo e.toString()
} catch(e) {
build_passed = false
echo e.toString()
}
try {
stage("Understanding SPCs Tutorial") {
sh 'cd /kaolin/examples/tutorial && ipython understanding_spcs_tutorial.ipynb'
}
try {
stage("Occupancy Sampling Recipe") {
sh 'cd /kaolin/examples/recipes/preprocess/ && python occupancy_sampling.py'
}
} catch(e) {
build_passed = false
echo e.toString()
} catch(e) {
build_passed = false
echo e.toString()
}
try {
stage("SPC from Pointcloud Recipe") {
sh 'cd /kaolin/examples/recipes/dataload/ && python spc_from_pointcloud.py'
}
try {
stage("SPC Dual Octree Recipe") {
sh 'cd /kaolin/examples/recipes/spc/ && python spc_dual_octree.py'
}
} catch(e) {
build_passed = false
echo e.toString()
} catch(e) {
build_passed = false
echo e.toString()
}
try {
stage("SPC Basics Recipe") {
sh 'cd /kaolin/examples/recipes/spc/ && python spc_basics.py'
}
try {
stage("SPC Trilinear Interpolation Recipe") {
sh 'cd /kaolin/examples/recipes/spc/ && python spc_trilinear_interp.py'
}
} catch(e) {
build_passed = false
echo e.toString()
} catch(e) {
build_passed = false
echo e.toString()
}
try {
stage("Occupancy Sampling Recipe") {
sh 'cd /kaolin/examples/recipes/preprocess/ && python occupancy_sampling.py'
}
try {
stage("SPC Batching Recipe") {
sh 'cd /kaolin/examples/recipes/spc/ && python spc_batching.py'
}
} catch(e) {
build_passed = false
echo e.toString()
} catch(e) {
build_passed = false
echo e.toString()
}
try {
stage("SPC Dual Octree Recipe") {
sh 'cd /kaolin/examples/recipes/spc/ && python spc_dual_octree.py'
}
if (build_passed) {
currentBuild.result = "SUCCESS"
} else {
currentBuild.result = "FAILURE"
} catch(e) {
build_passed = false
echo e.toString()
}
try {
stage("SPC Trilinear Interpolation Recipe") {
sh 'cd /kaolin/examples/recipes/spc/ && python spc_trilinear_interp.py'
}
} catch(e) {
build_passed = false
echo e.toString()
}
if (build_passed) {
currentBuild.result = "SUCCESS"
updateGitlabCommitStatus(name: "test-${configName}-${arch}", state: "success")
} else {
currentBuild.result = "FAILURE"
updateGitlabCommitStatus(name: "test-${configName}-${arch}", state: "failed")
}
}
}
Expand Down
1 change: 0 additions & 1 deletion docs/notes/tutorial_index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ Simple Recipes
* `spc_basics.py <https://github.com/NVIDIAGameWorks/kaolin/blob/master/examples/recipes/spc/spc_basics.py>`_: showing attributes of an SPC object
* `spc_dual_octree.py <https://github.com/NVIDIAGameWorks/kaolin/blob/master/examples/recipes/spc/spc_dual_octree.py>`_: computing and explaining the dual of an SPC octree
* `spc_trilinear_interp.py <https://github.com/NVIDIAGameWorks/kaolin/blob/master/examples/recipes/spc/spc_trilinear_interp.py>`_: computing trilinear interpolation of a point cloud on an SPC
* `spc_batching.py <https://github.com/NVIDIAGameWorks/kaolin/blob/master/examples/recipes/spc/spc_batching.py>`_: using SPC objects with unbatched ops in kaolin
* Visualization:
* `visualize_main.py <https://github.com/NVIDIAGameWorks/kaolin/blob/master/examples/tutorial/visualize_main.py>`_: using Timelapse API to write mock 3D checkpoints

63 changes: 0 additions & 63 deletions examples/recipes/spc/spc_batching.py

This file was deleted.

12 changes: 6 additions & 6 deletions kaolin/ops/spc/spc.py
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ def unbatched_query(octree, exsum, query_coords, level, with_parents=False):
octree (torch.ByteTensor): The octree, of shape :math:`(\text{num_bytes})`.
exsum (torch.IntTensor): The exclusive sum of the octree bytes,
of shape :math:`(\text{num_bytes} + 1)`.
See :ref:`spc_pyramids` for more details.
See :ref:`spc_exsum` for more details.
query_coords (torch.FloatTensor or torch.IntTensor):
A tensor of locations to sample of shape :math:`(\text{num_query}, 3)`. If the tensor is
a FloatTensor, assumes the coordinates are normalized in [-1, 1]. Otherwise if the tensor is
Expand Down Expand Up @@ -303,7 +303,7 @@ def unbatched_get_level_points(point_hierarchy, pyramid, level):
The point hierarchy of shape :math:`(\text{num_points}, 3)`.
See :ref:`point_hierarchies <spc_points>` for a detailed description.
pyramid (torch.LongTensor):
pyramid (torch.IntTensor):
The pyramid of shape :math:`(2, \text{max_level}+2)`
See :ref:`pyramids <spc_pyramids>` for a detailed description.
Expand All @@ -329,12 +329,12 @@ def unbatched_make_dual(point_hierarchy, pyramid):
The point hierarchy of shape :math:`(\text{num_points}, 3)`.
See :ref:`point_hierarchies <spc_points>` for a detailed description.
pyramid (torch.LongTensor):
pyramid (torch.IntTensor):
The pyramid of shape :math:`(2, \text{max_level}+2)`
See :ref:`pyramids <spc_pyramids>` for a detailed description.
Returns:
(torch.ShortTensor, torch.LongTensor):
(torch.ShortTensor, torch.IntTensor):
- The point hierarchy of the dual octree of shape :math:`(\text{num_dual_points}, 3)`.
- The dual pyramid of shape :math:`(2, \text{max_level}+2)`
Expand Down Expand Up @@ -402,10 +402,10 @@ def unbatched_make_trinkets(point_hierarchy, pyramid, point_hierarchy_dual, pyra
Args:
point_hierarchy (torch.ShortTensor): The point hierarchy of shape :math:`(\text{num_points}, 3)`.
pyramid (torch.LongTensor): The pyramid of shape :math:`(2, \text{max_level}+2)`
pyramid (torch.IntTensor): The pyramid of shape :math:`(2, \text{max_level}+2)`
point_hierarchy_dual (torch.ShortTensor): The point hierarchy of the dual octree of shape
:math:`(\text{num_dual_points}, 3)`.
pyramid_dual (torch.LongTensor): The dual pyramid of shape :math:`(2, \text{max_level}+2)`
pyramid_dual (torch.IntTensor): The dual pyramid of shape :math:`(2, \text{max_level}+2)`
Returns:
(torch.IntTensor, torch.IntTensor):
Expand Down

0 comments on commit 72d0e9c

Please sign in to comment.