-
Notifications
You must be signed in to change notification settings - Fork 355
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
[feat] Add support for argmax and argmin #1312
[feat] Add support for argmax and argmin #1312
Conversation
Adds support for aten::argmax and aten::argmin. Fixes # (issue) Please delete options that are not relevant and/or add your own. - Bug fix (non-breaking change which fixes an issue) - New feature (non-breaking change which adds functionality) - Breaking change (fix or feature that would cause existing functionality to not work as expected) - This change requires a documentation update - [ ] My code follows the style guidelines of this project (You can use the linters) - [ ] I have performed a self-review of my own code - [ ] I have commented my code, particularly in hard-to-understand areas and hacks - [ ] I have made corresponding changes to the documentation - [ ] I have added tests to verify my fix or my feature - [ ] New and existing unit tests pass locally with my changes - [ ] I have added the relevant labels to my PR in so that relevant reviewers are notified
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes seem fine but some style stuff, why are the converters in max.cpp but the tests in topk.cpp? Also seems like the linter needs to be run on the test code.
ATenMaxDimConvertsCorrectly was already in the topk tests so I followed that pattern for the rest of the file. |
In my environment |
|
Hmm, can you just move all the min/max tests into test_max.cpp? Not sure why it was put in topk but thats probably confusing. |
I've moved the tests to a new file, test_max.cpp. I'm still seeing a lint failure here, but I'm not seeing any issues running pre-commit locally. pre-commit run --files core/conversion/converters/impl/max.cpp pre-commit run --files tests/core/conversion/converters/BUILD pre-commit run --files tests/core/conversion/converters/test_max.cpp pre-commit run --files tests/core/conversion/converters/test_topk.cpp |
Seems like the issue is file permissions: diff --git a/home/runner/work/TensorRT/TensorRT/core/conversion/converters/impl/max.cpp b/tmp/changes.txt
old mode 100755
new mode 100644
ERROR: Some files do not conform to style guidelines Something like this should work chmod 0644 core/conversion/converters/impl/max.cpp |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome, LGTM!
* chore: additional options for perf_run tool Signed-off-by: dperi <dperi@nvidia.com> * feat: Add fx2trt backend and revamp current perf utility to accept CLI arguments Signed-off-by: Dheeraj Peri <peri.dheeraj@gmail.com> * chore: Refactor fx2trt functionality Signed-off-by: Dheeraj Peri <peri.dheeraj@gmail.com> * chore: Fix fp16 functionality for fx2trt backend Signed-off-by: Dheeraj Peri <peri.dheeraj@gmail.com> * chore: refactor Signed-off-by: Dheeraj Peri <peri.dheeraj@gmail.com> * chore: minor change Signed-off-by: Dheeraj Peri <peri.dheeraj@gmail.com> * refactor: Refactor perf_run and add internal benchmark scripts Signed-off-by: Dheeraj Peri <peri.dheeraj@gmail.com> * chore : minor refactor Signed-off-by: Dheeraj Peri <peri.dheeraj@gmail.com> * chore: Apply precommit tooling Signed-off-by: Dheeraj Peri <peri.dheeraj@gmail.com> * chore: Fix data loader issues and nox file paths Signed-off-by: Dheeraj Peri <peri.dheeraj@gmail.com> * chore: rebase and minor changes Signed-off-by: Dheeraj Peri <peri.dheeraj@gmail.com> * chore: Fix reporting to a file setting Signed-off-by: Dheeraj Peri <peri.dheeraj@gmail.com> * Update lower.py (#1324) * docs: [Automated] Regenerating documenation for e374eb1 Signed-off-by: Torch-TensorRT Github Bot <torch-tensorrt.github.bot@nvidia.com> * refactor: Refactor testing to use cosine similarity, remove redundancy models and restructuring Signed-off-by: Dheeraj Peri <peri.dheeraj@gmail.com> * chore: move to cosine similarity comparison Signed-off-by: Dheeraj Peri <peri.dheeraj@gmail.com> * refactor: Refactor nox file testing Signed-off-by: Dheeraj Peri <peri.dheeraj@gmail.com> * chore: add missing scripts Signed-off-by: Dheeraj Peri <peri.dheeraj@gmail.com> * chore: Linter fixes Signed-off-by: Dheeraj Peri <peri.dheeraj@gmail.com> * fix!: Fixed Windows compilation failures Signed-off-by: Anurag Dixit <a.dixit91@gmail.com> * chore: Minor fix Signed-off-by: Dheeraj Peri <peri.dheeraj@gmail.com> * chore: use rn18 instead of rn50 Signed-off-by: Dheeraj Peri <peri.dheeraj@gmail.com> * docs: [Automated] Regenerating documenation for a1a4786 Signed-off-by: Torch-TensorRT Github Bot <torch-tensorrt.github.bot@nvidia.com> * chore: Add cpp tests with cosine sim Signed-off-by: Dheeraj Peri <peri.dheeraj@gmail.com> * chore: linter fixes Signed-off-by: Dheeraj Peri <peri.dheeraj@gmail.com> * [feat] Add support for argmax and argmin (#1312) * [feat] Add support for argmax and argmin Adds support for aten::argmax and aten::argmin. Fixes # (issue) Please delete options that are not relevant and/or add your own. - Bug fix (non-breaking change which fixes an issue) - New feature (non-breaking change which adds functionality) - Breaking change (fix or feature that would cause existing functionality to not work as expected) - This change requires a documentation update - [ ] My code follows the style guidelines of this project (You can use the linters) - [ ] I have performed a self-review of my own code - [ ] I have commented my code, particularly in hard-to-understand areas and hacks - [ ] I have made corresponding changes to the documentation - [ ] I have added tests to verify my fix or my feature - [ ] New and existing unit tests pass locally with my changes - [ ] I have added the relevant labels to my PR in so that relevant reviewers are notified * move max.cpp tests to test_max.cpp no functional change * fix permissions on max.cpp * docs: [Automated] Regenerating documenation for 9db2852 Signed-off-by: Torch-TensorRT Github Bot <torch-tensorrt.github.bot@nvidia.com> * chore: Deepcopy other objects Signed-off-by: Dheeraj Peri <peri.dheeraj@gmail.com> * fix: Fix deepcopy issues of PTQ calibrators Signed-off-by: Dheeraj Peri <peri.dheeraj@gmail.com> * chore: linter fixes Signed-off-by: Dheeraj Peri <peri.dheeraj@gmail.com> * chore: Adding a guideline to build on Windows platform (#1337) * chore: Adding Windows build guideline Signed-off-by: Anurag Dixit <a.dixit91@gmail.com> * chore: Fix formatting Signed-off-by: Anurag Dixit <a.dixit91@gmail.com> Signed-off-by: Anurag Dixit <a.dixit91@gmail.com> * docs: [Automated] Regenerating documenation for 00a1f03 Signed-off-by: Torch-TensorRT Github Bot <torch-tensorrt.github.bot@nvidia.com> * chore: minor fixes Signed-off-by: Dheeraj Peri <peri.dheeraj@gmail.com> * chore: Linter fixes Signed-off-by: Dheeraj Peri <peri.dheeraj@gmail.com> * chore: Linter fixes Signed-off-by: Dheeraj Peri <peri.dheeraj@gmail.com> * docs: [Automated] Regenerating documenation for 1efe4b1 Signed-off-by: Torch-TensorRT Github Bot <torch-tensorrt.github.bot@nvidia.com> * docs: [Automated] Regenerating documenation for 10b9ecd Signed-off-by: Torch-TensorRT Github Bot <torch-tensorrt.github.bot@nvidia.com> * add support for aten::reciprocal(int) (#1308) * docs: [Automated] Regenerating documenation for 096fd41 Signed-off-by: Torch-TensorRT Github Bot <torch-tensorrt.github.bot@nvidia.com> Signed-off-by: dperi <dperi@nvidia.com> Signed-off-by: Dheeraj Peri <peri.dheeraj@gmail.com> Signed-off-by: Torch-TensorRT Github Bot <torch-tensorrt.github.bot@nvidia.com> Signed-off-by: Anurag Dixit <a.dixit91@gmail.com> Co-authored-by: dperi <dperi@nvidia.com> Co-authored-by: Dheeraj Peri <peri.dheeraj@gmail.com> Co-authored-by: Wei <wwei6@fb.com> Co-authored-by: Torch-TensorRT Github Bot <torch-tensorrt.github.bot@nvidia.com> Co-authored-by: Anurag Dixit <a.dixit91@gmail.com> Co-authored-by: Michael Feliz <104801882+mfeliz-cruise@users.noreply.github.com>
Adds support for aten::argmax and aten::argmin.
Fixes # (issue)
Please delete options that are not relevant and/or add your own.
Bug fix (non-breaking change which fixes an issue)
New feature (non-breaking change which adds functionality)
Breaking change (fix or feature that would cause existing functionality to not work as expected)
This change requires a documentation update
My code follows the style guidelines of this project (You can use the linters)
I have performed a self-review of my own code
I have commented my code, particularly in hard-to-understand areas and hacks
I have made corresponding changes to the documentation
I have added tests to verify my fix or my feature
New and existing unit tests pass locally with my changes
I have added the relevant labels to my PR in so that relevant reviewers are notified