Skip to content

Improve performance of test_sort_complex_fp_nan - #1704

Merged
oleksandr-pavlyk merged 1 commit into
masterfrom
improve-test-sort-complex-fp-nan-performance
Jun 3, 2024
Merged

oleksandr-pavlyk merged 1 commit into
masterfrom
improve-test-sort-complex-fp-nan-performance

Conversation

@oleksandr-pavlyk

Copy link
Copy Markdown
Contributor

This test used to perform numerous operations on very short vectors. The change replaced that with single row-wise operation on matrices.

Now:

(dev_dpctl) opavlyk@opavlyk-mobl:~/repos/dpctl$ SYCL_CACHE_PERSISTENT=1 ONEAPI_DEVICE_SELECTOR=opencl:gpu python -m pytest -v -s ~/repos/dpctl/dpctl/tests/test_usm_ndarray_sorting.py::test_sort_complex_fp_nan
=================================================================================== test session starts ====================================================================================
platform linux -- Python 3.12.3, pytest-8.2.0, pluggy-1.5.0 -- /home/opavlyk/mamba/envs/dev_dpctl/bin/python
cachedir: .pytest_cache
hypothesis profile 'default' -> database=DirectoryBasedExampleDatabase(PosixPath('/home/opavlyk/repos/dpctl/.hypothesis/examples'))
metadata: {'Python': '3.12.3', 'Platform': 'Linux-5.15.146.1-microsoft-standard-WSL2-x86_64-with-glibc2.39', 'Packages': {'pytest': '8.2.0', 'pluggy': '1.5.0'}, 'Plugins': {'json-report': '1.5.0', 'hypothesis': '6.102.4', 'cov': '5.0.0', 'metadata': '3.1.1'}}
rootdir: /home/opavlyk/repos/dpctl
configfile: pyproject.toml
plugins: json-report-1.5.0, hypothesis-6.102.4, cov-5.0.0, metadata-3.1.1
collected 2 items

dpctl/tests/test_usm_ndarray_sorting.py::test_sort_complex_fp_nan[c8] PASSED
dpctl/tests/test_usm_ndarray_sorting.py::test_sort_complex_fp_nan[c16] SKIPPED (Intel(R) Graphics [0x9a49] does not support double precision floating point types)

=============================================================================== 1 passed, 1 skipped in 0.34s ===============================================================================

This single test used to take 3.5 seconds to execute.

  • 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?

This test used to perform numerous operations on very short vectors.
The change replaced that with single row-wise operation on matrices.

@ndgrigorian ndgrigorian left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good change, improves the performance of the test quite a bit!

@github-actions

github-actions Bot commented Jun 3, 2024 •

Copy link
Copy Markdown

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

@github-actions

github-actions Bot commented Jun 3, 2024

Copy link
Copy Markdown

Array API standard conformance tests for dpctl=0.18.0dev0=py310h15de555_32 ran successfully.
Passed: 889
Failed: 12
Skipped: 91

@coveralls

Copy link
Copy Markdown
Collaborator

Coverage Status

coverage: 87.911%. remained the same
when pulling 56f6276 on improve-test-sort-complex-fp-nan-performance
into d6d1526 on master.

@oleksandr-pavlyk
oleksandr-pavlyk merged commit efd74d8 into master Jun 3, 2024
@oleksandr-pavlyk
oleksandr-pavlyk deleted the improve-test-sort-complex-fp-nan-performance branch June 3, 2024 21:58
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