1. 03 Nov, 2020 1 commit
    • Christoph Lassner's avatar
      pulsar integration. · b19fe1de
      Christoph Lassner authored
      Summary:
      This diff integrates the pulsar renderer source code into PyTorch3D as an alternative backend for the PyTorch3D point renderer. This diff is the first of a series of three diffs to complete that migration and focuses on the packaging and integration of the source code.
      
      For more information about the pulsar backend, see the release notes and the paper (https://arxiv.org/abs/2004.07484). For information on how to use the backend, see the point cloud rendering notebook and the examples in the folder `docs/examples`.
      
      Tasks addressed in the following diffs:
      * Add the PyTorch3D interface,
      * Add notebook examples and documentation (or adapt the existing ones to feature both interfaces).
      
      Reviewed By: nikhilaravi
      
      Differential Revision: D23947736
      
      fbshipit-source-id: a5e77b53e6750334db22aefa89b4c079cda1b443
      b19fe1de
  2. 15 Apr, 2020 1 commit
    • Georgia Gkioxari's avatar
      knn autograd · b2b0c5a4
      Georgia Gkioxari authored
      Summary:
      Adds knn backward to return `grad_pts1` and `grad_pts2`. Adds `knn_gather` to return the nearest neighbors in pts2.
      
      The BM tests include backward pass and are ran on an M40.
      ```
      Benchmark                               Avg Time(μs)      Peak Time(μs) Iterations
      --------------------------------------------------------------------------------
      KNN_SQUARE_32_256_128_3_24_cpu              39558           43485             13
      KNN_SQUARE_32_256_128_3_24_cuda:0            1080            1404            463
      KNN_SQUARE_32_256_512_3_24_cpu              81950           85781              7
      KNN_SQUARE_32_256_512_3_24_cuda:0            1519            1641            330
      --------------------------------------------------------------------------------
      
      Benchmark                               Avg Time(μs)      Peak Time(μs) Iterations
      --------------------------------------------------------------------------------
      KNN_RAGGED_32_256_128_3_24_cpu              13798           14650             37
      KNN_RAGGED_32_256_128_3_24_cuda:0            1576            1713            318
      KNN_RAGGED_32_256_512_3_24_cpu              31255           32210             16
      KNN_RAGGED_32_256_512_3_24_cuda:0            2024            2162            248
      --------------------------------------------------------------------------------
      ```
      
      Reviewed By: jcjohnson
      
      Differential Revision: D20945556
      
      fbshipit-source-id: a16f616029c6b5f8c2afceb5f2bc12c5c20d2f3c
      b2b0c5a4
  3. 07 Apr, 2020 1 commit
    • Jeremy Reizenstein's avatar
      heterogenous KNN · 01b5f7b2
      Jeremy Reizenstein authored
      Summary: Interface and working implementation of ragged KNN. Benchmarks (which aren't ragged) haven't slowed. New benchmark shows that ragged is faster than non-ragged of the same shape.
      
      Reviewed By: jcjohnson
      
      Differential Revision: D20696507
      
      fbshipit-source-id: 21b80f71343a3475c8d3ee0ce2680f92f0fae4de
      01b5f7b2
  4. 29 Mar, 2020 2 commits
    • Patrick Labatut's avatar
      Address black + isort fbsource linter warnings · d57daa6f
      Patrick Labatut authored
      Summary: Address black + isort fbsource linter warnings from D20558374 (previous diff)
      
      Reviewed By: nikhilaravi
      
      Differential Revision: D20558373
      
      fbshipit-source-id: d3607de4a01fb24c0d5269634563a7914bddf1c8
      d57daa6f
    • Jeremy Reizenstein's avatar
      Linter, deprecated type() · 37c5c8e0
      Jeremy Reizenstein authored
      Summary: Run linter after recent changes. Fix long comment in knn.h which clang-format has reflowed badly. Add crude test that code doesn't call deprecated `.type()` or `.data()`.
      
      Reviewed By: nikhilaravi
      
      Differential Revision: D20692935
      
      fbshipit-source-id: 28ce0308adae79a870cb41a810b7cf8744f41ab8
      37c5c8e0
  5. 26 Mar, 2020 1 commit
    • Justin Johnson's avatar
      Implement K-Nearest Neighbors · 870290df
      Justin Johnson authored
      Summary:
      Implements K-Nearest Neighbors with C++ and CUDA versions.
      
      KNN in CUDA is highly nontrivial. I've implemented a few different versions of the kernel, and we heuristically dispatch to different kernels based on the problem size. Some of the kernels rely on template specialization on either D or K, so we use template metaprogramming to compile specialized versions for ranges of D and K.
      
      These kernels are up to 3x faster than our existing 1-nearest-neighbor kernels, so we should also consider swapping out `nn_points_idx` to use these kernels in the backend.
      
      I've been working mostly on the CUDA kernels, and haven't converged on the correct Python API.
      
      I still want to benchmark against FAISS to see how far away we are from their performance.
      
      Reviewed By: bottler
      
      Differential Revision: D19729286
      
      fbshipit-source-id: 608ffbb7030c21fe4008f330522f4890f0c3c21a
      870290df