Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions docs/doc_sources/conf.py.in
Original file line number Diff line number Diff line change
Expand Up @@ -134,14 +134,14 @@ if generate_multiversion == "ON":
try:
html_context
except NameError:
html_context = dict()
html_context = {}
html_context["display_lower_left"] = True
templates_path = ["_templates"]
html_context["current_version"] = release
html_context["version"] = version

# POPULATE LINKS TO OTHER VERSIONS
html_context["versions"] = list()
html_context["versions"] = []

# Populate the list of documented versions from the doc_versions.txt
versions = []
Expand Down
2 changes: 1 addition & 1 deletion dpctl/_sycl_device.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -1210,7 +1210,7 @@ cdef class SyclDevice(_SyclDevice):
sg_sizes = DPCTLDevice_GetSubGroupSizes(
self._device_ref, &sg_sizes_len)
if (sg_sizes is not NULL and sg_sizes_len > 0):
res = list()
res = []
for i in range(sg_sizes_len):
res.append(sg_sizes[i])
DPCTLSize_t_Array_Delete(sg_sizes)
Expand Down
2 changes: 1 addition & 1 deletion dpctl/_sycl_device_factory.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -416,7 +416,7 @@ cdef class _DefaultDeviceCache:
cdef dict __device_map__

def __cinit__(self):
self.__device_map__ = dict()
self.__device_map__ = {}

cdef get_or_create(self):
"""Return instance of SyclDevice and indicator if cache
Expand Down
2 changes: 1 addition & 1 deletion dpctl/_sycl_queue_manager.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ cdef class _DeviceDefaultQueueCache:
cdef dict __device_queue_map__

def __cinit__(self):
self.__device_queue_map__ = dict()
self.__device_queue_map__ = {}

def get_or_create(self, key):
"""Return instance of SyclQueue and indicator if cache
Expand Down
2 changes: 1 addition & 1 deletion dpctl/_sycl_timer.py
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ def __init__(
self.queue = None
self.host_times = []
self.bracketing_events = []
self._context_data = list()
self._context_data = []
if device_timer is None:
device_timer = "queue_barrier"
if device_timer == "queue_barrier":
Expand Down
2 changes: 1 addition & 1 deletion dpctl/tests/helper/_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ def create_invalid_capsule():
return ctor(id(ctor), b"invalid", 0)


def get_queue_or_skip(args=tuple()):
def get_queue_or_skip(args=()):
try:
q = dpctl.SyclQueue(*args)
except dpctl.SyclQueueCreationError:
Expand Down
2 changes: 1 addition & 1 deletion dpctl/tests/test_sycl_device.py
Original file line number Diff line number Diff line change
Expand Up @@ -405,7 +405,7 @@ def test_peer_device_arg_validation(method):
dev = dpctl.SyclDevice()
except dpctl.SyclDeviceCreationError:
pytest.skip("No default device available")
bad_dev = dict()
bad_dev = {}
callable = getattr(dev, method)
with pytest.raises(TypeError):
callable(bad_dev)
Expand Down
2 changes: 1 addition & 1 deletion dpctl/tests/test_sycl_event.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ def test_create_event_from_capsule():

def test_invalid_constructor_arg():
with pytest.raises(TypeError):
dpctl.SyclEvent(list())
dpctl.SyclEvent([])


def test_wait_with_event():
Expand Down
10 changes: 5 additions & 5 deletions dpctl/tests/test_sycl_queue.py
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ def test_queue_invalid_property():
with pytest.raises(ValueError):
dpctl.SyclQueue(property=4.5)
with pytest.raises(ValueError):
dpctl.SyclQueue(property=["abc", tuple()])
dpctl.SyclQueue(property=["abc", ()])


def test_queue_capsule():
Expand Down Expand Up @@ -345,13 +345,13 @@ def test_queue_memops():
q.prefetch(m1, 512)
q.mem_advise(m1, 512, 0)
with pytest.raises(TypeError):
q.memcpy(m1, list(), 512)
q.memcpy(m1, [], 512)
with pytest.raises(TypeError):
q.memcpy(list(), m2, 512)
q.memcpy([], m2, 512)
with pytest.raises(TypeError):
q.prefetch(list(), 512)
q.prefetch([], 512)
with pytest.raises(TypeError):
q.mem_advise(list(), 512, 0)
q.mem_advise([], 512, 0)


@pytest.fixture(scope="session")
Expand Down
4 changes: 2 additions & 2 deletions dpctl/tests/test_sycl_usm.py
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ def test_usm_type_exceptions():
with pytest.raises(TypeError):
m.get_usm_type(syclobj=Ellipsis)
with pytest.raises(TypeError):
m.get_usm_type_enum(syclobj=list())
m.get_usm_type_enum(syclobj=[])


def test_sycl_usm_array_interface(memory_ctor):
Expand Down Expand Up @@ -419,7 +419,7 @@ def invalid_version(suai_iface):
# data validation
def invalid_data(suai_iface):
"Set data to invalid"
suai_iface["data"] = tuple()
suai_iface["data"] = ()
return suai_iface

v = View(
Expand Down
2 changes: 1 addition & 1 deletion dpctl/tests/test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ def test_intel_device_info():


def test_intel_device_info_validation():
invalid_device = dict()
invalid_device = {}
with pytest.raises(TypeError):
dpctl.utils.intel_device_info(invalid_device)

Expand Down
2 changes: 1 addition & 1 deletion dpctl/utils/_intel_device_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ def intel_device_info(dev, /):
if mbw:
res["memory_bus_width"] = mbw
return res
return dict()
return {}


__all__ = [
Expand Down
Loading