35 Commits

Author SHA1 Message Date
Jeremy Reizenstein
4df110b0a9 remove fvcore dependency
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
2024-07-11 04:35:38 -07:00
Jeremy Reizenstein
28f914bf3b pytorch 2.1, drop mac builds
Summary: Build updates for PyTorch 2.1

Reviewed By: MichaelRamamonjisoa

Differential Revision: D50345762

fbshipit-source-id: 89bf4edf1c21566aa86a3abca9b4df7c4d1d17a2
2023-10-17 06:04:06 -07:00
Roman Shapovalov
32e1992924 SQL Index Dataset
Summary:
Moving SQL dataset to PyTorch3D. It has been extensively tested in pixar_replay.

It requires SQLAlchemy 2.0, which is not supported in fbcode. So I exclude the sources and tests that depend on it from buck TARGETS.

Reviewed By: bottler

Differential Revision: D45086611

fbshipit-source-id: 0285f03e5824c0478c70ad13731525bb5ec7deef
2023-04-25 09:56:15 -07:00
Krzysztof Chalupka
95771985b7 Make PyTorch3D C++17 incompatible again :(
Summary: D38919607 (c4545a7cbc) and D38858887 (06cbba2628) were premature, turns out CUDA 10.2 doesn't support C++17.

Reviewed By: bottler

Differential Revision: D39156205

fbshipit-source-id: 5e2e84cc4a57d1113a915166631651d438540d56
2022-08-31 02:38:31 -07:00
Jeremy Reizenstein
06cbba2628 Don't force C++14
Summary: Remove compiler arguments which insist on C++14.

Reviewed By: kjchalup

Differential Revision: D38858887

fbshipit-source-id: 542173ec97cacfa724d14c8a4b9ce9dc2457c5d5
2022-08-21 12:10:51 -07:00
Jeremy Reizenstein
0e913b1c2e PYTORCH3D_NO_EXTENSION
Summary:
Request in https://github.com/facebookresearch/pytorch3d/issues/1233 for option to disable CUDA build.

Also option to disable binary build completely. This could be useful e.g. in the config tutorial where we need a small python-only part of pytorch3d.

Reviewed By: kjchalup

Differential Revision: D38458624

fbshipit-source-id: 421a0b1cc31306d7e322d3e743e30a7533d7f034
2022-08-08 04:16:26 -07:00
Jeremy Reizenstein
9d888f1332 install trainer inside pytorch3d
Summary: One way to tidy the installation so we don't install files in site-packages/projects. Fixes https://github.com/facebookresearch/pytorch3d/issues/1279

Reviewed By: shapovalov, davnov134

Differential Revision: D38426772

fbshipit-source-id: ac1a54fbf230adb53904701e1f38bf9567f647ce
2022-08-05 02:49:42 -07:00
Jeremy Reizenstein
55f67b0d18 add accelerate dependency
Summary: Accelerate is an additional implicitron dependency, so document it.

Reviewed By: shapovalov

Differential Revision: D37786933

fbshipit-source-id: 11024fe604107881f8ca29e17cb5cbfe492fc7f9
2022-07-13 06:00:05 -07:00
Jeremy Reizenstein
cd7b885169 don't check black version
Summary: skip checking the version of black because `black --version` looks different in different versions.

Reviewed By: kjchalup

Differential Revision: D36441262

fbshipit-source-id: a2d9a5cad4f5433909fb85bc9a584e91a2b72601
2022-05-17 09:08:06 -07:00
John Reese
bef959c755 formatting changes from black 22.3.0
Summary:
Applies the black-fbsource codemod with the new build of pyfmt.

paintitblack

Reviewed By: lisroach

Differential Revision: D36324783

fbshipit-source-id: 280c09e88257e5e569ab729691165d8dedd767bc
2022-05-11 19:55:56 -07:00
Jeremy Reizenstein
9f443ed26b isort->usort
Summary: Move from isort to usort now that usort supports sorting within lines.

Reviewed By: patricklabatut

Differential Revision: D35893280

fbshipit-source-id: 621c1cd285199d785408504430ee0bdf8683b21e
2022-04-26 08:34:54 -07:00
Jeremy Reizenstein
41c594ca37 fix entry points in setup.py
Summary: For `pip install` without -e, we need to name the entry point functions in setup.py.

Reviewed By: patricklabatut

Differential Revision: D35933037

fbshipit-source-id: be15ae1a4bb7c5305ea2ba992d07f3279c452250
2022-04-26 07:59:15 -07:00
Tim Hatch
34bbb3ad32 apply import merging for fbcode/vision/fair (2 of 2)
Summary:
Applies new import merging and sorting from µsort v1.0.

When merging imports, µsort will make a best-effort to move associated
comments to match merged elements, but there are known limitations due to
the diynamic nature of Python and developer tooling. These changes should
not produce any dangerous runtime changes, but may require touch-ups to
satisfy linters and other tooling.

Note that µsort uses case-insensitive, lexicographical sorting, which
results in a different ordering compared to isort. This provides a more
consistent sorting order, matching the case-insensitive order used when
sorting import statements by module name, and ensures that "frog", "FROG",
and "Frog" always sort next to each other.

For details on µsort's sorting and merging semantics, see the user guide:
https://usort.readthedocs.io/en/stable/guide.html#sorting

Reviewed By: bottler

Differential Revision: D35553814

fbshipit-source-id: be49bdb6a4c25264ff8d4db3a601f18736d17be1
2022-04-13 06:51:33 -07:00
Jeremy Reizenstein
0c3bed55be setup.py for implicitron_trainer
Summary: Enable `pytorch3d_implicitron_runner` executable

Reviewed By: shapovalov

Differential Revision: D34754902

fbshipit-source-id: 213f3e9183e3f7dd7b4df16ad77d95fbc971d625
2022-03-28 04:50:26 -07:00
Jeremy Reizenstein
f2cf9d4d0b windows fix
Summary: Attempt to reduce nvcc trouble on windows by (1) avoiding flag for c++14 and (2) avoiding `torch/extension.h`, which introduces pybind11, in `.cu` files.

Reviewed By: patricklabatut

Differential Revision: D34969868

fbshipit-source-id: f3878d6a2ba9d644e87ae7b6377cb5008b4b6ce3
2022-03-24 06:52:05 -07:00
Jeremy Reizenstein
9eeb456e82 Update license for company name
Summary: Update all FB license strings to the new format.

Reviewed By: patricklabatut

Differential Revision: D33403538

fbshipit-source-id: 97a4596c5c888f3c54f44456dc07e718a387a02c
2022-01-04 11:43:38 -08:00
Jeremy Reizenstein
bbc12e70c4 Fix build for package_data
Summary: include_package_data does not work well in the presence of built extensions, and the OSS build hasn't been working for a few days since #593 was merged.

Reviewed By: patricklabatut

Differential Revision: D29302315

fbshipit-source-id: db7e46f8c4593743c3522087979592f9989c7c6b
2021-06-22 12:39:44 -07:00
Patrick Labatut
af93f34834 License lint codebase
Summary: License lint codebase

Reviewed By: theschnitz

Differential Revision: D29001799

fbshipit-source-id: 5c59869911785b0181b1663bbf430bc8b7fb2909
2021-06-22 03:45:27 -07:00
Talmaj Marinc
029a9da00b Fix ShapeNetDataset (#593)
Summary:
- Add MANIFEST.in and `include_package_data=True` to include dataset .json files in the installation
Fix https://github.com/facebookresearch/pytorch3d/issues/435
- Fix `load_textures=False` for ShapeNetDataset with a test
Fix https://github.com/facebookresearch/pytorch3d/issues/450, partly fix https://github.com/facebookresearch/pytorch3d/issues/444. I've set the textures to `None`, if they should be all white instead, let me know.

Pull Request resolved: https://github.com/facebookresearch/pytorch3d/pull/593

Reviewed By: patricklabatut

Differential Revision: D29116264

Pulled By: nikhilaravi

fbshipit-source-id: 1fb0198e616b7f834dfeaf7168bb5e6e530810d1
2021-06-18 07:02:20 -07:00
Jeremy Reizenstein
e0753f0b0d Build wheels for s3
Summary: For Linux, instead of uploading wheels to PyPI which will only work with one particular version of PyTorch and CUDA, from the next release we will store a range of built wheels on S3.

Reviewed By: nikhilaravi

Differential Revision: D26209398

fbshipit-source-id: 945a6907b78807e1eedb25007f87f90bbf59f80e
2021-02-05 05:52:36 -08:00
Jeremy Reizenstein
b24d89a283 Do not set ccbin in torch 1.7.x
Summary:
PyTorch versions 1.7.0 and 1.7.1 are between https://github.com/pytorch/pytorch/pull/43931 and https://github.com/pytorch/pytorch/pull/47404. In this gap, PyTorch always copies CC to nvcc_args, like PyTorch3D does. Newer nvcc versions are not happy with `-ccbin` being specified twice, even if it is specified twice the same. We update PyTorch3D so that it doesn't supply `-ccbin` in these cases.

Also tweak the detection of the current ccbin so that it is aware that `-ccbin foo` and `-ccbin=foo` are equivalent.

Reviewed By: theschnitz

Differential Revision: D25825468

fbshipit-source-id: b04e7718cf01820649518eedda99c399c732e8af
2021-01-11 15:49:55 -08:00
Jeremy Reizenstein
513a6476bc iopath dependency
Summary: Add ioPath as a dependency of PyTorch3D in preparation for using the new PathManager.

Reviewed By: nikhilaravi

Differential Revision: D25372971

fbshipit-source-id: d8aa661d2de975e747dd494edc42bf843990cf68
2020-12-24 10:16:03 -08:00
Jeremy Reizenstein
d220ee2f66 pulsar build and CI changes
Summary:
Changes to CI and some minor fixes now that pulsar is part of pytorch3d. Most significantly, add CUB to CI builds.

Make CUB_HOME override the CUB already in cudatoolkit (important for cuda11.0 which uses cub 1.9.9 which pulsar doesn't work well with.
Make imageio available for testing.
Lint fixes.
Fix some test verbosity.
Avoid use of atomicAdd_block on older GPUs.

Reviewed By: nikhilaravi, classner

Differential Revision: D24773716

fbshipit-source-id: 2428356bb2e62735f2bc0c15cbe4cff35b1b24b8
2020-11-10 09:38:05 -08:00
Christoph Lassner
039e02601d examples and docs.
Summary: This diff updates the documentation and tutorials with information about the new pulsar backend. 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.

Reviewed By: nikhilaravi

Differential Revision: D24498129

fbshipit-source-id: e312b0169a72b13590df6e4db36bfe6190d742f9
2020-11-03 13:06:35 -08:00
Christoph Lassner
960fd6d8b6 pulsar interface unification.
Summary:
This diff builds on top of the `pulsar integration` diff to provide a unified interface for the existing PyTorch3D point renderer and Pulsar. 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.

The unified interfaces are completely consistent. Switching the render backend is as easy as using `renderer = PulsarPointsRenderer(rasterizer=rasterizer).to(device)` instead of `renderer = PointsRenderer(rasterizer=rasterizer, compositor=compositor)` and adding the `gamma` parameter to the forward function. All PyTorch3D camera types are supported as far as possible; keyword arguments are properly forwarded to the camera. The `PerspectiveCamera` and `OrthographicCamera` require znear and zfar as additional parameters for the forward pass.

Reviewed By: nikhilaravi

Differential Revision: D21421443

fbshipit-source-id: 4aa0a83a419592d9a0bb5d62486a1cdea9d73ce6
2020-11-03 13:06:35 -08:00
Jeremy Reizenstein
686c8666d3 version 0.2.0
Summary: Update version number for version 0.2.0.

Reviewed By: nikhilaravi

Differential Revision: D21157358

fbshipit-source-id: 32a5b93e5dc65a31a806a5ce7231f8603fe02e85
2020-04-26 07:18:57 -07:00
Jeremy Reizenstein
232e4a7e3d Driver update for ci, easier diagnosing
Summary: Bump the nvidia driver used in the conda tests. Add an environment variable (unused) to allow building without ninja. Print relative error on assertClose failure.

Reviewed By: nikhilaravi

Differential Revision: D21227373

fbshipit-source-id: 5dd8eb097151da27d3632daa755a1e7b9ac97845
2020-04-25 16:03:42 -07:00
Patrick Labatut
d57daa6f85 Address black + isort fbsource linter warnings
Summary: Address black + isort fbsource linter warnings from D20558374 (previous diff)

Reviewed By: nikhilaravi

Differential Revision: D20558373

fbshipit-source-id: d3607de4a01fb24c0d5269634563a7914bddf1c8
2020-03-29 14:51:02 -07:00
Patrick Labatut
25d2e2c8b7 Use a consistent case for PyTorch3D
Summary: Use a consistent case for PyTorch3D (matching the logo...): replace all occurrences of PyTorch3d with PyTorch3D across the codebase (including documentation and notebooks)

Reviewed By: wanyenlo, gkioxari

Differential Revision: D20427546

fbshipit-source-id: 8c7697f51434c51e99b7fe271935932c72a1d9b9
2020-03-17 12:48:43 -07:00
Jeremy Reizenstein
4d3c886677 Version number in one place in the code.
Summary:
This isn't the whole task, but it gets the version number into far fewer places.

The doc / website are separate.

Reviewed By: nikhilaravi

Differential Revision: D20426113

fbshipit-source-id: 5810d1eca58b443fcd5f46991dc2f0f26adedbd8
2020-03-13 04:40:20 -07:00
Patrick Labatut
3c71ab64cc Remove shebang line when not strictly required
Summary: The shebang line `#!<path to interpreter>` is only required for Python scripts, so remove it on source files for class or function definitions. Additionally explicitly mark as executable the actual Python scripts in the codebase.

Reviewed By: nikhilaravi

Differential Revision: D20095778

fbshipit-source-id: d312599fba485e978a243292f88a180d71e1b55a
2020-03-12 10:39:44 -07:00
Jeremy Reizenstein
cf8e667b61 version 0.1.1
Summary: Bumping the version number to 0.1.1 and thereby documenting all the places where the version number currently appears in the code.

Reviewed By: nikhilaravi

Differential Revision: D20067382

fbshipit-source-id: 76a25ed1d4036f51357e4ae3e0f07de32ad114ae
2020-03-07 12:42:43 -08:00
Jeremy Reizenstein
4233c32887 cpu wheel builds for linux and mac
Reviewed By: nikhilaravi

Differential Revision: D20073426

fbshipit-source-id: fce83c9b63d630de1e6ebe2ff4790f29d11b65cc
2020-02-24 13:38:09 -08:00
Jeremy Reizenstein
244b7eb80e allow packaging tools to override CUDA settings
Summary: This makes sure circle ci builds work with cuda even on machines with no gpu.

Reviewed By: gkioxari

Differential Revision: D19543957

fbshipit-source-id: 9cbfcd4fca22ebe89434ffa71c25d75dd18d2eb6
2020-01-27 06:19:53 -08:00
facebook-github-bot
dbf06b504b Initial commit
fbshipit-source-id: ad58e416e3ceeca85fae0583308968d04e78fe0d
2020-01-23 11:53:46 -08:00