Skip to content

Commit 1fc7563

Browse files
Removed uses of cl::sycl in comments and in header files
Removed use of deprecated `sycl::info::device::profiling` from `print_device_info` function. Removed `DPCTLDevice_IsUnifiedHostMemory` which was DPCTL interface to deprecated `info::device::host_unified_memory` descriptor now that aspects are implemented.
1 parent 16a925e commit 1fc7563

16 files changed

+19
-57
lines changed

dpctl/_backend.pxd

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,6 @@ cdef extern from "syclinterface/dpctl_sycl_device_interface.h":
175175
cdef bool DPCTLDevice_IsCPU(const DPCTLSyclDeviceRef DRef)
176176
cdef bool DPCTLDevice_IsGPU(const DPCTLSyclDeviceRef DRef)
177177
cdef bool DPCTLDevice_IsHost(const DPCTLSyclDeviceRef DRef)
178-
cdef bool DPCTLDevice_IsHostUnifiedMemory(const DPCTLSyclDeviceRef DRef)
179178
cdef bool DPCTLDevice_GetSubGroupIndependentForwardProgress(const DPCTLSyclDeviceRef DRef)
180179
cdef uint32_t DPCTLDevice_GetPreferredVectorWidthChar(const DPCTLSyclDeviceRef DRef)
181180
cdef uint32_t DPCTLDevice_GetPreferredVectorWidthShort(const DPCTLSyclDeviceRef DRef)

dpctl/_sycl_device.pxd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ cdef public api class _SyclDevice [
3333
object Py_SyclDeviceObject,
3434
type Py_SyclDeviceType
3535
]:
36-
""" A helper data-owner class to abstract a `cl::sycl::device` instance.
36+
""" A helper data-owner class to abstract a `sycl::device` instance.
3737
"""
3838
cdef DPCTLSyclDeviceRef _device_ref
3939
cdef const char *_vendor

dpctl/_sycl_device.pyx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ cdef class SyclSubDeviceCreationError(Exception):
129129

130130
cdef class _SyclDevice:
131131
"""
132-
A helper data-owner class to abstract a cl::sycl::device instance.
132+
A helper data-owner class to abstract a `sycl::device` instance.
133133
"""
134134

135135
def __dealloc__(self):

dpctl/_sycl_event.pxd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ cdef public api class SyclEvent(_SyclEvent) [
3636
object PySyclEventObject,
3737
type PySyclEventType
3838
]:
39-
""" Python wrapper class for a ``cl::sycl::event``
39+
""" Python wrapper class for a ``sycl::event``
4040
"""
4141
@staticmethod
4242
cdef SyclEvent _create (DPCTLSyclEventRef event)

dpctl/_sycl_event.pyx

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -105,11 +105,11 @@ cdef class _SyclEvent:
105105
cdef class SyclEvent(_SyclEvent):
106106
"""
107107
SyclEvent(arg=None)
108-
Python class representing ``cl::sycl::event``. There are multiple
108+
Python class representing ``sycl::event``. There are multiple
109109
ways to create a :class:`dpctl.SyclEvent` object:
110110
111111
- Invoking the constructor with no arguments creates a ready event
112-
using the default constructor of the ``cl::sycl::event``.
112+
using the default constructor of the ``sycl::event``.
113113
114114
:Example:
115115
.. code-block:: python
@@ -248,19 +248,19 @@ cdef class SyclEvent(_SyclEvent):
248248

249249
def _get_capsule(self):
250250
"""
251-
Returns a copy of the underlying ``cl::sycl::event`` pointer as a void
251+
Returns a copy of the underlying ``sycl::event`` pointer as a void
252252
pointer inside a named ``PyCapsule`` that has the name
253253
**SyclEventRef**. The ownership of the pointer inside the capsule is
254254
passed to the caller, and pointer is deleted when the capsule goes out
255255
of scope.
256256
257257
Returns:
258258
:class:`pycapsule`: A capsule object storing a copy of the
259-
``cl::sycl::event`` pointer belonging to a
259+
``sycl::event`` pointer belonging to a
260260
:class:`dpctl.SyclEvent` instance.
261261
Raises:
262262
ValueError: If the ``DPCTLEvent_Copy`` fails to copy the
263-
``cl::sycl::event`` pointer.
263+
``sycl::event`` pointer.
264264
265265
"""
266266
cdef DPCTLSyclEventRef ERef = NULL
@@ -334,7 +334,7 @@ cdef class SyclEvent(_SyclEvent):
334334
def profiling_info_submit(self):
335335
"""
336336
Returns the 64-bit time value in nanoseconds
337-
when ``cl::sycl::command_group`` was submitted to the queue.
337+
when ``sycl::command_group`` was submitted to the queue.
338338
"""
339339
cdef uint64_t profiling_info_submit = 0
340340
profiling_info_submit = DPCTLEvent_GetProfilingInfoSubmit(
@@ -346,7 +346,7 @@ cdef class SyclEvent(_SyclEvent):
346346
def profiling_info_start(self):
347347
"""
348348
Returns the 64-bit time value in nanoseconds
349-
when ``cl::sycl::command_group`` started execution on the device.
349+
when ``sycl::command_group`` started execution on the device.
350350
"""
351351
cdef uint64_t profiling_info_start = 0
352352
profiling_info_start = DPCTLEvent_GetProfilingInfoStart(self._event_ref)
@@ -356,7 +356,7 @@ cdef class SyclEvent(_SyclEvent):
356356
def profiling_info_end(self):
357357
"""
358358
Returns the 64-bit time value in nanoseconds
359-
when ``cl::sycl::command_group`` finished execution on the device.
359+
when ``sycl::command_group`` finished execution on the device.
360360
"""
361361
cdef uint64_t profiling_info_end = 0
362362
profiling_info_end = DPCTLEvent_GetProfilingInfoEnd(self._event_ref)

dpctl/_sycl_platform.pxd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ from ._backend cimport DPCTLSyclDeviceSelectorRef, DPCTLSyclPlatformRef
2525

2626

2727
cdef class _SyclPlatform:
28-
''' A helper metaclass to abstract a cl::sycl::platform instance.
28+
''' A helper metaclass to abstract a ``sycl::platform`` instance.
2929
'''
3030
cdef DPCTLSyclPlatformRef _platform_ref
3131
cdef const char *_vendor

dpctl/_sycl_platform.pyx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ cdef void _init_helper(_SyclPlatform platform, DPCTLSyclPlatformRef PRef):
8181

8282
cdef class SyclPlatform(_SyclPlatform):
8383
""" SyclPlatform(self, arg=None)
84-
Python class representing ``cl::sycl::platform`` class.
84+
Python class representing ``sycl::platform`` class.
8585
8686
SyclPlatform() - create platform selected by sycl::default_selector
8787
SyclPlatform(filter_selector) - create platform selected by filter

dpctl/_sycl_queue.pyx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ cdef class _SyclQueue:
186186
cdef class SyclQueue(_SyclQueue):
187187
"""
188188
SyclQueue(*args, **kwargs)
189-
Python class representing ``cl::sycl::queue``. There are multiple
189+
Python class representing ``sycl::queue``. There are multiple
190190
ways to create a :class:`dpctl.SyclQueue` object:
191191
192192
- Invoking the constructor with no arguments creates a context using
@@ -258,7 +258,7 @@ cdef class SyclQueue(_SyclQueue):
258258
context will be created from the specified device.
259259
dev (str, :class:`dpctl.SyclDevice`, capsule, optional): Sycl device
260260
to create :class:`dpctl.SyclQueue` from. If not specified, sycl
261-
device selected by ``cl::sycl::default_selector`` is used.
261+
device selected by ``sycl::default_selector`` is used.
262262
The argument must be explicitly specified if `ctxt` argument is
263263
provided.
264264

examples/cython/sycl_direct_linkage/_buffer_example.pyx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ import numpy as np
2424
from cython.operator cimport dereference as deref
2525

2626

27-
cdef extern from "CL/sycl.hpp" namespace "cl::sycl":
27+
cdef extern from "CL/sycl.hpp" namespace "sycl":
2828
cdef cppclass queue nogil:
2929
pass
3030

examples/cython/sycl_direct_linkage/sycl_function.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#include <CL/sycl.hpp>
22

3-
int c_columnwise_total(cl::sycl::queue &,
3+
int c_columnwise_total(sycl::queue &,
44
size_t n,
55
size_t m,
66
double *mat,

examples/python/device_selection.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222

2323
def create_default_device():
2424
"""
25-
Create default SyclDevice using `cl::sycl::default_selector`.
25+
Create default SyclDevice using `sycl::default_selector`.
2626
2727
Device created can be influenced by environment variable
2828
SYCL_DEVICE_FILTER, which determines SYCL devices seen by the

