From b29fb0eab9f404114b07b9523fd9c9d2fedda0f6 Mon Sep 17 00:00:00 2001 From: Sergey Pokhodenko Date: Mon, 21 Sep 2020 10:32:39 +0300 Subject: [PATCH 1/6] Rename folder dppl to dpctl --- {dppl => dpctl}/.gitignore | 0 {dppl => dpctl}/__init__.py | 0 {dppl => dpctl}/_memory.pyx | 0 {dppl => dpctl}/_sycl_core.pxd | 0 {dppl => dpctl}/_version.py | 0 {dppl => dpctl}/backend.pxd | 0 {dppl => dpctl}/ocldrv.py | 0 {dppl => dpctl}/opencl_core.py | 0 {dppl => dpctl}/sycl_core.pyx | 0 {dppl => dpctl}/tests/__init__.py | 0 {dppl => dpctl}/tests/dppl_tests/__init__.py | 0 {dppl => dpctl}/tests/dppl_tests/test_sycl_queue_manager.py | 0 {dppl => dpctl}/tests/dppl_tests/test_sycl_usm.py | 0 {dppl => dpctl}/tests/test_dump_functions.py | 0 14 files changed, 0 insertions(+), 0 deletions(-) rename {dppl => dpctl}/.gitignore (100%) rename {dppl => dpctl}/__init__.py (100%) rename {dppl => dpctl}/_memory.pyx (100%) rename {dppl => dpctl}/_sycl_core.pxd (100%) rename {dppl => dpctl}/_version.py (100%) rename {dppl => dpctl}/backend.pxd (100%) rename {dppl => dpctl}/ocldrv.py (100%) rename {dppl => dpctl}/opencl_core.py (100%) rename {dppl => dpctl}/sycl_core.pyx (100%) rename {dppl => dpctl}/tests/__init__.py (100%) rename {dppl => dpctl}/tests/dppl_tests/__init__.py (100%) rename {dppl => dpctl}/tests/dppl_tests/test_sycl_queue_manager.py (100%) rename {dppl => dpctl}/tests/dppl_tests/test_sycl_usm.py (100%) rename {dppl => dpctl}/tests/test_dump_functions.py (100%) diff --git a/dppl/.gitignore b/dpctl/.gitignore similarity index 100% rename from dppl/.gitignore rename to dpctl/.gitignore diff --git a/dppl/__init__.py b/dpctl/__init__.py similarity index 100% rename from dppl/__init__.py rename to dpctl/__init__.py diff --git a/dppl/_memory.pyx b/dpctl/_memory.pyx similarity index 100% rename from dppl/_memory.pyx rename to dpctl/_memory.pyx diff --git a/dppl/_sycl_core.pxd b/dpctl/_sycl_core.pxd similarity index 100% rename from dppl/_sycl_core.pxd rename to dpctl/_sycl_core.pxd diff --git a/dppl/_version.py b/dpctl/_version.py similarity index 100% rename from dppl/_version.py rename to dpctl/_version.py diff --git a/dppl/backend.pxd b/dpctl/backend.pxd similarity index 100% rename from dppl/backend.pxd rename to dpctl/backend.pxd diff --git a/dppl/ocldrv.py b/dpctl/ocldrv.py similarity index 100% rename from dppl/ocldrv.py rename to dpctl/ocldrv.py diff --git a/dppl/opencl_core.py b/dpctl/opencl_core.py similarity index 100% rename from dppl/opencl_core.py rename to dpctl/opencl_core.py diff --git a/dppl/sycl_core.pyx b/dpctl/sycl_core.pyx similarity index 100% rename from dppl/sycl_core.pyx rename to dpctl/sycl_core.pyx diff --git a/dppl/tests/__init__.py b/dpctl/tests/__init__.py similarity index 100% rename from dppl/tests/__init__.py rename to dpctl/tests/__init__.py diff --git a/dppl/tests/dppl_tests/__init__.py b/dpctl/tests/dppl_tests/__init__.py similarity index 100% rename from dppl/tests/dppl_tests/__init__.py rename to dpctl/tests/dppl_tests/__init__.py diff --git a/dppl/tests/dppl_tests/test_sycl_queue_manager.py b/dpctl/tests/dppl_tests/test_sycl_queue_manager.py similarity index 100% rename from dppl/tests/dppl_tests/test_sycl_queue_manager.py rename to dpctl/tests/dppl_tests/test_sycl_queue_manager.py diff --git a/dppl/tests/dppl_tests/test_sycl_usm.py b/dpctl/tests/dppl_tests/test_sycl_usm.py similarity index 100% rename from dppl/tests/dppl_tests/test_sycl_usm.py rename to dpctl/tests/dppl_tests/test_sycl_usm.py diff --git a/dppl/tests/test_dump_functions.py b/dpctl/tests/test_dump_functions.py similarity index 100% rename from dppl/tests/test_dump_functions.py rename to dpctl/tests/test_dump_functions.py From 71a29db5526bba72a2405bd172ff3cf05b38c6da Mon Sep 17 00:00:00 2001 From: Sergey Pokhodenko Date: Mon, 21 Sep 2020 10:34:25 +0300 Subject: [PATCH 2/6] Rename in setup.py and setup.cfg --- setup.cfg | 6 +++--- setup.py | 16 ++++++++-------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/setup.cfg b/setup.cfg index efd36dce35..59be40a5ed 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,7 +1,7 @@ [flake8] max-line-length = 100 ignore = E122,E123,E126,E127,E128,E731,E722 -exclude = build,dppl/_version.py,tests,conda.recipe,.git,versioneer.py,benchmarks,.asv +exclude = build,dpctl/_version.py,tests,conda.recipe,.git,versioneer.py,benchmarks,.asv [tool:pytest] norecursedirs= .* *.egg* build dist conda.recipe @@ -20,8 +20,8 @@ markers = [versioneer] VCS = git -versionfile_source = dppl/_version.py -versionfile_build = dppl/_version.py +versionfile_source = dpctl/_version.py +versionfile_build = dpctl/_version.py tag_prefix = parentdir_prefix = DPPL- diff --git a/setup.py b/setup.py index 2a90338032..55d8a43c17 100644 --- a/setup.py +++ b/setup.py @@ -1,4 +1,4 @@ -##===---------- setup.py - dppl.ocldrv interface -----*- Python -*-----===## +##===---------- setup.py - dpctl.ocldrv interface -----*- Python -*-----===## ## ## Python Data Parallel Processing Library (PyDPPL) ## @@ -19,7 +19,7 @@ ##===----------------------------------------------------------------------===## ### ### \file -### This file builds the dppl and dppl.ocldrv extension modules. +### This file builds the dpctl and dpctl.ocldrv extension modules. ##===----------------------------------------------------------------------===## import os import sys @@ -100,7 +100,7 @@ def extensions(): librarys = [dppl_sycl_interface_lib] if IS_LIN or IS_MAC: - runtime_library_dirs = [os.path.abspath('dppl')] + runtime_library_dirs = [os.path.abspath('dpctl')] elif IS_WIN: runtime_library_dirs = [] @@ -113,9 +113,9 @@ def extensions(): } extensions = [ - Extension('dppl._sycl_core', [os.path.abspath('dppl/sycl_core.pyx'),], + Extension('dpctl._sycl_core', [os.path.abspath('dpctl/sycl_core.pyx'),], **extension_args), - Extension('dppl._memory', [os.path.abspath('dppl/_memory.pyx'),], + Extension('dpctl._memory', [os.path.abspath('dpctl/_memory.pyx'),], **extension_args), ] @@ -130,14 +130,14 @@ def extensions(): license="Apache 2.0", author="Intel Corporation", url='https://github.com/IntelPython/PyDPPL', - packages=find_packages(include=["dppl", "dppl.*"]), + packages=find_packages(include=["dpctl", "dpctl.*"]), ext_modules = extensions(), setup_requires=requirements, cffi_modules=[ - "./dppl/opencl_core.py:ffi" + "./dpctl/opencl_core.py:ffi" ], install_requires=requirements, - keywords='dppl', + keywords='dpctl', classifiers=[ "Development Status :: 3 - Alpha", 'Programming Language :: Python :: 3.6', From db08f4acf487482f42e4860ee8a891a73428c037 Mon Sep 17 00:00:00 2001 From: Sergey Pokhodenko Date: Mon, 21 Sep 2020 10:37:42 +0300 Subject: [PATCH 3/6] Rename dppl to dpctl in all usage cases and docs --- backends/include/dppl_opencl_interface.h | 2 +- conda-recipe/build.sh | 4 +- conda-recipe/run_test.bat | 6 +- conda-recipe/run_test.sh | 6 +- dpctl/__init__.py | 12 ++-- dpctl/_memory.pyx | 6 +- dpctl/ocldrv.py | 8 +-- dpctl/opencl_core.py | 4 +- dpctl/sycl_core.pyx | 2 +- .../dppl_tests/test_sycl_queue_manager.py | 62 +++++++++---------- dpctl/tests/dppl_tests/test_sycl_usm.py | 16 ++--- dpctl/tests/test_dump_functions.py | 8 +-- examples/create_sycl_queues.py | 6 +- scripts/build_for_develop.sh | 2 +- 14 files changed, 72 insertions(+), 72 deletions(-) diff --git a/backends/include/dppl_opencl_interface.h b/backends/include/dppl_opencl_interface.h index d9c4354aa1..52e03ed7de 100644 --- a/backends/include/dppl_opencl_interface.h +++ b/backends/include/dppl_opencl_interface.h @@ -20,7 +20,7 @@ /// /// \file /// This file contains the declaration of a C API to expose a lightweight OpenCL -/// interface for the Python dppl package. +/// interface for the Python dpctl package. /// //===----------------------------------------------------------------------===// diff --git a/conda-recipe/build.sh b/conda-recipe/build.sh index 4af24e8f91..bf7892875c 100755 --- a/conda-recipe/build.sh +++ b/conda-recipe/build.sh @@ -33,12 +33,12 @@ make -j 4 && make install cd .. -# required by dppl.opencl_core +# required by dpctl.opencl_core export DPPL_OPENCL_INTERFACE_LIBDIR=${PREFIX} export DPPL_OPENCL_INTERFACE_INCLDIR=${PREFIX}/include export OpenCL_LIBDIR=${DPCPP_ROOT}/lib -# required by dppl.sycl_core +# required by dpctl.sycl_core export DPPL_SYCL_INTERFACE_LIBDIR=${PREFIX}/lib export DPPL_SYCL_INTERFACE_INCLDIR=${PREFIX}/include diff --git a/conda-recipe/run_test.bat b/conda-recipe/run_test.bat index 98ea32a886..992277b497 100644 --- a/conda-recipe/run_test.bat +++ b/conda-recipe/run_test.bat @@ -5,11 +5,11 @@ set ERRORLEVEL= @echo on -"%PYTHON%" -c "import dppl" +"%PYTHON%" -c "import dpctl" IF %ERRORLEVEL% NEQ 0 exit 1 -"%PYTHON%" -c "import dppl.ocldrv" +"%PYTHON%" -c "import dpctl.ocldrv" IF %ERRORLEVEL% NEQ 0 exit 1 -"%PYTHON%" -m unittest -v dppl.tests +"%PYTHON%" -m unittest -v dpctl.tests IF %ERRORLEVEL% NEQ 0 exit 1 diff --git a/conda-recipe/run_test.sh b/conda-recipe/run_test.sh index c097f9b789..775783ce50 100644 --- a/conda-recipe/run_test.sh +++ b/conda-recipe/run_test.sh @@ -5,6 +5,6 @@ set -e # Suppress error b/c it could fail on Ubuntu 18.04 source ${ONEAPI_ROOT}/compiler/latest/env/vars.sh || true -${PYTHON} -c "import dppl" -${PYTHON} -c "import dppl.ocldrv" -${PYTHON} -m unittest -v dppl.tests +${PYTHON} -c "import dpctl" +${PYTHON} -c "import dpctl.ocldrv" +${PYTHON} -m unittest -v dpctl.tests diff --git a/dpctl/__init__.py b/dpctl/__init__.py index 8e3808c68c..3412040d2d 100644 --- a/dpctl/__init__.py +++ b/dpctl/__init__.py @@ -3,8 +3,8 @@ PyDPPL provides a lightweight Python abstraction over DPC++/SYCL and OpenCL runtime objects. The DPC++ runtime wrapper objects can be - accessed by importing dppl. The OpenCL runtime wrapper objects can be - accessed by importing dppl.ocldrv. The library is in an early-beta + accessed by importing dpctl. The OpenCL runtime wrapper objects can be + accessed by importing dpctl.ocldrv. The library is in an early-beta stage of development and not yet ready for production usage. PyDPPL's intended usage is as a common SYCL interoperability layer for @@ -13,7 +13,7 @@ of the library. Currently, only a small subset of DPC++ runtime objects are exposed - through the dppl module. The main API classes inside the dppl module are: + through the dpctl module. The main API classes inside the dpctl module are: Runtime: The class stores a global SYCL queue and a stack of currently activated queues. Runtime provides a special getter @@ -21,7 +21,7 @@ as a Py_capsule. A single global thread local instance of the Runtime class - is created on loading the dppl module for the first time. + is created on loading the dpctl module for the first time. DeviceArray: A DeviceArray object encapsulates a one-dimensional cl::sycl::buffer object. A DeviceArray object can be @@ -39,9 +39,9 @@ Global data members: runtime - An instance of the Runtime class. - Please use `pydoc dppl._sycl_core` to look at the current API for dppl. + Please use `pydoc dpctl._sycl_core` to look at the current API for dpctl. - Please use `pydoc dppl.ocldrv` to look at the current API for dppl.ocldrv. + Please use `pydoc dpctl.ocldrv` to look at the current API for dpctl.ocldrv. ''' __author__ = "Intel Corp." diff --git a/dpctl/_memory.pyx b/dpctl/_memory.pyx index 22b9329073..835a3c2465 100644 --- a/dpctl/_memory.pyx +++ b/dpctl/_memory.pyx @@ -1,5 +1,5 @@ -import dppl -from dppl.backend cimport * +import dpctl +from dpctl.backend cimport * from ._sycl_core cimport SyclContext, SyclQueue from cpython cimport Py_buffer @@ -19,7 +19,7 @@ cdef class Memory: if (nbytes > 0): if queue is None: - queue = dppl.get_current_queue() + queue = dpctl.get_current_queue() if (ptr_type == "shared"): p = DPPLmalloc_shared(nbytes, queue.get_queue_ref()) diff --git a/dpctl/ocldrv.py b/dpctl/ocldrv.py index 7b8395b1ee..1156565466 100644 --- a/dpctl/ocldrv.py +++ b/dpctl/ocldrv.py @@ -1,4 +1,4 @@ -##===---------- ocldrv.py - dppl.ocldrv interface -----*- Python -*-----===## +##===---------- ocldrv.py - dpctl.ocldrv interface -----*- Python -*-----===## ## ## Python Data Parallel Processing Library (PyDPPL) ## @@ -22,7 +22,7 @@ ### This file exposes Python classes for different OpenCL classes that are ### exposed by the _dppl_binding CFFI extension module. ##===----------------------------------------------------------------------===## -''' The dppl.ocldrv module contains a set of Python wrapper classes for +''' The dpctl.ocldrv module contains a set of Python wrapper classes for OpenCL objects. The module has wrappers for cl_context, cl_device, cl_mem, cl_program, and cl_kernel objects. @@ -71,14 +71,14 @@ class DpplDriverError(Exception): - """ The exception is raised when dppl.ocldrv cannot find an OpenCL Driver. + """ The exception is raised when dpctl.ocldrv cannot find an OpenCL Driver. """ pass class DeviceNotFoundError(Exception): """ The exception is raised when the requested type of OpenCL device is - not available or not supported by dppl.ocldrv. + not available or not supported by dpctl.ocldrv. """ pass diff --git a/dpctl/opencl_core.py b/dpctl/opencl_core.py index 6d61aa59fa..327de08122 100644 --- a/dpctl/opencl_core.py +++ b/dpctl/opencl_core.py @@ -1,4 +1,4 @@ -##===--------- opencl_core.py - dppl.ocldrv interface -----*- Python -*----===## +##===--------- opencl_core.py - dpctl.ocldrv interface -----*- Python -*----===## ## ## Python Data Parallel Processing Library (PyDPPL) ## @@ -57,7 +57,7 @@ # globals needed to use the shared object. It must be in valid C syntax. ffi.cdef(glue_h) -ffi_lib_name = "dppl._opencl_core" +ffi_lib_name = "dpctl._opencl_core" ffi.set_source( ffi_lib_name, diff --git a/dpctl/sycl_core.pyx b/dpctl/sycl_core.pyx index 5df3af4367..f6b896f5a4 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 dppl.backend cimport * +from dpctl.backend cimport * _logger = logging.getLogger(__name__) diff --git a/dpctl/tests/dppl_tests/test_sycl_queue_manager.py b/dpctl/tests/dppl_tests/test_sycl_queue_manager.py index 6f83f0fdc9..676fa172b7 100644 --- a/dpctl/tests/dppl_tests/test_sycl_queue_manager.py +++ b/dpctl/tests/dppl_tests/test_sycl_queue_manager.py @@ -1,4 +1,4 @@ -##===---------- test_sycl_queue_manager.py - dppl -------*- Python -*-----===## +##===---------- test_sycl_queue_manager.py - dpctl -------*- Python -*-----===## ## ## Python Data Parallel Processing Library (PyDPPL) ## @@ -23,73 +23,73 @@ ### in sycl_core.pyx. ##===----------------------------------------------------------------------===## -import dppl +import dpctl import unittest class TestGetNumPlatforms (unittest.TestCase): - @unittest.skipIf(not dppl.has_sycl_platforms, "No SYCL platforms available") + @unittest.skipIf(not dpctl.has_sycl_platforms, "No SYCL platforms available") def test_dppl_get_num_platforms (self): - if(dppl.has_sycl_platforms): - self.assertGreaterEqual(dppl.get_num_platforms(), 1) + if(dpctl.has_sycl_platforms): + self.assertGreaterEqual(dpctl.get_num_platforms(), 1) -@unittest.skipIf(not dppl.has_sycl_platforms, "No SYCL platforms available") +@unittest.skipIf(not dpctl.has_sycl_platforms, "No SYCL platforms available") class TestDumpMethods (unittest.TestCase): def test_dppl_dump (self): try: - dppl.dump() + dpctl.dump() except Exception: self.fail("Encountered an exception inside dump().") def test_dppl_dump_device_info (self): - q = dppl.get_current_queue() + q = dpctl.get_current_queue() try: q.get_sycl_device().dump_device_info() except Exception: self.fail("Encountered an exception inside dump_device_info().") -@unittest.skipIf(not dppl.has_sycl_platforms, "No SYCL platforms available") +@unittest.skipIf(not dpctl.has_sycl_platforms, "No SYCL platforms available") class TestDPPLIsInDPPLCtxt (unittest.TestCase): def test_is_in_dppl_ctxt_outside_device_ctxt (self): - self.assertFalse(dppl.is_in_dppl_ctxt()) + self.assertFalse(dpctl.is_in_dppl_ctxt()) def test_is_in_dppl_ctxt_inside_device_ctxt (self): - with dppl.device_context(dppl.device_type.gpu): - self.assertTrue(dppl.is_in_dppl_ctxt()) + with dpctl.device_context(dpctl.device_type.gpu): + self.assertTrue(dpctl.is_in_dppl_ctxt()) def test_is_in_dppl_ctxt_inside_nested_device_ctxt (self): - with dppl.device_context(dppl.device_type.cpu): - with dppl.device_context(dppl.device_type.gpu): - self.assertTrue(dppl.is_in_dppl_ctxt()) - self.assertTrue(dppl.is_in_dppl_ctxt()) - self.assertFalse(dppl.is_in_dppl_ctxt()) + with dpctl.device_context(dpctl.device_type.cpu): + with dpctl.device_context(dpctl.device_type.gpu): + self.assertTrue(dpctl.is_in_dppl_ctxt()) + self.assertTrue(dpctl.is_in_dppl_ctxt()) + self.assertFalse(dpctl.is_in_dppl_ctxt()) -@unittest.skipIf(not dppl.has_sycl_platforms, "No SYCL platforms available") +@unittest.skipIf(not dpctl.has_sycl_platforms, "No SYCL platforms available") class TestGetCurrentQueueInMultipleThreads (unittest.TestCase): def test_num_current_queues_outside_with_clause (self): - self.assertEqual(dppl.get_num_activated_queues(), 0) + self.assertEqual(dpctl.get_num_activated_queues(), 0) - @unittest.skipIf(not dppl.has_gpu_queues, "No GPU platforms available") + @unittest.skipIf(not dpctl.has_gpu_queues, "No GPU platforms available") def test_num_current_queues_inside_with_clause (self): - with dppl.device_context(dppl.device_type.cpu): - self.assertEqual(dppl.get_num_activated_queues(), 1) - with dppl.device_context(dppl.device_type.gpu): - self.assertEqual(dppl.get_num_activated_queues(), 2) - self.assertEqual(dppl.get_num_activated_queues(), 0) + with dpctl.device_context(dpctl.device_type.cpu): + self.assertEqual(dpctl.get_num_activated_queues(), 1) + with dpctl.device_context(dpctl.device_type.gpu): + self.assertEqual(dpctl.get_num_activated_queues(), 2) + self.assertEqual(dpctl.get_num_activated_queues(), 0) - @unittest.skipIf(not dppl.has_gpu_queues, "No GPU platforms available") + @unittest.skipIf(not dpctl.has_gpu_queues, "No GPU platforms available") def test_num_current_queues_inside_threads (self): from threading import Thread, local def SessionThread (self): - self.assertEqual(dppl.get_num_activated_queues(), 0) - with dppl.device_context(dppl.device_type.gpu): - self.assertEqual(dppl.get_num_activated_queues(), 1) + self.assertEqual(dpctl.get_num_activated_queues(), 0) + with dpctl.device_context(dpctl.device_type.gpu): + self.assertEqual(dpctl.get_num_activated_queues(), 1) Session1 = Thread(target=SessionThread(self)) Session2 = Thread(target=SessionThread(self)) - with dppl.device_context(dppl.device_type.cpu): - self.assertEqual(dppl.get_num_activated_queues(), 1) + with dpctl.device_context(dpctl.device_type.cpu): + self.assertEqual(dpctl.get_num_activated_queues(), 1) Session1.start() Session2.start() diff --git a/dpctl/tests/dppl_tests/test_sycl_usm.py b/dpctl/tests/dppl_tests/test_sycl_usm.py index 15bb397a9f..4f23b428a0 100644 --- a/dpctl/tests/dppl_tests/test_sycl_usm.py +++ b/dpctl/tests/dppl_tests/test_sycl_usm.py @@ -1,4 +1,4 @@ -##===---------- test_sycl_queue_manager.py - dppl -------*- Python -*-----===## +##===---------- test_sycl_queue_manager.py - dpctl -------*- Python -*-----===## ## ## Python Data Parallel Processing Library (PyDPPL) ## @@ -19,21 +19,21 @@ ##===----------------------------------------------------------------------===## import unittest -import dppl -from dppl._memory import MemoryUSMShared, MemoryUSMHost, MemoryUSMDevice +import dpctl +from dpctl._memory import MemoryUSMShared, MemoryUSMHost, MemoryUSMDevice class TestMemory (unittest.TestCase): def test_memory_create (self): nbytes = 1024 - queue = dppl.get_current_queue() + queue = dpctl.get_current_queue() mobj = MemoryUSMShared(nbytes, queue) self.assertEqual(mobj.nbytes, nbytes) def _create_memory (self): nbytes = 1024 - queue = dppl.get_current_queue() + queue = dpctl.get_current_queue() mobj = MemoryUSMShared(nbytes, queue) return mobj @@ -47,14 +47,14 @@ def test_memory_cpu_context (self): mobj = self._create_memory() # CPU context - with dppl.device_context(dppl.device_type.cpu): + with dpctl.device_context(dpctl.device_type.cpu): self.assertEqual(mobj._usm_type(), 'shared') def test_memory_gpu_context (self): mobj = self._create_memory() # GPU context - with dppl.device_context(dppl.device_type.gpu): + with dpctl.device_context(dpctl.device_type.gpu): self.assertEqual(mobj._usm_type(), 'shared') @@ -65,7 +65,7 @@ class TestMemoryUSMBase: usm_type = None def test_create_with_queue (self): - q = dppl.get_current_queue() + q = dpctl.get_current_queue() m = self.MemoryUSMClass(1024, q) self.assertEqual(m.nbytes, 1024) self.assertEqual(m._usm_type(), self.usm_type) diff --git a/dpctl/tests/test_dump_functions.py b/dpctl/tests/test_dump_functions.py index 2af4744b8e..a925a22ba6 100644 --- a/dpctl/tests/test_dump_functions.py +++ b/dpctl/tests/test_dump_functions.py @@ -16,20 +16,20 @@ import unittest -import dppl -import dppl.ocldrv as drv +import dpctl +import dpctl.ocldrv as drv class TestDumpMethods(unittest.TestCase): def test_dppl_dump (self): try: - dppl.dump() + dpctl.dump() except Exception: self.fail("Encountered an exception inside dump().") def test_dppl_dump_device_info (self): - q = dppl.get_current_queue() + q = dpctl.get_current_queue() try: q.get_sycl_device().dump_device_info() except Exception: diff --git a/examples/create_sycl_queues.py b/examples/create_sycl_queues.py index d8b541bec7..6fc6cdc9fa 100644 --- a/examples/create_sycl_queues.py +++ b/examples/create_sycl_queues.py @@ -1,9 +1,9 @@ from __future__ import print_function -from dppl import runtime, device_context, device_type +from dpctl import runtime, device_context, device_type -# Global runtime object inside dppl +# Global runtime object inside dpctl rt = runtime # Print metadata about the runtime @@ -24,7 +24,7 @@ print("Current context inside with scope") print("========================================") rt.dump_queue(cpu_queue) - + # Note the current context can be either directly accessed by using # the "cpu_queue" object, or it can be accessed via the runtime's # get_current_queue() function. diff --git a/scripts/build_for_develop.sh b/scripts/build_for_develop.sh index 30aa387d4d..70027a7708 100755 --- a/scripts/build_for_develop.sh +++ b/scripts/build_for_develop.sh @@ -26,7 +26,7 @@ cmake \ make V=1 -n -j 4 && make install #make check popd -cp install/lib/*.so dppl/ +cp install/lib/*.so dpctl/ export DPPL_OPENCL_INTERFACE_LIBDIR=${INSTALL_PREFIX}/lib export DPPL_OPENCL_INTERFACE_INCLDIR=${INSTALL_PREFIX}/include From 569c38e13466d33f92be913118ed4026ddefa47b Mon Sep 17 00:00:00 2001 From: Sergey Pokhodenko Date: Mon, 21 Sep 2020 11:08:18 +0300 Subject: [PATCH 4/6] Rename package PyDPPL to dpCtl --- README.md | 4 ++-- conda-recipe/meta.yaml | 4 ++-- setup.py | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index b657d0d00c..a604287f91 100644 --- a/README.md +++ b/README.md @@ -23,13 +23,13 @@ conda activate build-env ```bash conda build conda-recipe ``` -On Windows to cope with [long file names](https://github.com/IntelPython/pydppl/issues/15): +On Windows to cope with [long file names](https://github.com/IntelPython/dpctl/issues/15): ```cmd conda build --croot=C:/tmp conda-recipe ``` 3. Install conda package ```bash -conda install pydppl +conda install dpctl ``` Using PyDPPL diff --git a/conda-recipe/meta.yaml b/conda-recipe/meta.yaml index 76bc4b1f51..48ff634421 100644 --- a/conda-recipe/meta.yaml +++ b/conda-recipe/meta.yaml @@ -1,4 +1,4 @@ -{% set name = "pydppl" %} +{% set name = "dpctl" %} package: name: {{ name|lower }} @@ -39,7 +39,7 @@ about: software license agreement (as set forth above, in the license section of the installed Conda package and/or the README file) and all notices, disclaimers or license terms for third party or open source software - included in or with the software. + included in or with the software.

EULA: Apache-2.0

diff --git a/setup.py b/setup.py index 2a90338032..52b0d5ef45 100644 --- a/setup.py +++ b/setup.py @@ -123,13 +123,13 @@ def extensions(): return exts setup( - name='pydppl', + name='pyctl', version=versioneer.get_version(), cmdclass=versioneer.get_cmdclass(), description="A lightweight Python wrapper for a subset of OpenCL and SYCL.", license="Apache 2.0", author="Intel Corporation", - url='https://github.com/IntelPython/PyDPPL', + url='https://github.com/IntelPython/dpCtl', packages=find_packages(include=["dppl", "dppl.*"]), ext_modules = extensions(), setup_requires=requirements, @@ -137,7 +137,7 @@ def extensions(): "./dppl/opencl_core.py:ffi" ], install_requires=requirements, - keywords='dppl', + keywords='dpctl', classifiers=[ "Development Status :: 3 - Alpha", 'Programming Language :: Python :: 3.6', From 9de992d265bb3dc6c8164af2e2a56997e17fac49 Mon Sep 17 00:00:00 2001 From: Sergey Pokhodenko Date: Mon, 21 Sep 2020 11:10:14 +0300 Subject: [PATCH 5/6] Fix package name --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 52b0d5ef45..5a38532fa7 100644 --- a/setup.py +++ b/setup.py @@ -123,7 +123,7 @@ def extensions(): return exts setup( - name='pyctl', + name='dpctl', version=versioneer.get_version(), cmdclass=versioneer.get_cmdclass(), description="A lightweight Python wrapper for a subset of OpenCL and SYCL.", From 415f47ea9c74e611e07a84918658130ba0992897 Mon Sep 17 00:00:00 2001 From: Sergey Pokhodenko Date: Tue, 22 Sep 2020 14:29:16 -0500 Subject: [PATCH 6/6] Rename dppl tp dpctl --- dpctl/tests/dppl_tests/test_sycl_queue_manager.py | 2 +- dpctl/tests/dppl_tests/test_sycl_usm.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dpctl/tests/dppl_tests/test_sycl_queue_manager.py b/dpctl/tests/dppl_tests/test_sycl_queue_manager.py index 26ce8f23be..5763c18fe7 100644 --- a/dpctl/tests/dppl_tests/test_sycl_queue_manager.py +++ b/dpctl/tests/dppl_tests/test_sycl_queue_manager.py @@ -57,7 +57,7 @@ def test_is_in_dppl_ctxt_inside_device_ctxt (self): with dpctl.device_context(dpctl.device_type.gpu): self.assertTrue(dpctl.is_in_dppl_ctxt()) - @unittest.skipIf(not dppl.has_cpu_queues(), "No CPU platforms available") + @unittest.skipIf(not dpctl.has_cpu_queues(), "No CPU platforms available") def test_is_in_dppl_ctxt_inside_nested_device_ctxt (self): with dpctl.device_context(dpctl.device_type.cpu): with dpctl.device_context(dpctl.device_type.gpu): diff --git a/dpctl/tests/dppl_tests/test_sycl_usm.py b/dpctl/tests/dppl_tests/test_sycl_usm.py index cfb7a7ad80..cdcc95dcc7 100644 --- a/dpctl/tests/dppl_tests/test_sycl_usm.py +++ b/dpctl/tests/dppl_tests/test_sycl_usm.py @@ -43,7 +43,7 @@ def test_memory_without_context (self): # Without context self.assertEqual(mobj._usm_type(), 'shared') - @unittest.skipIf(not dppl.has_cpu_queues(), "No CPU platforms available") + @unittest.skipIf(not dpctl.has_cpu_queues(), "No CPU platforms available") def test_memory_cpu_context (self): mobj = self._create_memory() @@ -54,7 +54,7 @@ def test_memory_cpu_context (self): usm_type = mobj._usm_type() self.assertEqual(usm_type, 'shared') - current_queue = dppl.get_current_queue() + current_queue = dpctl.get_current_queue() # type as view from current queue usm_type = mobj._usm_type(current_queue) # type can be unknown if current queue is