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

Added support for python -m dpctl -l to list platforms #1014

Merged
merged 2 commits into from
Dec 13, 2022

Conversation

oleksandr-pavlyk
Copy link
Collaborator

@oleksandr-pavlyk oleksandr-pavlyk commented Dec 11, 2022

It is pretty cumbersome to use DPCTL to enumerate devices typing python -c "import dpctl; dpctl.lsplatform(verbosity=2)".

This change adds support for enumerating devices in all visible platforms to __main__, replacing the above with much easier to type python -m dpctl -f.

(dev_dpctl) opavlyk@opavlyk-mobl:~/repos/dpctl$ python -m dpctl --help
usage: __main__.py [-h] [--includes] [--cmakedir] [--library] [-l] [-e] [-s]

optional arguments:
  -h, --help       show this help message and exit
  --includes       Include flags dpctl headers.
  --cmakedir       CMake module directory, ideal for setting -DDPCTL_ROOT in CMake.
  --library        Linker flags for SyclInterface library.
  -f, --full-list  Enumerate system platforms, using dpctl.lsplatform(verbosity=2)
  -l, --long-list  Enumerate system platforms, using dpctl.lsplatform(verbosity=1)
  -s, --summary    Enumerate system platforms, using dpctl.lsplatform()
  • 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?

@github-actions
Copy link

@github-actions
Copy link

Array API standard conformance tests for dpctl=0.14.1dev0=py310h8c27c75_5 ran successfully.
Passed: 33
Failed: 801
Skipped: 280

@coveralls
Copy link
Collaborator

coveralls commented Dec 11, 2022

Coverage Status

Coverage increased (+0.06%) to 82.34% when pulling 4952963 on dpctl_module_lsplatform into a3f8141 on master.

@github-actions
Copy link

Array API standard conformance tests for dpctl=0.14.1dev0=py310h8c27c75_6 ran successfully.
Passed: 33
Failed: 801
Skipped: 280

```
(dev_dpctl) opavlyk@opavlyk-mobl:~/repos/dpctl$ python -m dpctl --help
usage: __main__.py [-h] [--includes] [--cmakedir] [--library] [-l] [-e] [-s]

optional arguments:
  -h, --help       show this help message and exit
  --includes       Include flags dpctl headers.
  --cmakedir       CMake module directory, ideal for setting -DDPCTL_ROOT in CMake.
  --library        Linker flags for SyclInterface library.
  -f, --full-list  Enumerate system platforms, using dpctl.lsplatform(verbosity=2)
  -l, --long-list  Enumerate system platforms, using dpctl.lsplatform(verbosity=1)
  -s, --summary    Enumerate system platforms, using dpctl.lsplatform()
```
@oleksandr-pavlyk
Copy link
Collaborator Author

oleksandr-pavlyk commented Dec 13, 2022

I have force pushed to change short options used. It is now -f or --full-list, -l or --long-list, and -s or --summary.

@github-actions
Copy link

Array API standard conformance tests for dpctl=0.14.1dev0=py310h8c27c75_13 ran successfully.
Passed: 33
Failed: 801
Skipped: 280

@oleksandr-pavlyk oleksandr-pavlyk merged commit 395f3bc into master Dec 13, 2022
@oleksandr-pavlyk oleksandr-pavlyk deleted the dpctl_module_lsplatform branch December 13, 2022 14:41
@github-actions
Copy link

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

@github-actions
Copy link

Array API standard conformance tests for dpctl=0.14.1dev0=py310h8c27c75_13 ran successfully.
Passed: 33
Failed: 801
Skipped: 280

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