Skip to content

Commit cec6c99

Browse files
committed
Fix compilation error
1 parent 1713540 commit cec6c99

2 files changed

Lines changed: 2 additions & 17 deletions

File tree

test/test_knn.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@
1616
HAS_CUDA = torch.cuda.is_available()
1717
HAS_TRITON = importlib.util.find_spec('triton') is not None
1818

19+
torch._dynamo.config.capture_scalar_outputs = True
20+
1921

2022
def to_set(edge_index):
2123
return set([(i, j) for i, j in edge_index.t().tolist()])

torch_cluster/triton/_kernels.py

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,6 @@
55
import triton.language as tl
66

77

8-
def _prune_knn_configs(configs, args, **kwargs):
9-
k_pad = int(args.get("K", 0))
10-
pruned = []
11-
for cfg in configs:
12-
block_n = cfg.kwargs.get("BLOCK_N", 0)
13-
if block_n < k_pad:
14-
continue
15-
pruned.append(cfg)
16-
return pruned
17-
18-
198
@triton.autotune(
209
configs=[
2110
triton.Config({'BLOCK_M': 32, 'BLOCK_N': 32, 'BLOCK_K': 16},
@@ -250,11 +239,6 @@ def _nearest_kernel(
250239
num_warps=2,
251240
num_stages=3,
252241
),
253-
triton.Config(
254-
{'BLOCK_N': 32, 'BLOCK_D': 16},
255-
num_warps=2,
256-
num_stages=4,
257-
),
258242
triton.Config(
259243
{'BLOCK_N': 32, 'BLOCK_D': 32},
260244
num_warps=2,
@@ -287,7 +271,6 @@ def _nearest_kernel(
287271
),
288272
],
289273
key=['D', 'MAX_CAND'],
290-
prune_configs_by={'early_config_prune': _prune_knn_configs},
291274
)
292275
@triton.heuristics({
293276
'NUM_D_BLOCKS': lambda args: triton.cdiv(args['D'], args['BLOCK_D']),

0 commit comments

Comments
 (0)