8000 [chainerx]Implementation of Absolute by dido1998 · Pull Request #6715 · chainer/chainer · GitHub
[go: up one dir, main page]

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

[chainerx]Implementation of Absolute #6715

Merged
merged 13 commits into from
Apr 19, 2019
Merged

[chainerx]Implementation of Absolute #6715

merged 13 commits into from
Apr 19, 2019

Conversation

dido1998
Copy link
Contributor
@dido1998 dido1998 commented Apr 1, 2019

ref issue: #6423

@hvy hvy added the ChainerX Related to ChainerX. label Apr 2, 2019
@hvy hvy self-assigned this Apr 2, 2019
@@ -770,6 +770,17 @@ Array Cos(const Array& x) {
return out;
}

Array Absolute(const Array& x) {
Dtype dtype = GetMathResultDtype(x.dtype());
Array out = Empty(x.shape(), dtype, x.device());
Copy link
Member

Choose a reason for hiding this comment

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

You're allocating an array here which is discarded when being assigned the sum of x_flip_1 and x_flip_2.

@hvy
Copy link
Member
hvy commented Apr 5, 2019

Thanks for the PR as always. I added some minor comments. Could you take a look?

@hvy hvy added cat:feature Implementation that introduces new interfaces. st:awaiting-author State indicating that response is needed from contributors, often authors of pull request. labels Apr 5, 2019
@@ -1630,7 +1630,7 @@ def func(self, xp, a):
# Special shapes
chainer.testing.product({
'shape': [(), (0,), (1,), (2, 0, 3), (1, 1, 1), (2, 3)],
'in_dtypes,out_dtype': _in_out_dtypes_math_functions,
'in_dtypes,out_dtype': _in_out_float_dtypes_math_functions,
Copy link
Member

Choose a reason for hiding this comment

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

Can you revert this change? It seems unrelated to your PR.

@hvy
Copy link
Member
hvy commented Apr 7, 2019

Can you write a Python test that checks that abs and absolute are equal, i.e. assert chainerx.abs is chainerx.absolute?

@dido1998
Copy link
Contributor Author

yes, I will do this.

@dido1998
Copy link
Contributor Author

I have added the assertion test. But, I was not able to reproduce the python test errors (dtype mismatch) locally.

@dido1998
Copy link
Contributor Author

I will check it again.

@dido1998
Copy link
Contributor Author

@hvy, I have fixed all the errors. Could you have a look?

@hvy
Copy link
Member
hvy commented Apr 18, 2019

Jenkins, test this please.

@pfn-ci-bot
Copy link
Collaborator

Successfully created a job for commit 8b0efb1 (457c4a7):

@hvy hvy removed the st:awaiting-author State indicating that response is needed from contributors, often authors of pull request. label Apr 18, 2019
@hvy hvy added the st:test-and-merge State indicating that pull request is approved by a reviewer and can be merged after CI passes. label Apr 18, 2019
@chainer-ci
Copy link
Member

Jenkins CI test (for commit 8b0efb1, target branch master) failed with status FAILURE.

@hvy
Copy link
Member
hvy commented Apr 18, 2019

Jenkins, test this please.

@pfn-ci-bot
Copy link
Collaborator

Successfully created a job for commit 8b0efb1 (5120e01):

@chainer-ci
Copy link
Member

Jenkins CI test (for commit 8b0efb1, target branch master) failed with status FAILURE.

@dido1998
Copy link
Contributor Author

The failure seems to be in TestMaxPool

@hvy
Copy link
Member
hvy commented Apr 19, 2019

Indeed, the failures seem unrelated although there were a couple of them except max pool. Thanks for the long running PR, LGTM!

@hvy hvy merged commit aca6fe5 into chainer:master Apr 19, 2019
@hvy hvy added this to the v7.0.0a1 milestone Apr 19, 2019
@hvy hvy removed the st:test-and-merge State indicating that pull request is approved by a reviewer and can be merged after CI passes. label Apr 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cat:feature Implementation that introduces new interfaces. ChainerX Related to ChainerX.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants
0