Skip to content

Commit b0584d4

Browse files
committed
ruff check --fix
1 parent 3875efc commit b0584d4

13 files changed

Lines changed: 4 additions & 15 deletions

perf_test.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
"""Test WebGPU buffer creation overhead."""
22
import torch
3-
import torch_webgpu
43
import time
54

65
device = torch.device("webgpu")

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ dependencies = [
2727

2828
[project.optional-dependencies]
2929
docs = ["mkdocs", "mkdocs-material"]
30-
dev = ["pytest", "mkdocs", "mkdocs-material"]
30+
dev = ["pytest", "mkdocs", "mkdocs-material", "ruff"]
3131

3232
[project.urls]
3333
Homepage = "https://github.com/jmaczan/torch-webgpu"

python/torch_webgpu/compiler/low_ir.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
from .compiler_pass import CompilerPass
66
from .ir import IRNode
7-
from .high_ir import HighIRCreateTensor, HighIRNode, HighIROp, HighIRArange
7+
from .high_ir import HighIRCreateTensor, HighIRNode, HighIROp
88

99

1010
class LowIROp(StrEnum):

python/torch_webgpu/compiler/lowering.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from typing import Any, Callable, List
1+
from typing import Callable, List
22
from functools import partial
33
from .low_ir import (
44
LowIRCreateBuffer,
@@ -9,7 +9,6 @@
99
LowIRRunShader,
1010
LowIRWriteBuffer,
1111
)
12-
import torch_webgpu
1312
import torch
1413

1514
Runtime = dict

setup.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
import shutil
55
from pathlib import Path
66
from setuptools import setup, find_packages
7-
from setuptools.command.build_ext import build_ext as _build_ext
87
from torch.utils.cpp_extension import CppExtension, BuildExtension
98

109
# Try to load .env for local development
@@ -128,7 +127,7 @@ def run(self):
128127

129128
if system == "Linux":
130129
extra_compile_args = ["-std=c++17", "-O2"]
131-
extra_link_args = [f"-Wl,-rpath,$ORIGIN/libs"]
130+
extra_link_args = ["-Wl,-rpath,$ORIGIN/libs"]
132131
elif system == "Darwin":
133132
extra_compile_args = ["-std=c++17", "-O2"]
134133
extra_link_args = ["-Wl,-rpath,@loader_path/libs"]

tests/compile/test_compile_ops.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
"""Tests for torch.compile with webgpu backend on individual ops."""
22
import pytest
33
import torch
4-
import torch_webgpu
54
from torch_webgpu import webgpu_backend
65

76

tests/compile/test_high_ir.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
"""Tests for High IR op mappings and node creation."""
2-
import pytest
32
import torch
43
import torch.nn.functional as F
54
import operator

tests/compile/test_low_ir.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
"""Tests for Low IR op mappings."""
2-
import pytest
32

43
from torch_webgpu.compiler.high_ir import HighIROp
54
from torch_webgpu.compiler.low_ir import (

tests/test_compile_dev.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import torch
2-
import torch_webgpu
32
from torch_webgpu import webgpu_backend
43

54

tests/test_dev.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import torch
2-
import torch_webgpu
32
from torch_webgpu import webgpu_backend
43

54

0 commit comments

Comments
 (0)