multigpu mesh rendering fixes

Summary:
Small fix and updated tests for multigpu rendering case.

This resolves the issue seen in: https://github.com/facebookresearch/pytorch3d/issues/401

Reviewed By: gkioxari

Differential Revision: D24314681

fbshipit-source-id: 84c5a5359844c77518b48044001daa9a86f3c43a
This commit is contained in:
Nikhila Ravi
2020-10-16 09:00:08 -07:00
committed by Facebook GitHub Bot
parent 4d52f9fb8b
commit 563d441b00
3 changed files with 162 additions and 66 deletions

View File

@@ -8,9 +8,10 @@ from typing import Any, Union
import numpy as np
import torch
import torch.nn as nn
class TensorAccessor(object):
class TensorAccessor(nn.Module):
"""
A helper class to be used with the __getitem__ method. This can be used for
getting/setting the values for an attribute of a class at one particular
@@ -82,7 +83,7 @@ class TensorAccessor(object):
BROADCAST_TYPES = (float, int, list, tuple, torch.Tensor, np.ndarray)
class TensorProperties(object):
class TensorProperties(nn.Module):
"""
A mix-in class for storing tensors as properties with helper methods.
"""