From 601233d93acd5301c7d61b972dd8869f9f061f9e Mon Sep 17 00:00:00 2001 From: Diptorup Deb Date: Fri, 9 Oct 2020 18:22:50 -0500 Subject: [PATCH 1/3] Rename all pxd and pyx filenames to start with _ --- dpctl/{backend.pxd => _backend.pxd} | 0 dpctl/_memory.pxd | 2 +- dpctl/_memory.pyx | 2 +- dpctl/_sycl_core.pxd | 2 +- dpctl/{sycl_core.pyx => _sycl_core.pyx} | 2 +- setup.py | 3 ++- 6 files changed, 6 insertions(+), 5 deletions(-) rename dpctl/{backend.pxd => _backend.pxd} (100%) rename dpctl/{sycl_core.pyx => _sycl_core.pyx} (99%) diff --git a/dpctl/backend.pxd b/dpctl/_backend.pxd similarity index 100% rename from dpctl/backend.pxd rename to dpctl/_backend.pxd diff --git a/dpctl/_memory.pxd b/dpctl/_memory.pxd index 3c868125ca..2ab5066c8d 100644 --- a/dpctl/_memory.pxd +++ b/dpctl/_memory.pxd @@ -21,7 +21,7 @@ # distutils: language = c++ # cython: language_level=3 -from .backend cimport DPPLSyclUSMRef +from ._backend cimport DPPLSyclUSMRef from ._sycl_core cimport SyclQueue diff --git a/dpctl/_memory.pyx b/dpctl/_memory.pyx index 1671d3bb7c..96259b0451 100644 --- a/dpctl/_memory.pyx +++ b/dpctl/_memory.pyx @@ -29,7 +29,7 @@ # cython: language_level=3 import dpctl -from dpctl.backend cimport * +from dpctl._backend cimport * from ._sycl_core cimport SyclContext, SyclQueue from cpython cimport Py_buffer diff --git a/dpctl/_sycl_core.pxd b/dpctl/_sycl_core.pxd index a95e5f28c5..9543d07ca5 100644 --- a/dpctl/_sycl_core.pxd +++ b/dpctl/_sycl_core.pxd @@ -27,7 +27,7 @@ # distutils: language = c++ # cython: language_level=3 -from .backend cimport * +from ._backend cimport * cdef class SyclContext: diff --git a/dpctl/sycl_core.pyx b/dpctl/_sycl_core.pyx similarity index 99% rename from dpctl/sycl_core.pyx rename to dpctl/_sycl_core.pyx index e22e8377fa..d8db5e5914 100644 --- a/dpctl/sycl_core.pyx +++ b/dpctl/_sycl_core.pyx @@ -29,7 +29,7 @@ from __future__ import print_function from enum import Enum, auto import logging -from .backend cimport * +from ._backend cimport * from ._memory cimport Memory from libc.stdlib cimport malloc, free diff --git a/setup.py b/setup.py index d424ff632a..0f98cdded1 100644 --- a/setup.py +++ b/setup.py @@ -116,7 +116,8 @@ def extensions(): } extensions = [ - Extension('dpctl._sycl_core', [os.path.join('dpctl', 'sycl_core.pyx'),], + Extension('dpctl._sycl_core', + [os.path.join('dpctl', '_sycl_core.pyx'),], **extension_args), Extension('dpctl._memory', [os.path.join('dpctl', '_memory.pyx'),], **extension_args), From 3385a1acc95942bfab114239b695ba090a9a8f18 Mon Sep 17 00:00:00 2001 From: Diptorup Deb Date: Wed, 21 Oct 2020 09:51:30 -0500 Subject: [PATCH 2/3] Rebased on top of master. --- dpctl/{backend.pxd => _backend.pxd} | 0 dpctl/_memory.pxd | 2 +- dpctl/_memory.pyx | 2 +- dpctl/_sycl_core.pxd | 2 +- dpctl/{sycl_core.pyx => _sycl_core.pyx} | 2 +- 5 files changed, 4 insertions(+), 4 deletions(-) rename dpctl/{backend.pxd => _backend.pxd} (100%) rename dpctl/{sycl_core.pyx => _sycl_core.pyx} (99%) diff --git a/dpctl/backend.pxd b/dpctl/_backend.pxd similarity index 100% rename from dpctl/backend.pxd rename to dpctl/_backend.pxd diff --git a/dpctl/_memory.pxd b/dpctl/_memory.pxd index 3c868125ca..2ab5066c8d 100644 --- a/dpctl/_memory.pxd +++ b/dpctl/_memory.pxd @@ -21,7 +21,7 @@ # distutils: language = c++ # cython: language_level=3 -from .backend cimport DPPLSyclUSMRef +from ._backend cimport DPPLSyclUSMRef from ._sycl_core cimport SyclQueue diff --git a/dpctl/_memory.pyx b/dpctl/_memory.pyx index 1671d3bb7c..96259b0451 100644 --- a/dpctl/_memory.pyx +++ b/dpctl/_memory.pyx @@ -29,7 +29,7 @@ # cython: language_level=3 import dpctl -from dpctl.backend cimport * +from dpctl._backend cimport * from ._sycl_core cimport SyclContext, SyclQueue from cpython cimport Py_buffer diff --git a/dpctl/_sycl_core.pxd b/dpctl/_sycl_core.pxd index 2d7fbc01fa..7ecf1adbb4 100644 --- a/dpctl/_sycl_core.pxd +++ b/dpctl/_sycl_core.pxd @@ -27,7 +27,7 @@ # distutils: language = c++ # cython: language_level=3 -from .backend cimport * +from ._backend cimport * cdef class SyclContext: diff --git a/dpctl/sycl_core.pyx b/dpctl/_sycl_core.pyx similarity index 99% rename from dpctl/sycl_core.pyx rename to dpctl/_sycl_core.pyx index c9524a1d29..cc5b928f1f 100644 --- a/dpctl/sycl_core.pyx +++ b/dpctl/_sycl_core.pyx @@ -29,7 +29,7 @@ from __future__ import print_function from enum import Enum, auto import logging -from .backend cimport * +from ._backend cimport * from ._memory cimport Memory from libc.stdlib cimport malloc, free From 27f705556629f83f267a47a1be1b5433ade2f7b5 Mon Sep 17 00:00:00 2001 From: Diptorup Deb Date: Wed, 21 Oct 2020 22:31:39 -0500 Subject: [PATCH 3/3] fix typo. --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 4fac02c671..a9de5932d1 100644 --- a/setup.py +++ b/setup.py @@ -132,7 +132,7 @@ def extensions(): Extension( "dpctl._sycl_core", [ - os.path.join("dpctl", "sycl_core.pyx"), + os.path.join("dpctl", "_sycl_core.pyx"), ], **extension_args ),