Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

[numpy][tvm] rad2deg && deg2rad #16015

Merged

Conversation

tingying2020
Copy link
Contributor

Numpy operator rad2deg and deg2rad implemented with tam.

@haojin2

@@ -32,7 +32,8 @@
'exp', 'expm1', 'arcsin', 'arccos', 'arctan', 'sign', 'log', 'degrees', 'log2', 'log1p',
'rint', 'radians', 'reciprocal', 'square', 'negative', 'fix', 'ceil', 'floor',
'trunc', 'logical_not', 'arcsinh', 'arccosh', 'arctanh', 'tensordot',
'linspace', 'expand_dims', 'tile', 'arange', 'split', 'concatenate', 'stack']
'linspace', 'expand_dims', 'tile', 'arange', 'split', 'concatenate', 'stack', 'deg2rad',
'rad2deg']
Copy link
Contributor

Choose a reason for hiding this comment

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

move 'deg2rad' to after 'radians' and 'rad2deg' to after 'degrees'.

Copy link
Contributor

Choose a reason for hiding this comment

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

Same for the func declarations within the file

Copy link
Contributor

Choose a reason for hiding this comment

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

In all files.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed. Thank you.

(1, 2, 3),
(1, 0),
(2, 0, 3)
]:
Copy link
Contributor

Choose a reason for hiding this comment

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

simply do

for shape in [(), (1,), (1, 1), (1, 2, 3), (1, 0), (2, 0, 3)]:

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Have put the test into test_np_unary_funcs. Thanks.

@haojin2
Copy link
Contributor

haojin2 commented Sep 4, 2019

Almost LGTM, @yzhliu for double-check.

@tingying2020 tingying2020 force-pushed the np_tvm_rad2deg_deg2rad branch 3 times, most recently from 3431340 to d74351b Compare September 16, 2019 07:30
@haojin2
Copy link
Contributor

haojin2 commented Sep 16, 2019

@yzhliu

Copy link
Member

@yzhliu yzhliu left a comment

Choose a reason for hiding this comment

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

LGTM. please rebase

@reminisce reminisce changed the base branch from master to numpy_staging_prs September 23, 2019 05:14
* fix format error

* change type

* constangt must be tvm.const in tvm and add backward test, do not support float16

* add addto test

* handle 0-dim and 0-size

* add 0-dim test case

* register to npi and add wrapper with doc

* change function name, add infer type

* fix format error

* merge rad2deg to deg2rad

* fix error according to review

* change infer type

* add TVM_OP in test
@reminisce reminisce merged commit 6e05329 into apache:numpy_staging_prs Sep 23, 2019
reminisce pushed a commit that referenced this pull request Sep 23, 2019
* fix format error

* change type

* constangt must be tvm.const in tvm and add backward test, do not support float16

* add addto test

* handle 0-dim and 0-size

* add 0-dim test case

* register to npi and add wrapper with doc

* change function name, add infer type

* fix format error

* merge rad2deg to deg2rad

* fix error according to review

* change infer type

* add TVM_OP in test
drivanov pushed a commit to drivanov/incubator-mxnet that referenced this pull request Sep 26, 2019
* fix format error

* change type

* constangt must be tvm.const in tvm and add backward test, do not support float16

* add addto test

* handle 0-dim and 0-size

* add 0-dim test case

* register to npi and add wrapper with doc

* change function name, add infer type

* fix format error

* merge rad2deg to deg2rad

* fix error according to review

* change infer type

* add TVM_OP in test
larroy pushed a commit to larroy/mxnet that referenced this pull request Sep 28, 2019
* fix format error

* change type

* constangt must be tvm.const in tvm and add backward test, do not support float16

* add addto test

* handle 0-dim and 0-size

* add 0-dim test case

* register to npi and add wrapper with doc

* change function name, add infer type

* fix format error

* merge rad2deg to deg2rad

* fix error according to review

* change infer type

* add TVM_OP in test
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants