Skip to content

Commit

Permalink
Binary special methods return NotImplemented (#1191)
Browse files Browse the repository at this point in the history
* return NotImplemented on DNDarray methods

* fix bug lshift

* fix some bugs

* add out/where params for binary functions

* add reflective tests & out,where

* test NotImplemented

* add missing tests for truediv and matmul

* fix test divmod

* rearange checks divmod out

* tests in divmod and sub

* fix brackets in divmod test

* revert changes *shift for older pytorch versions

* add out, where parameters

* update examples output from scalar inputs

---------

Co-authored-by: Fabian Hoppe <[email protected]>
Co-authored-by: Claudia Comito <[email protected]>
  • Loading branch information
3 people authored Nov 2, 2023
1 parent eb8ce2d commit f62e2b1
Show file tree
Hide file tree
Showing 6 changed files with 714 additions and 114 deletions.
2 changes: 1 addition & 1 deletion heat/core/_operations.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def __binary_op(
t1: Union[DNDarray, int, float],
t2: Union[DNDarray, int, float],
out: Optional[DNDarray] = None,
where: Optional[DNDarray] = True,
where: Union[bool, DNDarray] = True,
fn_kwargs: Optional[Dict] = {},
) -> DNDarray:
"""
Expand Down
Loading

1 comment on commit f62e2b1

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Performance Alert ⚠️

Possible performance regression was detected for benchmark.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold 2.

Benchmark suite Current: f62e2b1 Previous: eb8ce2d Ratio
matmul_split_0_N1_GPU - RUNTIME 0.0067227683030068874 s (0.01882530376315117) 0.0027864642906934023 s (0.006810166407376528) 2.41

This comment was automatically generated by workflow using github-action-benchmark.

CC: @web-flow

Please sign in to comment.