libsyclinterface/helper/include/dpctl_error_handlers.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ class DPCTL_API DPCTL_AsyncErrorHandler
4242
{
4343
}
4444

45-
void operator()(const cl::sycl::exception_list &exceptions);
45+
void operator()(const sycl::exception_list &exceptions);
4646
};
4747

4848
enum error_level : int

libsyclinterface/include/dpctl_sycl_device_interface.h

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -312,19 +312,6 @@ DPCTL_API
312312
__dpctl_give const char *
313313
DPCTLDevice_GetVendor(__dpctl_keep const DPCTLSyclDeviceRef DRef);
314314

315-
/*!
316-
* @brief Returns True if the device and the host share a unified memory
317-
* subsystem, else returns False.
318-
*
319-
* @param DRef Opaque pointer to a ``sycl::device``
320-
* @return Boolean indicating if the device shares a unified memory subsystem
321-
* with the host.
322-
* @ingroup DeviceInterface
323-
*/
324-
DPCTL_API
325-
bool DPCTLDevice_IsHostUnifiedMemory(
326-
__dpctl_keep const DPCTLSyclDeviceRef DRef);
327-
328315
/*!
329316
* @brief Checks if two DPCTLSyclDeviceRef objects point to the same
330317
* sycl::device.

libsyclinterface/source/dpctl_sycl_device_interface.cpp

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -367,20 +367,6 @@ DPCTLDevice_GetDriverVersion(__dpctl_keep const DPCTLSyclDeviceRef DRef)
367367
return cstr_driver;
368368
}
369369

370-
bool DPCTLDevice_IsHostUnifiedMemory(__dpctl_keep const DPCTLSyclDeviceRef DRef)
371-
{
372-
bool ret = false;
373-
auto D = unwrap(DRef);
374-
if (D) {
375-
try {
376-
ret = D->get_info<info::device::host_unified_memory>();
377-
} catch (std::exception const &e) {
378-
error_handler(e, __FILE__, __func__, __LINE__);
379-
}
380-
}
381-
return ret;
382-
}
383-
384370
bool DPCTLDevice_AreEq(__dpctl_keep const DPCTLSyclDeviceRef DRef1,
385371
__dpctl_keep const DPCTLSyclDeviceRef DRef2)
386372
{

libsyclinterface/source/dpctl_sycl_device_manager.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,6 @@ std::string get_device_info_str(const device &Device)
5858
<< Device.get_info<info::device::driver_version>() << _endl
5959
<< std::setw(4) << " " << std::left << std::setw(16) << "Vendor"
6060
<< Device.get_info<info::device::vendor>() << _endl << std::setw(4)
61-
<< " " << std::left << std::setw(16) << "Profile"
62-
<< Device.get_info<info::device::profile>() << _endl << std::setw(4)
6361
<< " " << std::left << std::setw(16) << "Filter string"
6462
<< DPCTL_GetDeviceFilterString(Device) << _endl;
6563

libsyclinterface/tests/test_sycl_device_interface.cpp

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -586,14 +586,6 @@ TEST_F(TestDPCTLSyclDeviceNullArgs, ChkDriverVersion)
586586
ASSERT_TRUE(driver_version == nullptr);
587587
}
588588

589-
TEST_F(TestDPCTLSyclDeviceNullArgs, ChkIsHostUnifiedMemory)
590-
{
591-
bool is_hum = true;
592-
EXPECT_NO_FATAL_FAILURE(is_hum =
593-
DPCTLDevice_IsHostUnifiedMemory(Null_DRef));
594-
ASSERT_FALSE(is_hum);
595-
}
596-
597589
TEST_F(TestDPCTLSyclDeviceNullArgs, ChkAreEq)
598590
{
599591
bool are_eq = true;

0 commit comments

Comments
 (0)