pytorch_cluster icon indicating copy to clipboard operation
pytorch_cluster copied to clipboard

warning when work with torch.compile

Open heyfavour opened this issue 1 year ago • 2 comments

[2023-11-30 18:31:43,775] torch._dynamo.convert_frame: [WARNING] WON'T CONVERT /miniconda3/envs/venv/lib/python3.11/site-packages/torch_cluster/radius.py line 69 [2023-11-30 18:31:43,775] torch._dynamo.convert_frame: [WARNING] due to: [2023-11-30 18:31:43,775] torch._dynamo.convert_frame: [WARNING] Traceback (most recent call last): [2023-11-30 18:31:43,775] torch._dynamo.convert_frame: [WARNING] File "/miniconda3/envs/venv/lib/python3.11/site-packages/torch/_ops.py", line 692, in call [2023-11-30 18:31:43,775] torch._dynamo.convert_frame: [WARNING] return self._op(args, **kwargs or {}) [2023-11-30 18:31:43,775] torch._dynamo.convert_frame: [WARNING] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [2023-11-30 18:31:43,775] torch._dynamo.convert_frame: [WARNING] torch._dynamo.exc.TorchRuntimeError: Failed running call_function torch_cluster.radius((FakeTensor(..., device='cuda:1', size=(207249, 3)), FakeTensor(..., device='cuda:1', size=(3769, 3)), FakeTensor(..., device='cuda:1', size=(257,), dtype=torch.int64), FakeTensor(..., device='cuda:1', size=(257,), dtype=torch.int64), 6, 1024, 1), **{}): [2023-11-30 18:31:43,775] torch._dynamo.convert_frame: [WARNING] The tensor has a non-zero number of elements, but its data is not allocated yet. Caffe2 uses a lazy allocation, so you will need to call mutable_data() or raw_mutable_data() to actually allocate memory. [2023-11-30 18:31:43,775] torch._dynamo.convert_frame: [WARNING] [2023-11-30 18:31:43,775] torch._dynamo.convert_frame: [WARNING] from user code: [2023-11-30 18:31:43,775] torch._dynamo.convert_frame: [WARNING] File "/home12/wangzx/miniconda3/envs/venv/lib/python3.11/site-packages/torch_cluster/radius.py", line 82, in [2023-11-30 18:31:43,775] torch._dynamo.convert_frame: [WARNING] return torch.ops.torch_cluster.radius(x, y, ptr_x, ptr_y, r, [2023-11-30 18:31:43,775] torch._dynamo.convert_frame: [WARNING] [2023-11-30 18:31:43,775] torch._dynamo.convert_frame: [WARNING] Set TORCH_LOGS="+dynamo" and TORCHDYNAMO_VERBOSE=1 for more information

heyfavour avatar Nov 30 '23 10:11 heyfavour

Currently, any CPP/CUDA extension is not compatible with torch.compile. I am sorry :(

rusty1s avatar Dec 02 '23 11:12 rusty1s

Is it still the case?

borisfom avatar Mar 19 '24 05:03 borisfom