Skip to content
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

Two new device descriptors added #1530

Merged
merged 5 commits into from
Feb 6, 2024
Merged

Conversation

oleksandr-pavlyk
Copy link
Collaborator

@oleksandr-pavlyk oleksandr-pavlyk commented Feb 6, 2024

Added uint32_t DPCTLDevice_GetMaxClockFrequency(__dpctl_keep const DPCTLSyclDeviceRef DRef) and uint64_t DPCTLDevice_GetMaxMemAllocSize(__dpctl_keep const DPCTLSyclDeviceRef DRef).

These expose info::device::max_clock_frequency and info::device::max_mem_alloc_size descriptors.
Corresponding Python API are attributes dpctl.SyclDevice.max_clock_frequecne and dpctl.SyclDevice.max_mem_alloc_size.

E.g.:

(dev_dpctl) opavlyk@opavlyk-mobl:~/repos/dpctl$ ipython
Python 3.9.12 (main, Jun  1 2022, 11:38:51)
Type 'copyright', 'credits' or 'license' for more information
IPython 8.18.1 -- An enhanced Interactive Python. Type '?' for help.

In [1]: import dpctl.tensor as dpt, dpctl

In [2]: dpctl.SyclDevice("cpu").max_mem_alloc_size // (1024 * 1024 * 1024)
Out[2]: 7

In [3]: dpctl.SyclDevice("cpu").max_clock_frequency
Out[3]: 3000

In [4]: dpctl.SyclDevice("cpu").name
Out[4]: '11th Gen Intel(R) Core(TM) i7-1185G7 @ 3.00GHz'
  • Have you provided a meaningful PR description?
  • Have you added a test, reproducer or referred to an issue with a reproducer?
  • Have you tested your changes locally for CPU and GPU devices?
  • Have you made sure that new changes do not introduce compiler warnings?
  • Have you checked performance impact of proposed changes?
  • If this PR is a work in progress, are you opening the PR as a draft?

Added DPCTLDevice_GetMaxMemAllocSize, and DPCTLDevice_GetMaxClockFrequency.
SyclDevice.max_clock_frequency: returns in MHz as type int
SyclDevice.max_mem_alloc_size: returns in bytes as type int
Copy link

github-actions bot commented Feb 6, 2024

Deleted rendered PR docs from intelpython.github.com/dpctl, latest should be updated shortly. 🤞

Copy link

github-actions bot commented Feb 6, 2024

Array API standard conformance tests for dpctl=0.15.1dev3=py310h15de555_85 ran successfully.
Passed: 908
Failed: 1
Skipped: 86

Copy link

github-actions bot commented Feb 6, 2024

Array API standard conformance tests for dpctl=0.15.1dev3=py310h15de555_86 ran successfully.
Passed: 908
Failed: 1
Skipped: 86

@coveralls
Copy link
Collaborator

Coverage Status

coverage: 91.145% (+0.003%) from 91.142%
when pulling 42392f1 on new-device-descriptors
into c4069a4 on master.

Copy link

github-actions bot commented Feb 6, 2024

Array API standard conformance tests for dpctl=0.15.1dev3=py310h15de555_87 ran successfully.
Passed: 908
Failed: 1
Skipped: 86

@oleksandr-pavlyk oleksandr-pavlyk merged commit c578614 into master Feb 6, 2024
45 of 46 checks passed
@oleksandr-pavlyk oleksandr-pavlyk deleted the new-device-descriptors branch February 6, 2024 23:04
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.

3 participants