Summary:
I could not access https://github.com/NVlabs/cub/issues/172 to understand whether IntWrapper was still necessary but the comment is from 5 years ago and causes problems for the ROCm build.
Pull Request resolved: https://github.com/facebookresearch/pytorch3d/pull/1964
Reviewed By: MichaelRamamonjisoa
Differential Revision: D71937895
Pulled By: bottler
fbshipit-source-id: 5e0351e1bd8599b670436cd3464796eca33156f6
Summary:
CUDA kernel variables matching the type `(thread|block|grid).(Idx|Dim).(x|y|z)` [have the data type `uint`](https://docs.nvidia.com/cuda/cuda-c-programming-guide/#built-in-variables).
Many programmers mistakenly use implicit casts to turn these data types into `int`. In fact, the [CUDA Programming Guide](https://docs.nvidia.com/cuda/cuda-c-programming-guide/) it self is inconsistent and incorrect in its use of data types in programming examples.
The result of these implicit casts is that our kernels may give unexpected results when exposed to large datasets, i.e., those exceeding >~2B items.
While we now have linters in place to prevent simple mistakes (D71236150), our codebase has many problematic instances. This diff fixes some of them.
Reviewed By: dtolnay
Differential Revision: D71355356
fbshipit-source-id: cea44891416d9efd2f466d6c45df4e36008fa036
Summary:
A continuation of https://github.com/facebookresearch/pytorch3d/issues/1948 -- this commit fixes a small numerical issue with `matrix_to_axis_angle(..., fast=True)` near `pi`.
bottler feel free to check this out, it's a single-line change.
Pull Request resolved: https://github.com/facebookresearch/pytorch3d/pull/1953
Reviewed By: MichaelRamamonjisoa
Differential Revision: D70088251
Pulled By: bottler
fbshipit-source-id: 54cc7f946283db700cec2cd5575cf918456b7f32
Summary:
Remove headers flagged by facebook-unused-include-check over fbcode.vision.
+ format and autodeps
This is a codemod. It was automatically generated and will be landed once it is approved and tests are passing in sandcastle.
You have been added as a reviewer by Sentinel or Butterfly.
Autodiff project: uiv
Autodiff partition: fbcode.vision
Autodiff bookmark: ad.uiv.fbcode.vision
Reviewed By: dtolnay
Differential Revision: D70403619
fbshipit-source-id: d109c15774eeb3d809875f75fa2a26ed20d7f9a6
Summary:
This is an extension of https://github.com/facebookresearch/pytorch3d/issues/1544 with various speed, stability, and readability improvements. (I could not find a way to make a commit to the existing PR). This PR is still based on the [Rodrigues' rotation formula](https://en.wikipedia.org/wiki/Rotation_formalisms_in_three_dimensions#Rotation_matrix_%E2%86%94_Euler_axis/angle).
The motivation is the same; this change speeds up the conversions up to 10x, depending on the device, batch size, etc.
### Notes
- As the angles get very close to `π`, the existing implementation and the proposed one start to differ. However, (my understanding is that) this is not a problem as the axis can not be stably inferred from the rotation matrix in this case in general.
- bottler , I tried to follow similar conventions as existing functions to deal with weird angles, let me know if something needs to be changed to merge this.
Pull Request resolved: https://github.com/facebookresearch/pytorch3d/pull/1948
Reviewed By: MichaelRamamonjisoa
Differential Revision: D69193009
Pulled By: bottler
fbshipit-source-id: e5ed34b45b625114ec4419bb89e22a6aefad4eeb
Summary:
This is a somewhat not BC change: some None paths will be replaced by metadata paths, even when they were not used for data loading.
Moreover, removing the legacy fix to the paths in the old CO3D release.
Reviewed By: bottler
Differential Revision: D69048238
fbshipit-source-id: 2a8b26d7b9f5e2adf39c65888b5863a5a9de1996
Summary: Update Pytorch3D to be able to run assetgen (see later diffs in the stack)
Reviewed By: shapovalov
Differential Revision: D65942513
fbshipit-source-id: 1d01141c9f7e106608fa591be6e0d3262cb5944f
Summary: We did not often extend sequence-level metadata but now for applications like text-to-3D/video, we need to store captions and similar.
Reviewed By: bottler
Differential Revision: D68269926
fbshipit-source-id: f8af308adce51863d719a335d85cd2558943bd4c
Summary:
It is often easier to store the mask together with RGB, especially for renders. The logic in this diff:
* if load_mask and mask_path provided, take the mask from mask_path,
* otherwise, check if the image has the alpha channel and take it as a mask.
Reviewed By: antoinetlc
Differential Revision: D68160212
fbshipit-source-id: d9b6779f90027a4987ba96800983f441edff9c74
Summary: This function makes it easier to extend FrameData class with new channels; brushing it up a bit.
Reviewed By: bottler
Differential Revision: D67816470
fbshipit-source-id: 6575415c864d0f539e283889760cd2331bf226a7
Summary: Now that we have SQLAlchemy 2.0, we can fully use them.
Reviewed By: bottler
Differential Revision: D66920096
fbshipit-source-id: 25c0ea1c4f7361e66348035519627dc961b9e6e6
Summary:
Converts the directory specified to use the Ruff formatter in pyfmt
ruff_dog
If this diff causes merge conflicts when rebasing, please run
`hg status -n -0 --change . -I '**/*.{py,pyi}' | xargs -0 arc pyfmt`
on your diff, and amend any changes before rebasing onto latest.
That should help reduce or eliminate any merge conflicts.
allow-large-files
Reviewed By: bottler
Differential Revision: D66472063
fbshipit-source-id: 35841cb397e4f8e066e2159550d2f56b403b1bef
Summary:
- Hipified Pytorch Pulsar
- Created separate target for Pulsar tests and enabled RE testing
- Pytorch3D full test suite requires additional work like fixing EGL
dependencies on AMD
Reviewed By: danzimm
Differential Revision: D61339912
fbshipit-source-id: 0d10bc966e4de4a959f3834a386bad24e449dc1f
Summary: `c10::optional` is an alias for `std::optional`. Let's remove the alias and use the real thing.
Reviewed By: meyering
Differential Revision: D63402341
fbshipit-source-id: 241383e7ca4b2f3f1f9cac3af083056123dfd02b
Summary: `c10::optional` is an alias for `std::optional`. Let's remove the alias and use the real thing.
Reviewed By: palmje
Differential Revision: D63409387
fbshipit-source-id: fb6db59a14db9e897e2e6b6ad378f33bf2af86e8
Summary: these are failing in ci
Reviewed By: das-intensity
Differential Revision: D62594666
fbshipit-source-id: 5e3a7441be2978803dc2d3e361365e0fffa7ad3b
Summary:
Make the negative index actually not an error
fixes https://github.com/facebookresearch/pytorch3d/issues/1368
Reviewed By: das-intensity
Differential Revision: D62177991
fbshipit-source-id: e5ed433bde1f54251c4d4b6db073c029cbe87343
Summary:
Apparently pytorch 2.4 is now supported as per [this closed issue](https://github.com/facebookresearch/pytorch3d/issues/1863).
Added the `2.4.0` & `2.4.1` versions to `regenerate.py` then ran that as per the `README_fb.md` which generated `config.yml` changes.
Reviewed By: bottler
Differential Revision: D62517831
fbshipit-source-id: 002e276dfe2fa078136ff2f6c747d937abbadd1a
Summary:
X-link: https://github.com/pytorch/pytorch/pull/133343
X-link: https://github.com/fairinternal/pytorch3d/pull/45
Pull Request resolved: https://github.com/facebookresearch/pytorch3d/pull/1851
Enables pytorch3d to build on AMD. An important part of enabling this was not compiling the Pulsar backend when the target is AMD. There are simply too many kernel incompatibilites to make it work (I tried haha). Fortunately, it doesnt seem like most modern applications of pytorch3d rely on Pulsar. We should be able to unlock most of pytorch3d's goodness on AMD without it.
Reviewed By: bottler, houseroad
Differential Revision: D61171993
fbshipit-source-id: fd4aee378a3568b22676c5bf2b727c135ff710af
Summary: To avoid the installation instructions for PyTorch3D becoming out-of-date, instead of specifying certain Python versions, update to just `Python`. Reader will understand it has to be a Python version compatible with GitHub.
Reviewed By: bottler
Differential Revision: D60919848
fbshipit-source-id: 5e974970a0db3d3d32fae44e5dd30cbc1ce237a9
Summary:
* Adds a "max" option for the point_reduction input to the
chamfer_distance function.
* When combining the x and y directions, maxes the losses instead
of summing them when point_reduction="max".
* Moves batch reduction to happen after the directions are
combined.
* Adds test_chamfer_point_reduction_max and
test_single_directional_chamfer_point_reduction_max tests.
Fixes https://github.com/facebookresearch/pytorch3d/issues/1838
Reviewed By: bottler
Differential Revision: D60614661
fbshipit-source-id: 7879816acfda03e945bada951b931d2c522756eb
Summary: This diff is fixing a backwards compatibility issue in PyTorch3D's dataset API. The code ensures that the `crop_bbox_xywh` attribute is set when box_crop flag is on. This is an implementation detail that people should not really use, however some people depend on this behaviour.
Reviewed By: bottler
Differential Revision: D59777449
fbshipit-source-id: b875e9eb909038b8629ccdade87661bb2c39d529
Summary: This is not actually needed and is causing a conda-forge confusion to do with python_abi - which needs users to have `-c conda-forge` when they install pytorch3d.
Reviewed By: patricklabatut
Differential Revision: D59587930
fbshipit-source-id: 961ae13a62e1b2b2ce6d8781db38bd97eca69e65