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

Obtain a proper result type on device without fp64 #1429

Merged
merged 3 commits into from
Jun 13, 2023

Conversation

antonwolfy
Copy link
Contributor

@antonwolfy antonwolfy commented Jun 13, 2023

The PR fixes an issue how result type is calculated internally in cython layout on a device without fp64 support.
The issue comes from #1418.

  • Have you provided a meaningful PR description?
  • Have you added a test, reproducer or referred to 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 filing the PR as a draft?

@vlad-perevezentsev
Copy link
Collaborator

@antonwolfy please remove return_type_no_fp64 and ptr_no_fp64 where possible.
dpnp_algo.pxd:374
dpnp_iface_fptr.hpp:421

@antonwolfy
Copy link
Contributor Author

@antonwolfy please remove return_type_no_fp64 and ptr_no_fp64 where possible. dpnp_algo.pxd:374 dpnp_iface_fptr.hpp:421

For the backend I'd like to keep that, since it might affect other dependent component.

Copy link
Collaborator

@vlad-perevezentsev vlad-perevezentsev left a comment

Choose a reason for hiding this comment

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

LGTM!

@antonwolfy antonwolfy merged commit 2e8f40c into master Jun 13, 2023
@antonwolfy antonwolfy deleted the elemwise_type_on_win branch June 13, 2023 12:05
antonwolfy added a commit that referenced this pull request Jun 15, 2023
* Add a copy for strided arrays in dpnp.dot()

* update versions

* Rework transpose methods to use dpctl.tensor functions (#1389)

* Rework transpose methods to call dpctl.tensor functions

* Applied review comments & added more tests

* Obtain a proper result type on device without fp64 (#1429)

* Obtain a proper result type on device without fp64

* remove excess defenitions

* Reuse dpctl.tensor.reshape (#1391)

* Rework transpose methods to call dpctl.tensor functions

* Reuse dpctl.tensor.reshape

* added dpnp.shape() and unmuted more tests

* fixed compiling issue & unmuted reshaper tests with order param

* Resolve merge issues

* resolve type mismatch on Win

* Use MCG59 engine on GPU device (#1423)

* Use MCG59 engine on GPU device

* Fix issue for Windows

* reduce precision in tests

* move w/a before import dpctl

* Reuse add(), multiply() and subtract() from dpctl (#1430)

* Reuse add(), multiply() and subtract() from dpctl

* add in-place support

* Reuse dpctl.tensor.sum for dpnp.sum (#1426)

* Reuse dpctl.tensor.sun for dpnp.sum

* Update tests for dpnp.sum

* Fix remarks

* Update tests/third_party/cupy/testing/helper.py

---------

Co-authored-by: Anton <100830759+antonwolfy@users.noreply.github.com>

* Workaround to Klocwork (#1433)

* Add inplace support of divide (#1434)

* Add dpnp.result_type() support (#1435)

* Add dpnp.result_type() support

* Update dpnp/dpnp_iface_manipulation.py

Co-authored-by: Natalia Polina <natalia.polina@intel.com>

---------

Co-authored-by: Natalia Polina <natalia.polina@intel.com>

* Implementation of dpnp.mean() (#1431)

* Reuse dpctl.tensor.sun for dpnp.sum

* Update tests for dpnp.sum

* Fix remarks

* Implementation of dpnp.mean

* Update logic for dpnp.mean function

* add normalize_axis_tuple

* Additional tests for dpnp.mean

* Fix minor remarks

* Add inplace support of divide

* Use inplace divide only for dpnp.inexact types

* Update tests for dpnp.mean

* Skip test_sample.py::TestRandint2::test_bound_float1

* Remove unused import

* Update dtype check

* Update dpnp/dpnp_iface_statistics.py

* Return deleted skips

---------

Co-authored-by: Anton Volkov <antonwolfy@gmail.com>
Co-authored-by: Anton <100830759+antonwolfy@users.noreply.github.com>

* New implementation of dpnp.outer (#1436)

* Add a new implementation of dpnp.outer

* Update dpnp.outer implementation

---------

Co-authored-by: Anton <100830759+antonwolfy@users.noreply.github.com>

* Set dpnp dependency on dpctl>=0.14.3 (#1437)

* Implement dpnp.cov() though existing dpnp methods (#1396)

* Implement dpnp.cov() though existing dpnp methods

* Applied review comments

* Clean up the code to get rid of todo

* use dpnp.mean()

* Added ChangeLog.md (#1439)

* Added ChangeLog.md

* exclude PR for comprasion ops

* Update version to 0.12.0 (#1440)

---------

Co-authored-by: vlad-perevezentsev <vladislav.perevezentsev@intel.com>
Co-authored-by: Natalia Polina <natalia.polina@intel.com>
antonwolfy added a commit that referenced this pull request Jun 15, 2023
* Obtain a proper result type on device without fp64

* remove excess defenitions
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