blob: 641940eb3a229e31002aae5053e97a54460ad2f2 [file] [log] [blame]
# shape: torch.Size([])
# nnz: 2
# sparse_dim: 0
# indices shape: torch.Size([0, 2])
# values shape: torch.Size([2])
########## torch.int32 ##########
# sparse tensor
tensor(indices=tensor([], size=(0, 2)),
values=tensor([0, 1]),
device='cuda:0', size=(), nnz=2, dtype=torch.int32,
layout=torch.sparse_coo)
# _indices
tensor([], device='cuda:0', size=(0, 2), dtype=torch.int64)
# _values
tensor([0, 1], device='cuda:0', dtype=torch.int32)
########## torch.float32 ##########
# sparse tensor
tensor(indices=tensor([], size=(0, 2)),
values=tensor([0., 1.]),
device='cuda:0', size=(), nnz=2, dtype=torch.float32,
layout=torch.sparse_coo)
# after requires_grad_
tensor(indices=tensor([], size=(0, 2)),
values=tensor([0., 1.]),
device='cuda:0', size=(), nnz=2, dtype=torch.float32,
layout=torch.sparse_coo, requires_grad=True)
# after addition
tensor(indices=tensor([], size=(0, 1)),
values=tensor([2.]),
device='cuda:0', size=(), nnz=1, dtype=torch.float32,
layout=torch.sparse_coo, grad_fn=<AddBackward0>)
# _indices
tensor([], device='cuda:0', size=(0, 2), dtype=torch.int64)
# _values
tensor([0., 1.], device='cuda:0', dtype=torch.float32)
# shape: torch.Size([0])
# nnz: 10
# sparse_dim: 0
# indices shape: torch.Size([0, 10])
# values shape: torch.Size([10, 0])
########## torch.int32 ##########
# sparse tensor
tensor(indices=tensor([], size=(0, 10)),
values=tensor([], size=(10, 0)),
device='cuda:0', size=(0,), nnz=10, dtype=torch.int32,
layout=torch.sparse_coo)
# _indices
tensor([], device='cuda:0', size=(0, 10), dtype=torch.int64)
# _values
tensor([], device='cuda:0', size=(10, 0), dtype=torch.int32)
########## torch.float32 ##########
# sparse tensor
tensor(indices=tensor([], size=(0, 10)),
values=tensor([], size=(10, 0)),
device='cuda:0', size=(0,), nnz=10, dtype=torch.float32,
layout=torch.sparse_coo)
# after requires_grad_
tensor(indices=tensor([], size=(0, 10)),
values=tensor([], size=(10, 0)),
device='cuda:0', size=(0,), nnz=10, dtype=torch.float32,
layout=torch.sparse_coo, requires_grad=True)
# after addition
tensor(indices=tensor([], size=(0, 1)),
values=tensor([], size=(1, 0)),
device='cuda:0', size=(0,), nnz=1, dtype=torch.float32,
layout=torch.sparse_coo, grad_fn=<AddBackward0>)
# _indices
tensor([], device='cuda:0', size=(0, 10), dtype=torch.int64)
# _values
tensor([], device='cuda:0', size=(10, 0), dtype=torch.float32)
# shape: torch.Size([2])
# nnz: 3
# sparse_dim: 0
# indices shape: torch.Size([0, 3])
# values shape: torch.Size([3, 2])
########## torch.int32 ##########
# sparse tensor
tensor(indices=tensor([], size=(0, 3)),
values=tensor([[0, 0],
[0, 1],
[1, 1]]),
device='cuda:0', size=(2,), nnz=3, dtype=torch.int32,
layout=torch.sparse_coo)
# _indices
tensor([], device='cuda:0', size=(0, 3), dtype=torch.int64)
# _values
tensor([[0, 0],
[0, 1],
[1, 1]], device='cuda:0', dtype=torch.int32)
########## torch.float32 ##########
# sparse tensor
tensor(indices=tensor([], size=(0, 3)),
values=tensor([[0.0000, 0.3333],
[0.6667, 1.0000],
[1.3333, 1.6667]]),
device='cuda:0', size=(2,), nnz=3, dtype=torch.float32,
layout=torch.sparse_coo)
# after requires_grad_
tensor(indices=tensor([], size=(0, 3)),
values=tensor([[0.0000, 0.3333],
[0.6667, 1.0000],
[1.3333, 1.6667]]),
device='cuda:0', size=(2,), nnz=3, dtype=torch.float32,
layout=torch.sparse_coo, requires_grad=True)
# after addition
tensor(indices=tensor([], size=(0, 1)),
values=tensor([[4.0000, 6.0000]]),
device='cuda:0', size=(2,), nnz=1, dtype=torch.float32,
layout=torch.sparse_coo, grad_fn=<AddBackward0>)
# _indices
tensor([], device='cuda:0', size=(0, 3), dtype=torch.int64)
# _values
tensor([[0.0000, 0.3333],
[0.6667, 1.0000],
[1.3333, 1.6667]], device='cuda:0', dtype=torch.float32)
# shape: torch.Size([100, 3])
# nnz: 3
# sparse_dim: 1
# indices shape: torch.Size([1, 3])
# values shape: torch.Size([3, 3])
########## torch.int32 ##########
# sparse tensor
tensor(indices=tensor([[0, 1, 2]]),
values=tensor([[0, 0, 0],
[0, 0, 1],
[1, 1, 1]]),
device='cuda:0', size=(100, 3), nnz=3, dtype=torch.int32,
layout=torch.sparse_coo)
# _indices
tensor([[0, 1, 2]], device='cuda:0')
# _values
tensor([[0, 0, 0],
[0, 0, 1],
[1, 1, 1]], device='cuda:0', dtype=torch.int32)
########## torch.float32 ##########
# sparse tensor
tensor(indices=tensor([[0, 1, 2]]),
values=tensor([[0.0000, 0.2222, 0.4444],
[0.6667, 0.8889, 1.1111],
[1.3333, 1.5556, 1.7778]]),
device='cuda:0', size=(100, 3), nnz=3, dtype=torch.float32,
layout=torch.sparse_coo)
# after requires_grad_
tensor(indices=tensor([[0, 1, 2]]),
values=tensor([[0.0000, 0.2222, 0.4444],
[0.6667, 0.8889, 1.1111],
[1.3333, 1.5556, 1.7778]]),
device='cuda:0', size=(100, 3), nnz=3, dtype=torch.float32,
layout=torch.sparse_coo, requires_grad=True)
# after addition
tensor(indices=tensor([[0, 1, 2, 0, 1, 2]]),
values=tensor([[0.0000, 0.2222, 0.4444],
[0.6667, 0.8889, 1.1111],
[1.3333, 1.5556, 1.7778],
[0.0000, 0.2222, 0.4444],
[0.6667, 0.8889, 1.1111],
[1.3333, 1.5556, 1.7778]]),
device='cuda:0', size=(100, 3), nnz=6, dtype=torch.float32,
layout=torch.sparse_coo, grad_fn=<AddBackward0>)
# _indices
tensor([[0, 1, 2]], device='cuda:0')
# _values
tensor([[0.0000, 0.2222, 0.4444],
[0.6667, 0.8889, 1.1111],
[1.3333, 1.5556, 1.7778]], device='cuda:0', dtype=torch.float32)
# shape: torch.Size([100, 20, 3])
# nnz: 0
# sparse_dim: 2
# indices shape: torch.Size([2, 0])
# values shape: torch.Size([0, 3])
########## torch.int32 ##########
# sparse tensor
tensor(indices=tensor([], size=(2, 0)),
values=tensor([], size=(0, 3)),
device='cuda:0', size=(100, 20, 3), nnz=0, dtype=torch.int32,
layout=torch.sparse_coo)
# _indices
tensor([], device='cuda:0', size=(2, 0), dtype=torch.int64)
# _values
tensor([], device='cuda:0', size=(0, 3), dtype=torch.int32)
########## torch.float32 ##########
# sparse tensor
tensor(indices=tensor([], size=(2, 0)),
values=tensor([], size=(0, 3)),
device='cuda:0', size=(100, 20, 3), nnz=0, dtype=torch.float32,
layout=torch.sparse_coo)
# after requires_grad_
tensor(indices=tensor([], size=(2, 0)),
values=tensor([], size=(0, 3)),
device='cuda:0', size=(100, 20, 3), nnz=0, dtype=torch.float32,
layout=torch.sparse_coo, requires_grad=True)
# after addition
tensor(indices=tensor([], size=(2, 0)),
values=tensor([], size=(0, 3)),
device='cuda:0', size=(100, 20, 3), nnz=0, dtype=torch.float32,
layout=torch.sparse_coo, grad_fn=<AddBackward0>)
# _indices
tensor([], device='cuda:0', size=(2, 0), dtype=torch.int64)
# _values
tensor([], device='cuda:0', size=(0, 3), dtype=torch.float32)
# shape: torch.Size([10, 0, 3])
# nnz: 3
# sparse_dim: 0
# indices shape: torch.Size([0, 3])
# values shape: torch.Size([3, 10, 0, 3])
########## torch.int32 ##########
# sparse tensor
tensor(indices=tensor([], size=(0, 3)),
values=tensor([], size=(3, 10, 0, 3)),
device='cuda:0', size=(10, 0, 3), nnz=3, dtype=torch.int32,
layout=torch.sparse_coo)
# _indices
tensor([], device='cuda:0', size=(0, 3), dtype=torch.int64)
# _values
tensor([], device='cuda:0', size=(3, 10, 0, 3), dtype=torch.int32)
########## torch.float32 ##########
# sparse tensor
tensor(indices=tensor([], size=(0, 3)),
values=tensor([], size=(3, 10, 0, 3)),
device='cuda:0', size=(10, 0, 3), nnz=3, dtype=torch.float32,
layout=torch.sparse_coo)
# after requires_grad_
tensor(indices=tensor([], size=(0, 3)),
values=tensor([], size=(3, 10, 0, 3)),
device='cuda:0', size=(10, 0, 3), nnz=3, dtype=torch.float32,
layout=torch.sparse_coo, requires_grad=True)
# after addition
tensor(indices=tensor([], size=(0, 1)),
values=tensor([], size=(1, 10, 0, 3)),
device='cuda:0', size=(10, 0, 3), nnz=1, dtype=torch.float32,
layout=torch.sparse_coo, grad_fn=<AddBackward0>)
# _indices
tensor([], device='cuda:0', size=(0, 3), dtype=torch.int64)
# _values
tensor([], device='cuda:0', size=(3, 10, 0, 3), dtype=torch.float32)
# shape: torch.Size([10, 0, 3])
# nnz: 0
# sparse_dim: 0
# indices shape: torch.Size([0, 0])
# values shape: torch.Size([0, 10, 0, 3])
########## torch.int32 ##########
# sparse tensor
tensor(indices=tensor([], size=(0, 0)),
values=tensor([], size=(0, 10, 0, 3)),
device='cuda:0', size=(10, 0, 3), nnz=0, dtype=torch.int32,
layout=torch.sparse_coo)
# _indices
tensor([], device='cuda:0', size=(0, 0), dtype=torch.int64)
# _values
tensor([], device='cuda:0', size=(0, 10, 0, 3), dtype=torch.int32)
########## torch.float32 ##########
# sparse tensor
tensor(indices=tensor([], size=(0, 0)),
values=tensor([], size=(0, 10, 0, 3)),
device='cuda:0', size=(10, 0, 3), nnz=0, dtype=torch.float32,
layout=torch.sparse_coo)
# after requires_grad_
tensor(indices=tensor([], size=(0, 0)),
values=tensor([], size=(0, 10, 0, 3)),
device='cuda:0', size=(10, 0, 3), nnz=0, dtype=torch.float32,
layout=torch.sparse_coo, requires_grad=True)
# after addition
tensor(indices=tensor([], size=(0, 0)),
values=tensor([], size=(0, 10, 0, 3)),
device='cuda:0', size=(10, 0, 3), nnz=0, dtype=torch.float32,
layout=torch.sparse_coo, grad_fn=<AddBackward0>)
# _indices
tensor([], device='cuda:0', size=(0, 0), dtype=torch.int64)
# _values
tensor([], device='cuda:0', size=(0, 10, 0, 3), dtype=torch.float32)