Describe the Bug
The pytorch-efficiency-lints option does not appear to do anything.
pyrefly.toml:
preset = "strict"
pytorch-efficiency-lints = true
errors = {
pytorch-efficiency-lint-cuda-call = "error",
pytorch-efficiency-lint-item-call = "error",
pytorch-efficiency-lint-print-tensor = "error",
pytorch-efficiency-lint-redundant-to-call = "error",
}
example.py:
import torch
def f(x: torch.Tensor) -> None:
y = x.cuda()
v = x.item()
print(x)
device = torch.device("cuda")
w = torch.zeros(3, 4).to(device)
Running the following produces no errors.
$ pyrefly check --config pyrefly.toml example.py
INFO 0 errors
I also tried through CLI to see if it's a config issue:
$ pyrefly check --preset all --pytorch-efficiency-lints true --error pytorch-efficiency-lint-cuda-call example.py
INFO 0 errors
Apologies if I'm doing something wrong. How do I enable these checks?
Sandbox Link
No sandbox due to torch requirement.
(Only applicable for extension issues) IDE Information
No response
Describe the Bug
The
pytorch-efficiency-lintsoption does not appear to do anything.pyrefly.toml:example.py:Running the following produces no errors.
I also tried through CLI to see if it's a config issue:
Apologies if I'm doing something wrong. How do I enable these checks?
Sandbox Link
No sandbox due to torch requirement.
(Only applicable for extension issues) IDE Information
No response