Skip to content

Commit 3fe33f3

Browse files
committed
Formatted with black.
1 parent 8481684 commit 3fe33f3

File tree

2 files changed

+19
-3
lines changed

2 files changed

+19
-3
lines changed

kernel_tuner/runners/runner.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,14 @@
33

44
from abc import ABC, abstractmethod
55

6+
67
class Runner(ABC):
78
"""Base class for kernel_tuner runners"""
9+
810
@abstractmethod
9-
def __init__(self, kernel_source, kernel_options, device_options, iterations, observers):
11+
def __init__(
12+
self, kernel_source, kernel_options, device_options, iterations, observers
13+
):
1014
pass
1115

1216
@abstractmethod

test/test_backend.py

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,19 @@
11
import pytest
22

33
import kernel_tuner
4-
from .context import skip_if_no_gcc, skip_if_no_cupy, skip_if_no_cuda, skip_if_no_opencl, skip_if_no_pycuda
4+
from .context import (
5+
skip_if_no_gcc,
6+
skip_if_no_cupy,
7+
skip_if_no_cuda,
8+
skip_if_no_opencl,
9+
skip_if_no_pycuda,
10+
)
511
from kernel_tuner.backends import backend, c, cupy, nvcuda, opencl, pycuda
612

713

814
class WrongBackend(backend.Backend):
915
"""This is a not compliant backend"""
16+
1017
pass
1118

1219

@@ -17,22 +24,27 @@ def test_wrong_backend():
1724
except TypeError:
1825
assert True
1926

27+
2028
@skip_if_no_gcc
2129
def test_c_backend():
2230
dev = c.CFunctions()
2331

32+
2433
@skip_if_no_cupy
2534
def test_cupy_backend():
2635
dev = cupy.CupyFunctions()
2736

37+
2838
@skip_if_no_cuda
2939
def test_cuda_backend():
3040
dev = nvcuda.CudaFunctions()
3141

42+
3243
@skip_if_no_opencl
3344
def test_opencl_backend():
3445
dev = opencl.OpenCLFunctions()
3546

47+
3648
@skip_if_no_pycuda
3749
def test_pycuda_backend():
38-
dev = pycuda.PyCudaFunctions()
50+
dev = pycuda.PyCudaFunctions()

0 commit comments

Comments
 (0)