Skip to content

Changed repr for Memory objects #442

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 13, 2021
Merged

Changed repr for Memory objects #442

merged 1 commit into from
May 13, 2021

Conversation

oleksandr-pavlyk
Copy link
Contributor

@oleksandr-pavlyk oleksandr-pavlyk commented May 13, 2021

Added docstrings

Added public properties:
sycl_context
sycl_device

In [4]: dpm.MemoryUSMShared(1024, queue=dpctl.SyclQueue("cpu"))
Out[4]: <SYCL(TM) USM-shared allocated memory block of 1024 bytes at 0x55656e945780>

In [5]: Out[4].sycl_device
Out[5]: <dpctl.SyclDevice [backend_type.opencl, device_type.cpu,  Intel(R) Core(TM) i7-10710U CPU @ 1.10GHz] at 0x7fdeaf804c70>

In [6]: Out[4].sycl_context
Out[6]: <dpctl.SyclContext at 0x7fded1413c50>

In [7]: Out[4].get_usm_type(syclobj=Out[6])
Out[7]: 'shared'

Added docstrings

Added public properties:
    sycl_context
    sycl_device

```
In [2]: import dpctl.memory as dpm

In [3]: dpm.MemoryUSMShared(1024)
Out[3]: <SYCL(TM) USM-shared allocated memory block of 1024 bytes at 0x557aea12c000>

```
@diptorupd diptorupd merged commit 5f531ad into master May 13, 2021
@diptorupd diptorupd deleted the usm_memory_repr branch May 13, 2021 20:24
diptorupd pushed a commit to diptorupd/dpctl that referenced this pull request May 14, 2021
Added docstrings

Added public properties:
    sycl_context
    sycl_device

```
In [2]: import dpctl.memory as dpm

In [3]: dpm.MemoryUSMShared(1024)
Out[3]: <SYCL(TM) USM-shared allocated memory block of 1024 bytes at 0x557aea12c000>

```
diptorupd pushed a commit to diptorupd/dpctl that referenced this pull request May 14, 2021
Added docstrings

Added public properties:
    sycl_context
    sycl_device

```
In [2]: import dpctl.memory as dpm

In [3]: dpm.MemoryUSMShared(1024)
Out[3]: <SYCL(TM) USM-shared allocated memory block of 1024 bytes at 0x557aea12c000>

```
diptorupd pushed a commit to diptorupd/dpctl that referenced this pull request May 14, 2021
Added docstrings

Added public properties:
    sycl_context
    sycl_device

```
In [2]: import dpctl.memory as dpm

In [3]: dpm.MemoryUSMShared(1024)
Out[3]: <SYCL(TM) USM-shared allocated memory block of 1024 bytes at 0x557aea12c000>

```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants