Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix tests on macOS ARM #305

Merged
merged 1 commit into from
Mar 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion test/ops/test_index_sort.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

@pytest.mark.parametrize('device', DEVICES)
def test_index_sort(device):
inputs = torch.randint(low=0, high=1024, size=(1000000, ), device=device)
inputs = torch.randperm(100_000, device=device)
ref_sorted_input, ref_indices = torch.sort(inputs, stable=True)
sorted_input, indices = pyg_lib.ops.index_sort(inputs)
assert torch.all(ref_sorted_input == sorted_input)
Expand Down
2 changes: 1 addition & 1 deletion test/ops/test_matmul.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ def test_grouped_matmul_autograd(dtype, transposed, device):
for i in range(len(outs)):
assert outs[i].size() == (inputs[i].size(0), others[i].size(-1))
expected = inputs[i] @ others[i] + biases[i]
assert torch.allclose(outs[i], expected, atol=1e-6)
assert torch.allclose(outs[i], expected, atol=1e-4)

sum([out.sum() for out in outs]).backward()
for i in range(len(outs)):
Expand Down
Loading