Closed rschireman closed 2 years ago
Running python3 tests/test_cuaev.py fails when using pytorch nightly with the error:
python3 tests/test_cuaev.py
TypeError: make_tensor() missing 2 required keyword-only arguments: 'dtype' and 'device'
This is due to the stable pytorch (1.11.0) defining the make_tensor function as:
make_tensor
def make_tensor( shape: Union[torch.Size, List[int], Tuple[int, ...]], device: Union[str, torch.device], dtype: torch.dtype, *, low: Optional[float] = None, high: Optional[float] = None, requires_grad: bool = False, noncontiguous: bool = False, exclude_zero: bool = False ) -> torch.Tensor:
while the nightly pytorch build switches the position of the device and dtype parameters:
device
dtype
def make_tensor( *shape: Union[int, torch.Size, List[int], Tuple[int, ...]], dtype: torch.dtype, device: Union[str, torch.device], low: Optional[float] = None, high: Optional[float] = None, requires_grad: bool = False, noncontiguous: bool = False, exclude_zero: bool = False ) -> torch.Tensor:
Running
python3 tests/test_cuaev.py
fails when using pytorch nightly with the error:TypeError: make_tensor() missing 2 required keyword-only arguments: 'dtype' and 'device'
This is due to the stable pytorch (1.11.0) defining the
make_tensor
function as:def make_tensor( shape: Union[torch.Size, List[int], Tuple[int, ...]], device: Union[str, torch.device], dtype: torch.dtype, *, low: Optional[float] = None, high: Optional[float] = None, requires_grad: bool = False, noncontiguous: bool = False, exclude_zero: bool = False ) -> torch.Tensor:
while the nightly pytorch build switches the position of the
device
anddtype
parameters:def make_tensor( *shape: Union[int, torch.Size, List[int], Tuple[int, ...]], dtype: torch.dtype, device: Union[str, torch.device], low: Optional[float] = None, high: Optional[float] = None, requires_grad: bool = False, noncontiguous: bool = False, exclude_zero: bool = False ) -> torch.Tensor: