From e34ad688cfb64a583782c5a3ed3dffaca7f0be9b Mon Sep 17 00:00:00 2001 From: Diptorup Deb Date: Fri, 9 Oct 2020 18:22:50 -0500 Subject: [PATCH 1/2] 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 9325ad80c1f7b12a8134c2d5d43a432e77fde053 Mon Sep 17 00:00:00 2001 From: Oleksandr Pavlyk Date: Wed, 21 Oct 2020 12:33:30 -0500 Subject: [PATCH 2/2] Fixed build break --- 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 ),