Skip to content

Expand coverage of unary ops #24

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

Merged
merged 3 commits into from
Mar 23, 2020
Merged

Expand coverage of unary ops #24

merged 3 commits into from
Mar 23, 2020

Conversation

bddppq
Copy link
Contributor

@bddppq bddppq commented Mar 22, 2020

Added support for:
aten::cos
aten::acos
aten::cosh
aten::sin
aten::asin
aten::sinh
aten::tan
aten::atan
aten::abs
aten::floor
aten::reciprocal
aten::ceil
aten::exp
aten::neg

Also replaced previous conversion rule of aten::sqrt that uses trt Scale.

$ LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$(pwd)/bazel-TRTorch/external/libtorch/lib CC=$(which g++) bazel test --cxxopt="-std=c++14" //tests/core/converters:test_unary --runs_per_test=10
INFO: Analyzed target //tests/core/converters:test_unary (0 packages loaded, 0 targets configured).
INFO: Found 1 test target...
Target //tests/core/converters:test_unary up-to-date:
  bazel-bin/tests/core/converters/test_unary
INFO: Elapsed time: 21.974s, Critical Path: 21.83s
INFO: 12 processes: 12 processwrapper-sandbox.
INFO: Build completed successfully, 13 total actions
//tests/core/converters:test_unary                                       PASSED in 12.4s
  Stats over 10 runs: max = 12.4s, min = 10.9s, avg = 11.9s, dev = 0.5s

INFO: Build completed successfully, 13 total actions

Added support for:
aten::cos
aten::acos
aten::cosh
aten::sin
aten::asin
aten::sinh
aten::tan
aten::atan
aten::abs
aten::floor
aten::reciprocal
aten::ceil
aten::sqrt
aten::exp
aten::neg

Signed-off-by: Junjie Bai <[email protected]>
Copy link
Collaborator

@narendasan narendasan left a comment

Choose a reason for hiding this comment

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

The changes look good, ran the converter test suite and it fails due to there no longer being a scale test. I think all you need to do is remove the scale test from //tests/core/converters/BUILD

Signed-off-by: Junjie Bai <[email protected]>
@bddppq
Copy link
Contributor Author

bddppq commented Mar 22, 2020

Oops forgot to remove the deleted test, fixed now.

$ LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$(pwd)/bazel-TRTorch/external/libtorch/lib CC=$(which g++) bazel test --cxxopt="-std=c++14" //tests/core/converters/...
Starting local Bazel server and connecting to it...
INFO: Analyzed 7 targets (38 packages loaded, 2045 targets configured).
INFO: Found 7 test targets...
INFO: Deleting stale sandbox base /home/j.bai/.cache/bazel/_bazel_j.bai/d82b7cb60982eac30e82b01b93a178e6/sandbox
INFO: Elapsed time: 24.758s, Critical Path: 16.94s
INFO: 14 processes: 14 processwrapper-sandbox.
INFO: Build completed successfully, 27 total actions
//tests/core/converters:test_activation                                  PASSED in 11.0s
//tests/core/converters:test_conv                                        PASSED in 11.6s
//tests/core/converters:test_element_wise                                PASSED in 11.6s
//tests/core/converters:test_linear                                      PASSED in 11.5s
//tests/core/converters:test_pooling                                     PASSED in 11.5s
//tests/core/converters:test_softmax                                     PASSED in 11.4s
//tests/core/converters:test_unary                                       PASSED in 11.8s

INFO: Build completed successfully, 27 total actions

Copy link
Collaborator

@narendasan narendasan left a comment

Choose a reason for hiding this comment

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

Cool looks good!

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